25107146 newline not snipped from cpu_arch property value
authorMatt Keenan <matt.keenan@oracle.com>
Fri, 18 Nov 2016 16:50:45 +0000
changeset 7350 7cd865fc284a
parent 7349 391d794fb249
child 7351 8f50566e8278
25107146 newline not snipped from cpu_arch property value
components/openstack/ironic/files/drivers/modules/solaris_ipmitool.py
--- a/components/openstack/ironic/files/drivers/modules/solaris_ipmitool.py	Fri Nov 18 07:20:10 2016 -0800
+++ b/components/openstack/ironic/files/drivers/modules/solaris_ipmitool.py	Fri Nov 18 16:50:45 2016 +0000
@@ -470,17 +470,17 @@
         driver_info = _parse_driver_info(node)
         try:
             cpu_arch, _err = _exec_ipmitool(driver_info, ipmi_cmd_args)
+            propdict = {'cpu_arch': cpu_arch.split(":")[1].strip()}
+            node_properties = node.properties
+            node_properties.update(propdict)
+            node.properties = node_properties
+            node.save()
+
         except Exception as err:
             LOG.error(_LE("Failed to get node architecture from IPMI : %s" %
                       (err)))
             raise exception.IPMIFailure(cmd=err)
 
-        propdict = {'cpu_arch': cpu_arch}
-        node_properties = node.properties
-        node_properties.update(propdict)
-        node.properties = node_properties
-        node.save()
-
         LOG.debug("SolarisDeploy._get_node_architecture: cpu_arch: '%s'"
                   % (cpu_arch))