summaryrefslogtreecommitdiffstats
path: root/src/software/openlmi/software/core/ComputerSystem.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/software/openlmi/software/core/ComputerSystem.py')
-rw-r--r--src/software/openlmi/software/core/ComputerSystem.py23
1 files changed, 15 insertions, 8 deletions
diff --git a/src/software/openlmi/software/core/ComputerSystem.py b/src/software/openlmi/software/core/ComputerSystem.py
index 4f99ee3..fcb89c6 100644
--- a/src/software/openlmi/software/core/ComputerSystem.py
+++ b/src/software/openlmi/software/core/ComputerSystem.py
@@ -34,16 +34,12 @@ def get_path(prefix='Linux'):
op["Name"] = socket.gethostname()
return op
-def check_path_property(env, op, prop_name):
+def check_path(env, system, prop_name):
"""
- Checks, whether object path contains correct instance name of
- Linux_ComputerSystem corresponding to this system.
- If not, an exception is raised.
+ Checks instance name of ComputerSystem.
+ @param system instance name
+ @param prop_name name of object path
"""
- if not prop_name in op:
- raise pywbem.CIMError(pywbem.CIM_ERR_INVALID_PARAMETER,
- "Missing %s key property!" % prop_name)
- system = op[prop_name]
if not isinstance(system, pywbem.CIMInstanceName):
raise pywbem.CIMError(pywbem.CIM_ERR_INVALID_PARAMETER,
"\"%s\" must be a CIMInstanceName" % prop_name)
@@ -74,3 +70,14 @@ def check_path_property(env, op, prop_name):
prop_name, our_system['Name'])
return True
+def check_path_property(env, op, prop_name):
+ """
+ Checks, whether object path contains correct instance name of
+ Linux_ComputerSystem corresponding to this system.
+ If not, an exception is raised.
+ """
+ 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)
+