Tony Asleson
2014-07-08 21:53:57 UTC
For some providers they don't handle None being passed in for
PropertyList so we will only include it when it has a value.
Signed-off-by: Tony Asleson <***@redhat.com>
---
plugin/smispy/smis.py | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/plugin/smispy/smis.py b/plugin/smispy/smis.py
index 81e0dcd..48c6243 100644
--- a/plugin/smispy/smis.py
+++ b/plugin/smispy/smis.py
@@ -2288,13 +2288,12 @@ class Smis(IStorageAreaNetwork):
all_vendor_namespaces.extend([cim_sys.path.namespace])
self.all_vendor_namespaces = all_vendor_namespaces
rc = []
+ e_args = dict(LocalOnly=False)
+ if property_list is not None:
+ e_args['PropertyList'] = property_list
for vendor_namespace in self.all_vendor_namespaces:
- rc.extend(
- self._c.EnumerateInstances(
- class_name,
- namespace=vendor_namespace,
- PropertyList=property_list,
- LocalOnly=False))
+ rc.extend(self._c.EnumerateInstances(class_name, vendor_namespace,
+ **e_args))
return rc
@handle_cim_errors
PropertyList so we will only include it when it has a value.
Signed-off-by: Tony Asleson <***@redhat.com>
---
plugin/smispy/smis.py | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/plugin/smispy/smis.py b/plugin/smispy/smis.py
index 81e0dcd..48c6243 100644
--- a/plugin/smispy/smis.py
+++ b/plugin/smispy/smis.py
@@ -2288,13 +2288,12 @@ class Smis(IStorageAreaNetwork):
all_vendor_namespaces.extend([cim_sys.path.namespace])
self.all_vendor_namespaces = all_vendor_namespaces
rc = []
+ e_args = dict(LocalOnly=False)
+ if property_list is not None:
+ e_args['PropertyList'] = property_list
for vendor_namespace in self.all_vendor_namespaces:
- rc.extend(
- self._c.EnumerateInstances(
- class_name,
- namespace=vendor_namespace,
- PropertyList=property_list,
- LocalOnly=False))
+ rc.extend(self._c.EnumerateInstances(class_name, vendor_namespace,
+ **e_args))
return rc
@handle_cim_errors
--
1.8.2.1
1.8.2.1