summaryrefslogtreecommitdiff
path: root/ironic/common/hash_ring.py
diff options
context:
space:
mode:
authorRuby Loo <rloo@yahoo-inc.com>2014-07-15 10:52:32 -0400
committerRuby Loo <rloo@yahoo-inc.com>2014-07-23 03:21:16 +0000
commita65d3e6b1126b4e148e825290a61b151e1a6559c (patch)
tree840bfa561a7b363e5a3dab78f2aac63617a93ef5 /ironic/common/hash_ring.py
parentc75a070520b02deafe61343157d3a4219374f6d3 (diff)
downloadironic-a65d3e6b1126b4e148e825290a61b151e1a6559c.tar.gz
Implement API to get driver properties
Implement GET /v1/drivers/<driver>/properties that returns a dictionary of (driver_info) properties of the specified driver. Each entry in the dictionary is: key: name of the property value: description of the property An invalid driver name results in an HTTP 404. Eg: 'GET /v1/drivers/pxe_ipminative/properties' returns: {"pxe_deploy_ramdisk": "UUID ... of the ramdisk... Required.", "ipmi_username": "IPMI username. Required.", "ipmi_address": "IP of the node's BMC. Required.", "ipmi_password": "IPMI password. Required.", "pxe_deploy_kernel": "UUID ... of the deployment kernel. Required." } If the properties for a driver are not cached, the API service makes an RPC request to a conductor to get the properties for that driver. It then caches that information for subsequent requests of that driver. Change-Id: I9c98f4369c54a7cdf9e20ea87348e61f7af10303 Blueprint: get-required-driver-info Partial-Bug: #1261915
Diffstat (limited to 'ironic/common/hash_ring.py')
-rw-r--r--ironic/common/hash_ring.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/ironic/common/hash_ring.py b/ironic/common/hash_ring.py
index e5c12f9b9..00f272ffd 100644
--- a/ironic/common/hash_ring.py
+++ b/ironic/common/hash_ring.py
@@ -142,4 +142,5 @@ class HashRingManager(object):
try:
return self.hash_rings[driver_name]
except KeyError:
- raise exception.DriverNotFound(driver_name=driver_name)
+ raise exception.DriverNotFound(_("The driver '%s' is unknown.") %
+ driver_name)