diff options
author | Ruby Loo <rloo@yahoo-inc.com> | 2015-01-28 17:11:46 +0000 |
---|---|---|
committer | Ruby Loo <rloo@yahoo-inc.com> | 2015-01-29 14:12:58 +0000 |
commit | 80c9550f6b0940423740471bd97c945a0e72ccd4 (patch) | |
tree | eb3338e392efd76cc95848612858ea475ee9daee /ironic/drivers/modules/irmc/common.py | |
parent | 00d58f904256a861ed3f8fc6e18ace3156ccb8fb (diff) | |
download | ironic-80c9550f6b0940423740471bd97c945a0e72ccd4.tar.gz |
Add 'irmc_' prefix to optional properties
The optional driver_info properties are missing the 'irmc_'
prefix from their names. This patch adds them. The
descriptions were modified a bit so that 'Optional' is at the
end (easier for the reader to see/distinguish between Required
and Optional).
This is a follow-on patch to https://review.openstack.org/144901.
Implements: blueprint irmc-power-driver
Change-Id: I640ae0b4ec022b9cda6dd3f5194d4f2da4dc5935
Diffstat (limited to 'ironic/drivers/modules/irmc/common.py')
-rw-r--r-- | ironic/drivers/modules/irmc/common.py | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/ironic/drivers/modules/irmc/common.py b/ironic/drivers/modules/irmc/common.py index bc3320808..4ecb96004 100644 --- a/ironic/drivers/modules/irmc/common.py +++ b/ironic/drivers/modules/irmc/common.py @@ -49,13 +49,13 @@ REQUIRED_PROPERTIES = { 'irmc_password': _("Password for irmc_username. Required.") } OPTIONAL_PROPERTIES = { - 'port': _("Port to be used for irmc operations either 80 or 443. " - "Optional. The default value is 443"), - 'auth_method': _("Authentication method for iRMC operations " - "either 'basic' or 'digest'. " - "Optional. The default value is 'digest'"), - 'client_timeout': _("Timeout (in seconds) for iRMC operations. " - "Optional. The default value is 60.") + 'irmc_port': _("Port to be used for iRMC operations; either 80 or 443. " + "The default value is 443. Optional."), + 'irmc_auth_method': _("Authentication method for iRMC operations; " + "either 'basic' or 'digest'. The default value is " + "'digest'. Optional."), + 'irmc_client_timeout': _("Timeout (in seconds) for iRMC operations. " + "The default value is 60. Optional.") } COMMON_PROPERTIES = REQUIRED_PROPERTIES.copy() @@ -85,7 +85,8 @@ def parse_driver_info(node): req = {key: value for key, value in info.iteritems() if key in REQUIRED_PROPERTIES} - opt = {'irmc_' + param: info.get('irmc_' + param, CONF.irmc.get(param)) + # corresponding config names don't have 'irmc_' prefix + opt = {param: info.get(param, CONF.irmc.get(param[len('irmc_'):])) for param in OPTIONAL_PROPERTIES} d_info = dict(list(req.items()) + list(opt.items())) |