summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMichal Minar <miminar@redhat.com>2013-03-26 11:41:54 +0100
committerMichal Minar <miminar@redhat.com>2013-03-26 12:14:23 +0100
commitbd14a7433a9c3e747fefd00b087219283144825d (patch)
treef72012c9969571c45127cc46bee4893db31b119f /src
parentac7afb0853192b789908910fa505841d842dd689 (diff)
downloadopenlmi-providers-bd14a7433a9c3e747fefd00b087219283144825d.tar.gz
openlmi-providers-bd14a7433a9c3e747fefd00b087219283144825d.tar.xz
openlmi-providers-bd14a7433a9c3e747fefd00b087219283144825d.zip
fixed get instance of AffectedSoftwareJobElement
Diffstat (limited to 'src')
-rw-r--r--src/software/openlmi/software/LMI_AffectedSoftwareJobElement.py16
1 files changed, 13 insertions, 3 deletions
diff --git a/src/software/openlmi/software/LMI_AffectedSoftwareJobElement.py b/src/software/openlmi/software/LMI_AffectedSoftwareJobElement.py
index ec1c0ab..601b1c3 100644
--- a/src/software/openlmi/software/LMI_AffectedSoftwareJobElement.py
+++ b/src/software/openlmi/software/LMI_AffectedSoftwareJobElement.py
@@ -69,21 +69,31 @@ class LMI_AffectedSoftwareJobElement(CIMProvider2):
"""
(job, affected) = AffectedSoftwareJobElement.check_path(env, model.path)
model['AffectingElement'] = InstallationJob.job2model(job)
- if affected.classname == "LMI_SoftwareIdentity":
+
+ ch = env.get_cimom_handle()
+
+ if ch.is_subclass(affected.namespace,
+ sub=affected.classname, super='LMI_SoftwareIdentity'):
_, effects, descriptions = AffectedSoftwareJobElement. \
job2affected_software_identity(job)
model["AffectedElement"] = affected
model["ElementEffects"] = effects
model["OtherElementEffectsDescriptions"] = descriptions
- elif affected.classname == "LMI_ComputerSystem":
+
+ elif ch.is_subclass(affected.namespace,
+ sub=affected.classname, super='Linux_ComputerSystem'):
AffectedSoftwareJobElement.fill_model_computer_system(
model, env, keys_only=False)
- elif affected.classname == "LMI_ComputerSystem":
+
+ elif ch.is_subclass(affected.namespace,
+ sub=affected.classname, super='LMI_SystemSoftwareCollection'):
AffectedSoftwareJobElement.fill_model_system_collection(
model, keys_only=False)
+
else:
cmpi_logging.logger.error("Unhandled classname: %s",
affected.classname)
+
return model
@cmpi_logging.trace_method