diff options
Diffstat (limited to 'src/software/lmi/software/LMI_HostedSoftwareIdentityResource.py')
-rw-r--r-- | src/software/lmi/software/LMI_HostedSoftwareIdentityResource.py | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/software/lmi/software/LMI_HostedSoftwareIdentityResource.py b/src/software/lmi/software/LMI_HostedSoftwareIdentityResource.py index 767523a..1f2ce37 100644 --- a/src/software/lmi/software/LMI_HostedSoftwareIdentityResource.py +++ b/src/software/lmi/software/LMI_HostedSoftwareIdentityResource.py @@ -29,6 +29,7 @@ import pywbem from pywbem.cim_provider2 import CIMProvider2 from lmi.common import cmpi_logging +from lmi.software import util from lmi.software.core import generate_references from lmi.software.core import ComputerSystem from lmi.software.core import IdentityResource @@ -40,11 +41,8 @@ def generate_system_referents(env, object_name, model, _keys_only): Handler for referents enumeration request. """ ComputerSystem.check_path(env, object_name, "Antecedent") - repomodel = pywbem.CIMInstanceName( - classname='LMI_SoftwareIdentityResource', - namespace='root/cimv2', - host=model.path.host) - model["Antecedent"] = ComputerSystem.get_path() + repomodel = util.new_instance_name('LMI_SoftwareIdentityResource', + Antecedent=ComputerSystem.get_path()) for repo in YumDB.get_instance().get_repository_list('all'): model["Dependent"] = IdentityResource.repo2model(repo, model=repomodel) yield model @@ -147,9 +145,7 @@ class LMI_HostedSoftwareIdentityResource(CIMProvider2): repolist = YumDB.get_instance().get_repository_list('all') model["Antecedent"] = ComputerSystem.get_path() - repomodel = pywbem.CIMInstanceName( - classname='LMI_SoftwareIdentityResource', - namespace='root/cimv2') + repomodel = util.new_instance_name('LMI_SoftwareIdentityResource') for repo in repolist: model["Dependent"] = IdentityResource.repo2model( repo, model=repomodel) |