diff options
Diffstat (limited to 'src/software/lmi/software/LMI_MemberOfSoftwareCollection.py')
-rw-r--r-- | src/software/lmi/software/LMI_MemberOfSoftwareCollection.py | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/src/software/lmi/software/LMI_MemberOfSoftwareCollection.py b/src/software/lmi/software/LMI_MemberOfSoftwareCollection.py index f66f788..8011b37 100644 --- a/src/software/lmi/software/LMI_MemberOfSoftwareCollection.py +++ b/src/software/lmi/software/LMI_MemberOfSoftwareCollection.py @@ -25,6 +25,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 SystemCollection from lmi.software.core import Identity @@ -36,11 +37,8 @@ def generate_collection_referents(env, object_name, model, _keys_only): Handler for referents enumeration request. """ SystemCollection.check_path(env, object_name, "collection") - pkg_model = pywbem.CIMInstanceName( - classname='LMI_SoftwareIdentity', - namespace="root/cimv2", - host=model.path.host) - model["Collection"] = SystemCollection.get_path() + pkg_model = util.new_instance_name('LMI_SoftwareIdentity', + Collection=SystemCollection.get_path()) with YumDB.get_instance() as ydb: for pkg_info in ydb.get_package_list('available', allow_duplicates=True, sort=True): @@ -145,9 +143,7 @@ class LMI_MemberOfSoftwareCollection(CIMProvider2): model.path.update({'Member': None, 'Collection': None}) model['Collection'] = SystemCollection.get_path() - member_model = pywbem.CIMInstanceName( - classname="LMI_SoftwareIdentity", - namespace="root/cimv2") + member_model = util.new_instance_name("LMI_SoftwareIdentity") with YumDB.get_instance() as yb: pl = yb.get_package_list('available', allow_duplicates=True, |