21341088 Parsing manifest/profiles fails if multiple criteria present
authorMatt Keenan <matt.keenan@oracle.com>
Tue, 30 Jun 2015 17:10:26 +0100
changeset 4567 921fa080154a
parent 4565 e8c0999d188c
child 4573 64ad0d7d3334
21341088 Parsing manifest/profiles fails if multiple criteria present
components/openstack/ironic/files/drivers/modules/solaris_ipmitool.py
--- a/components/openstack/ironic/files/drivers/modules/solaris_ipmitool.py	Mon Jun 29 23:00:42 2015 -0700
+++ b/components/openstack/ironic/files/drivers/modules/solaris_ipmitool.py	Tue Jun 30 17:10:26 2015 +0100
@@ -2530,10 +2530,12 @@
         # Get index into string for client/manifest/profile names
         # client/manifest/profile names are all in 2nd column of output
         if len(lines) > 1:
-            col_start = lines[1].index(" --")
+            col_start = lines[1].index(" --") + 1
+            col_end = lines[1][col_start:].index(" --") + 1 + col_start
 
             for line in range(2, len(lines)):
-                names.append(lines[line][col_start:].split()[0])
+                if lines[line][col_start:col_end].strip():
+                    names.append(lines[line][col_start:col_end].strip())
 
         LOG.debug("AIService._parse_names():names: %s" % (names))
         return names