summaryrefslogtreecommitdiffstats
path: root/src/software/openlmi/software/core/SystemSoftwareCollection.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/software/openlmi/software/core/SystemSoftwareCollection.py')
-rw-r--r--src/software/openlmi/software/core/SystemSoftwareCollection.py20
1 files changed, 13 insertions, 7 deletions
diff --git a/src/software/openlmi/software/core/SystemSoftwareCollection.py b/src/software/openlmi/software/core/SystemSoftwareCollection.py
index b7a320b..0f59f3b 100644
--- a/src/software/openlmi/software/core/SystemSoftwareCollection.py
+++ b/src/software/openlmi/software/core/SystemSoftwareCollection.py
@@ -29,15 +29,11 @@ def get_path():
op['InstanceID'] = "LMI:SystemSoftwareCollection"
return op
-def check_path_property(env, op, prop_name):
+def check_path(env, collection, prop_name):
"""
- Checks, whether prop_name property of op object path is correct.
- If not, an exception will be risen.
+ Checks instance name of SystemSoftwareCollection.
+ @param prop_name name of object name; used for error descriptions
"""
- if not prop_name in op:
- raise pywbem.CIMError(pywbem.CIM_ERR_INVALID_PARAMETER,
- "Missing %s key property!" % prop_name)
- collection = op[prop_name]
if not isinstance(collection, pywbem.CIMInstanceName):
raise pywbem.CIMError(pywbem.CIM_ERR_INVALID_PARAMETER,
"\"%s\" must be a CIMInstanceName" % prop_name)
@@ -61,3 +57,13 @@ def check_path_property(env, op, prop_name):
"InstanceID of \"%s\" does not match \"%s\"" %
prop_name, our_collection['InstanceID'])
return True
+
+def check_path_property(env, op, prop_name):
+ """
+ Checks, whether prop_name property of op object path is correct.
+ If not, an exception will be risen.
+ """
+ if not prop_name in op:
+ raise pywbem.CIMError(pywbem.CIM_ERR_INVALID_PARAMETER,
+ "Missing %s key property!" % prop_name)
+ return check_path(env, op[prop_name], prop_name)