Gris Ge
2015-07-02 07:35:19 UTC
* When disks are configured as JBOD or no volume found,
there will be no 'TOPOLOGY' entry in storcli output.
Signed-off-by: Gris Ge <***@redhat.com>
---
plugin/megaraid/megaraid.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/plugin/megaraid/megaraid.py b/plugin/megaraid/megaraid.py
index 1aadd4f..d7e6d41 100644
--- a/plugin/megaraid/megaraid.py
+++ b/plugin/megaraid/megaraid.py
@@ -473,6 +473,8 @@ def pools(self, search_key=None, search_value=None,
dg_show_output = self._storcli_exec(
["/c%d/dall" % ctrl_num, "show", "all"])
free_space_list = dg_show_output.get('FREE SPACE DETAILS', [])
+ if 'TOPOLOGY' not in dg_show_output:
+ continue
for dg_top in dg_show_output['TOPOLOGY']:
if dg_top['Arr'] != '-':
continue
there will be no 'TOPOLOGY' entry in storcli output.
Signed-off-by: Gris Ge <***@redhat.com>
---
plugin/megaraid/megaraid.py | 2 ++
1 file changed, 2 insertions(+)
diff --git a/plugin/megaraid/megaraid.py b/plugin/megaraid/megaraid.py
index 1aadd4f..d7e6d41 100644
--- a/plugin/megaraid/megaraid.py
+++ b/plugin/megaraid/megaraid.py
@@ -473,6 +473,8 @@ def pools(self, search_key=None, search_value=None,
dg_show_output = self._storcli_exec(
["/c%d/dall" % ctrl_num, "show", "all"])
free_space_list = dg_show_output.get('FREE SPACE DETAILS', [])
+ if 'TOPOLOGY' not in dg_show_output:
+ continue
for dg_top in dg_show_output['TOPOLOGY']:
if dg_top['Arr'] != '-':
continue
--
1.8.3.1
1.8.3.1