summaryrefslogtreecommitdiff
path: root/ironic/drivers/modules/intel_ipmi
diff options
context:
space:
mode:
authorMadhuri Kumari <madhuri.kumari@intel.com>2019-07-10 14:22:57 +0530
committerMadhuri Kumari <madhuri.kumari@intel.com>2019-07-26 15:51:20 +0530
commit01a9726c04590045eb9095ba849738d568d06fd8 (patch)
treeaa51ef3d983d594f9f31173296977418ab0ef963 /ironic/drivers/modules/intel_ipmi
parenta1d844e3be83d9696e9cdb2c213b2af0faf705cd (diff)
downloadironic-01a9726c04590045eb9095ba849738d568d06fd8.tar.gz
Follow-up to the IntelIPMIHardware patch
Change-Id: I240c27c25f70b0a916bbed6cc4a4122c0bffd9a9
Diffstat (limited to 'ironic/drivers/modules/intel_ipmi')
-rw-r--r--ironic/drivers/modules/intel_ipmi/management.py18
1 files changed, 8 insertions, 10 deletions
diff --git a/ironic/drivers/modules/intel_ipmi/management.py b/ironic/drivers/modules/intel_ipmi/management.py
index 8661b494e..ce31aa779 100644
--- a/ironic/drivers/modules/intel_ipmi/management.py
+++ b/ironic/drivers/modules/intel_ipmi/management.py
@@ -42,7 +42,7 @@ class IntelIPMIManagement(ipmitool.IPMIManagement):
socket_count = int(sockets)
if socket_count <= 0:
raise ValueError
- except ValueError:
+ except (ValueError, TypeError):
raise exception.InvalidParameterValue(_(
"Invalid number of socket %(socket)s value specified. "
"Expected a positive integer.") % {"socket": sockets})
@@ -51,8 +51,8 @@ class IntelIPMIManagement(ipmitool.IPMIManagement):
'intel_speedselect_config': {
'description': (
"Hexadecimal code of Intel SST-PP configuration provided. "
- "Input value should be string. Accepted values are "
- "['0x00', '0x01', '0x02']. "
+ "Input value should be string. Accepted values are %s."
+ % ', '.join(INTEL_SST_PP_CONFIG_HEXA_CODES)
),
'required': True
},
@@ -70,17 +70,15 @@ class IntelIPMIManagement(ipmitool.IPMIManagement):
"for node %(node)s with socket count %(socket)s",
{"config": config, "node": task.node.uuid,
"socket": socket_count})
- self._configure_intel_speed_select(task, config, socket_count)
-
- def _configure_intel_speed_select(self, task, config, socket_count):
iss_conf = "0x2c 0x41 0x04 0x00 0x0%s %s"
for socket in range(socket_count):
hexa_code = iss_conf % (socket, config)
try:
ipmitool.send_raw(task, hexa_code)
except exception.IPMIFailure as e:
- msg = ("Failed to set Intel SST-PP configuration level "
- "%(cfg)s on socket number %(skt)s due to reason "
- "%(exc)s." % {"cfg": config, "skt": socket, "exc": e})
- LOG.exception(msg)
+ msg = (_("Failed to set Intel SST-PP configuration level "
+ "%(cfg)s on socket number %(skt)s due to "
+ "reason %(exc)s.") % {"cfg": config,
+ "skt": socket, "exc": e})
+ LOG.error(msg)
raise exception.IPMIFailure(message=msg)