summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMichal Minar <miminar@redhat.com>2013-10-03 13:32:33 +0200
committerMichal Minar <miminar@redhat.com>2013-10-04 09:53:38 +0200
commitfe93dc01ee77635f24f2c79a368a5a45e649b0e6 (patch)
treeb01c72c2f6fefaad77603e73b352f9af82c4f27d /src
parente8cbdfd96c845b976da1832e389c8542a04f6d83 (diff)
downloadopenlmi-providers-fe93dc01ee77635f24f2c79a368a5a45e649b0e6.tar.gz
openlmi-providers-fe93dc01ee77635f24f2c79a368a5a45e649b0e6.tar.xz
openlmi-providers-fe93dc01ee77635f24f2c79a368a5a45e649b0e6.zip
software: let's check only for subclasses of CIM_ComputerSystem
Be more benevolent when checking association class instances for a references to ComputerSystem. Fixed also few cim class inheritance checks to correspond with mof files.
Diffstat (limited to 'src')
-rw-r--r--src/software/lmi/software/LMI_AffectedSoftwareJobElement.py4
-rw-r--r--src/software/lmi/software/LMI_HostedSoftwareCollection.py4
-rw-r--r--src/software/lmi/software/LMI_HostedSoftwareIdentityResource.py2
-rw-r--r--src/software/lmi/software/LMI_HostedSoftwareInstallationService.py4
-rw-r--r--src/software/lmi/software/LMI_SoftwareInstallationServiceAffectsElement.py2
-rw-r--r--src/software/lmi/software/core/AffectedSoftwareJobElement.py2
-rw-r--r--src/software/lmi/software/core/ComputerSystem.py6
7 files changed, 12 insertions, 12 deletions
diff --git a/src/software/lmi/software/LMI_AffectedSoftwareJobElement.py b/src/software/lmi/software/LMI_AffectedSoftwareJobElement.py
index 2c92d74..c0c5ceb 100644
--- a/src/software/lmi/software/LMI_AffectedSoftwareJobElement.py
+++ b/src/software/lmi/software/LMI_AffectedSoftwareJobElement.py
@@ -83,7 +83,7 @@ class LMI_AffectedSoftwareJobElement(CIMProvider2):
elif ch.is_subclass(affected.namespace,
sub=affected.classname,
- super=util.Configuration.get_instance().system_class_name):
+ super="CIM_ComputerSystem"):
AffectedSoftwareJobElement.fill_model_computer_system(
model, job, keys_only=False)
@@ -247,6 +247,6 @@ class LMI_AffectedSoftwareJobElement(CIMProvider2):
super='CIM_ManagedElement') or \
ch.is_subclass(object_name.namespace,
sub=object_name.classname,
- super='CIM_Job'):
+ super='LMI_SoftwareJob'):
return self.simple_refs(env, object_name, model,
result_class_name, role, result_role, keys_only)
diff --git a/src/software/lmi/software/LMI_HostedSoftwareCollection.py b/src/software/lmi/software/LMI_HostedSoftwareCollection.py
index 1506126..9f87e1c 100644
--- a/src/software/lmi/software/LMI_HostedSoftwareCollection.py
+++ b/src/software/lmi/software/LMI_HostedSoftwareCollection.py
@@ -216,10 +216,10 @@ class LMI_HostedSoftwareCollection(CIMProvider2):
if ch.is_subclass(object_name.namespace,
sub=object_name.classname,
- super='CIM_SystemSpecificCollection') or \
+ super='LMI_SystemSoftwareCollection') or \
ch.is_subclass(object_name.namespace,
sub=object_name.classname,
- super='CIM_System'):
+ super="CIM_ComputerSystem"):
return self.simple_refs(env, object_name, model,
result_class_name, role, result_role, keys_only)
diff --git a/src/software/lmi/software/LMI_HostedSoftwareIdentityResource.py b/src/software/lmi/software/LMI_HostedSoftwareIdentityResource.py
index 6656493..8c27850 100644
--- a/src/software/lmi/software/LMI_HostedSoftwareIdentityResource.py
+++ b/src/software/lmi/software/LMI_HostedSoftwareIdentityResource.py
@@ -265,7 +265,7 @@ class LMI_HostedSoftwareIdentityResource(CIMProvider2):
"""
handlers = [
- ("Antecedent", "CIM_ComputerSystem" , generate_system_referents),
+ ("Antecedent", "CIM_ComputerSystem", generate_system_referents),
("Dependent", "LMI_SoftwareIdentityResource",
generate_repository_referents)
]
diff --git a/src/software/lmi/software/LMI_HostedSoftwareInstallationService.py b/src/software/lmi/software/LMI_HostedSoftwareInstallationService.py
index 5cd5bfd..a581c76 100644
--- a/src/software/lmi/software/LMI_HostedSoftwareInstallationService.py
+++ b/src/software/lmi/software/LMI_HostedSoftwareInstallationService.py
@@ -227,7 +227,7 @@ class LMI_HostedSoftwareInstallationService(CIMProvider2):
sub=object_name.classname,
super='LMI_SoftwareInstallationService') or \
ch.is_subclass(object_name.namespace,
- sub=object_name.classname,
- super=util.Configuration.get_instance().system_class_name):
+ sub=object_name.classname,
+ super="CIM_ComputerSystem"):
return self.simple_refs(env, object_name, model,
result_class_name, role, result_role, keys_only)
diff --git a/src/software/lmi/software/LMI_SoftwareInstallationServiceAffectsElement.py b/src/software/lmi/software/LMI_SoftwareInstallationServiceAffectsElement.py
index 107021d..c46e6bd 100644
--- a/src/software/lmi/software/LMI_SoftwareInstallationServiceAffectsElement.py
+++ b/src/software/lmi/software/LMI_SoftwareInstallationServiceAffectsElement.py
@@ -101,7 +101,7 @@ class LMI_SoftwareInstallationServiceAffectsElement(CIMProvider2):
model, pkg_info, keys_only=False)
elif ch.is_subclass(affected.namespace,
sub=affected.classname,
- super=util.Configuration.get_instance().system_class_name):
+ super="CIM_ComputerSystem"):
InstallationServiceAffectsElement.fill_model_computer_system(
model, keys_only=False)
else:
diff --git a/src/software/lmi/software/core/AffectedSoftwareJobElement.py b/src/software/lmi/software/core/AffectedSoftwareJobElement.py
index bd1bcb3..df4e123 100644
--- a/src/software/lmi/software/core/AffectedSoftwareJobElement.py
+++ b/src/software/lmi/software/core/AffectedSoftwareJobElement.py
@@ -100,7 +100,7 @@ def check_path(env, op):
SystemCollection.check_path(env, affected, "AffectedElement")
affected = SystemCollection.get_path()
elif ch.is_subclass(affected.namespace, sub=affected.classname,
- super=util.Configuration.get_instance().system_class_name):
+ super="CIM_ComputerSystem"):
ComputerSystem.check_path(env, affected, "AffectedElement")
affected = ComputerSystem.get_path()
elif ch.is_subclass(affected.namespace, sub=affected.classname,
diff --git a/src/software/lmi/software/core/ComputerSystem.py b/src/software/lmi/software/core/ComputerSystem.py
index 1a20058..30e03cf 100644
--- a/src/software/lmi/software/core/ComputerSystem.py
+++ b/src/software/lmi/software/core/ComputerSystem.py
@@ -49,7 +49,7 @@ def check_path(env, system, prop_name):
if not isinstance(system, pywbem.CIMInstanceName):
raise pywbem.CIMError(pywbem.CIM_ERR_INVALID_PARAMETER,
"\"%s\" must be a CIMInstanceName" % prop_name)
- our_system = get_path(prefix='CIM')
+ our_system = get_path()
ch = env.get_cimom_handle()
if system.namespace != our_system.namespace:
raise pywbem.CIMError(pywbem.CIM_ERR_NOT_FOUND,
@@ -57,7 +57,7 @@ def check_path(env, system, prop_name):
prop_name, our_system.namespace))
if not ch.is_subclass(our_system.namespace,
sub=system.classname,
- super=our_system.classname):
+ super="CIM_ComputerSystem"):
raise pywbem.CIMError(pywbem.CIM_ERR_NOT_FOUND,
"Class of \"%s\" must be a sublass of %s" % (
prop_name, our_system.classname))
@@ -66,7 +66,7 @@ def check_path(env, system, prop_name):
"\"%s\" is missing one of keys", prop_name)
if not ch.is_subclass(our_system.namespace,
sub=system['CreationClassName'],
- super=our_system.classname):
+ super="CIM_ComputerSystem"):
raise pywbem.CIMError(pywbem.CIM_ERR_NOT_FOUND,
"CreationClassName of \"%s\" must be a sublass of %s" % (
prop_name, our_system.classname))