summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichal Minar <miminar@redhat.com>2013-08-07 15:48:44 +0200
committerMichal Minar <miminar@redhat.com>2013-08-08 12:53:21 +0200
commitbbba2235ea534bf2c9b54cc460816ce048f7f893 (patch)
tree35384e6580c458adbce0eea02050ff4df3241ed1
parent8a1119dc7a8581c8b3858132990ebc1ab3b71aee (diff)
downloadopenlmi-providers-bbba2235ea534bf2c9b54cc460816ce048f7f893.tar.gz
openlmi-providers-bbba2235ea534bf2c9b54cc460816ce048f7f893.tar.xz
openlmi-providers-bbba2235ea534bf2c9b54cc460816ce048f7f893.zip
be more tolerant, when checking instance of SoftwareInstallationService
Do not compare SystemName property byte by byte. Allow alliases.
-rw-r--r--src/software/lmi/software/core/InstallationService.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/software/lmi/software/core/InstallationService.py b/src/software/lmi/software/core/InstallationService.py
index 290f1ed..1df368f 100644
--- a/src/software/lmi/software/core/InstallationService.py
+++ b/src/software/lmi/software/core/InstallationService.py
@@ -596,10 +596,12 @@ def check_path(env, service, prop_name):
if not key in service:
raise pywbem.CIMError(pywbem.CIM_ERR_NOT_FOUND,
"\"%s\" is missing %s key property" % ( prop_name, key))
- if service[key] != our_service[key]:
- raise pywbem.CIMError(pywbem.CIM_ERR_NOT_FOUND,
- "\"%s\" key property %s(%s) does not match \"%s\"" %(
- prop_name, key, service[key], our_service[key]))
+ if key == "SystemName":
+ continue
+ if not util.is_this_system(service["SystemName"]):
+ raise pywbem.CIMError(pywbem.CIM_ERR_NOT_FOUND,
+ "\"%s\" key property SystemName(%s) does not match \"%s\"" % (
+ prop_name, service[key], our_service[key]))
return True
@cmpi_logging.trace_function