summaryrefslogtreecommitdiffstats
path: root/src/software/openlmi/software/LMI_InstalledSoftwareIdentity.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/software/openlmi/software/LMI_InstalledSoftwareIdentity.py')
-rw-r--r--src/software/openlmi/software/LMI_InstalledSoftwareIdentity.py20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/software/openlmi/software/LMI_InstalledSoftwareIdentity.py b/src/software/openlmi/software/LMI_InstalledSoftwareIdentity.py
index b4c1b6f..b349afd 100644
--- a/src/software/openlmi/software/LMI_InstalledSoftwareIdentity.py
+++ b/src/software/openlmi/software/LMI_InstalledSoftwareIdentity.py
@@ -31,7 +31,7 @@ from pywbem.cim_provider2 import CIMProvider2
from openlmi.common import cmpi_logging
from openlmi.software.core import generate_references
from openlmi.software.core import ComputerSystem
-from openlmi.software.core import SoftwareIdentity
+from openlmi.software.core import Identity
from openlmi.software.yumdb import YumDB
@cmpi_logging.trace_function
@@ -48,7 +48,7 @@ def generate_system_referents(env, object_name, model, _keys_only):
model["System"] = ComputerSystem.get_path()
with YumDB.get_instance() as ydb:
for pkg_info in ydb.get_package_list('installed', sort=True):
- model["InstalledSoftware"] = SoftwareIdentity.pkg2model(
+ model["InstalledSoftware"] = Identity.pkg2model(
pkg_info, model=pkg_model)
yield model
@@ -57,8 +57,8 @@ def generate_package_referents(_env, object_name, model, _keys_only):
"""
Handler for referents enumeration request.
"""
- pkg_info = SoftwareIdentity.object_path2pkg(object_name, kind="installed")
- model['InstalledSoftware'] = SoftwareIdentity.pkg2model(pkg_info)
+ pkg_info = Identity.object_path2pkg(object_name, kind="installed")
+ model['InstalledSoftware'] = Identity.pkg2model(pkg_info)
model["System"] = ComputerSystem.get_path()
yield model
@@ -108,9 +108,9 @@ class LMI_InstalledSoftwareIdentity(CIMProvider2):
model["System"] = model.path["System"] = ComputerSystem.get_path()
with YumDB.get_instance():
- pkg_info = SoftwareIdentity.object_path2pkg(
+ pkg_info = Identity.object_path2pkg(
model['InstalledSoftware'], kind='installed')
- model['InstalledSoftware'] = SoftwareIdentity.pkg2model(pkg_info)
+ model['InstalledSoftware'] = Identity.pkg2model(pkg_info)
return model
@cmpi_logging.trace_method
@@ -147,7 +147,7 @@ class LMI_InstalledSoftwareIdentity(CIMProvider2):
with YumDB.get_instance() as yb:
pl = yb.get_package_list('installed', sort=True)
for pkg in pl:
- model['InstalledSoftware'] = SoftwareIdentity.pkg2model(
+ model['InstalledSoftware'] = Identity.pkg2model(
pkg, model=inst_model)
yield model
@@ -191,7 +191,7 @@ class LMI_InstalledSoftwareIdentity(CIMProvider2):
ComputerSystem.check_path_property(env, instance, 'System')
with YumDB.get_instance() as ydb:
- pkg_info = SoftwareIdentity.object_path2pkg(
+ pkg_info = Identity.object_path2pkg(
instance["InstalledSoftware"], kind="all")
if pkg_info.installed:
raise pywbem.CIMError(pywbem.CIM_ERR_ALREADY_EXISTS,
@@ -199,7 +199,7 @@ class LMI_InstalledSoftwareIdentity(CIMProvider2):
cmpi_logging.logger.info('installing package "%s"' % pkg_info)
installed = ydb.install_package(pkg_info)
cmpi_logging.logger.info('package "%s" installed' % pkg_info)
- instance["InstalledSoftware"] = SoftwareIdentity.pkg2model(installed)
+ instance["InstalledSoftware"] = Identity.pkg2model(installed)
return instance
@cmpi_logging.trace_method
@@ -232,7 +232,7 @@ class LMI_InstalledSoftwareIdentity(CIMProvider2):
ComputerSystem.check_path_property(env, instance_name, 'System')
with YumDB.get_instance() as ydb:
- pkg_info = SoftwareIdentity.object_path2pkg(
+ pkg_info = Identity.object_path2pkg(
instance_name["InstalledSoftware"], kind="installed")
cmpi_logging.logger.info('removing package "%s"' % pkg_info)
ydb.remove_package(pkg_info)