summaryrefslogtreecommitdiffstats
path: root/src/software
diff options
context:
space:
mode:
authorJan Safranek <jsafrane@redhat.com>2013-10-09 14:50:28 +0200
committerJan Safranek <jsafrane@redhat.com>2013-10-09 14:50:28 +0200
commit97f7d0cd33684ed88ea2ff80c578dbc8009f5000 (patch)
treeb9b7c9d5baf45ea5796ce19a599352917bfbd12c /src/software
parentd75505f629e290ae9feb647017e349a027921c41 (diff)
downloadopenlmi-providers-97f7d0cd33684ed88ea2ff80c578dbc8009f5000.tar.gz
openlmi-providers-97f7d0cd33684ed88ea2ff80c578dbc8009f5000.tar.xz
openlmi-providers-97f7d0cd33684ed88ea2ff80c578dbc8009f5000.zip
Use PG_ComputerSystem by default.
And get rid of sblim-cmpi-base dependency. It would be nice if our tests have an option to select Linux_ComputerSystem or PG_ComputerSystem in the future...
Diffstat (limited to 'src/software')
-rw-r--r--src/software/config/software.conf2
-rw-r--r--src/software/doc/admin/usage.rst16
-rw-r--r--src/software/lmi/software/core/AffectedSoftwareJobElement.py2
-rw-r--r--src/software/test/base.py2
-rwxr-xr-xsrc/software/test/test_hosted_software_collection.py6
-rwxr-xr-xsrc/software/test/test_hosted_software_identity_resource.py8
-rwxr-xr-xsrc/software/test/test_installed_software_identity.py6
-rwxr-xr-xsrc/software/test/test_resource_for_software_identity.py2
-rwxr-xr-xsrc/software/test/test_software_identity_file_check.py6
9 files changed, 25 insertions, 25 deletions
diff --git a/src/software/config/software.conf b/src/software/config/software.conf
index 91a809d..ad7a7cc 100644
--- a/src/software/config/software.conf
+++ b/src/software/config/software.conf
@@ -6,7 +6,7 @@
# To change the CIM class of ComputerSystem, which is associated to many
# software classes, uncomment the line below.
-#SystemClassName = Linux_ComputerSystem
+#SystemClassName = PG_ComputerSystem
[Yum]
# Number of seconds to wait before next try to lock yum package database. This
diff --git a/src/software/doc/admin/usage.rst b/src/software/doc/admin/usage.rst
index 0f5205d..42cc2cd 100644
--- a/src/software/doc/admin/usage.rst
+++ b/src/software/doc/admin/usage.rst
@@ -12,7 +12,7 @@ Simple
Simple but very slow way: ::
c = connect("host", "user", "pass")
- cs = c.root.cimv2.Linux_ComputerSystem.first_instance()
+ cs = c.root.cimv2.PG_ComputerSystem.first_instance()
for identity in cs.associators(
AssocClass="LMI_InstalledSoftwareIdentity",
Role="System",
@@ -21,7 +21,7 @@ Simple but very slow way: ::
print(identity.ElementName)
.. note::
- Here we use ``Linux_ComputerSystem`` as a class representing computer
+ Here we use ``PG_ComputerSystem`` as a class representing computer
system. It is part of ``sblim-cmpi-base`` package, which is obsoleted.
If you use *Pegasus* as your *CIMOM* you may safely switch to
``PG_ComputerSystem``.
@@ -185,7 +185,7 @@ with a reference to some available software identity. ::
c = connect("host", "user", "pass")
identity = c.root.cimv2.LMI_SoftwareIdentity.new_instance_name(
{"InstanceID" : "LMI:LMI_SoftwareIdentity:sblim-sfcb-0:1.3.16-3.fc19.x86_64"})
- cs = c.root.cimv2.Linux_ComputerSystem.first_instance_name()
+ cs = c.root.cimv2.PG_ComputerSystem.first_instance_name()
installed_assoc = c.root.cimv2.LMI_InstalledSoftwareIdentity.create_instance(
properties={
"InstalledSoftware" : identity.path,
@@ -210,7 +210,7 @@ at background. Please refer to `Asynchronous Jobs`_ for more details.
service = c.root.cimv2.LMI_SoftwareInstallationService.first_instance()
identity = c.root.cimv2.LMI_SoftwareIdentity.new_instance_name(
{"InstanceID" : "LMI:LMI_SoftwareIdentity:sblim-sfcb-0:1.3.16-5.fc19.x86_64"})
- cs = c.root.cimv2.Linux_ComputerSystem.first_instance_name()
+ cs = c.root.cimv2.PG_ComputerSystem.first_instance_name()
ret = service.InstallFromSoftwareIdentity(
Source=identity.path,
Target=cs.path,
@@ -284,7 +284,7 @@ This is also possible with: ::
c = connect("host", "user", "pass")
service = c.root.cimv2.LMI_SoftwareInstallationService.first_instance()
- cs = c.root.cimv2.Linux_ComputerSystem.first_instance_name()
+ cs = c.root.cimv2.PG_ComputerSystem.first_instance_name()
ret = service.to_instance().InstallFromSoftwareURI(
Source="http://someserver.com/fedora/repo/package.rpm",
Target=cs.path,
@@ -345,7 +345,7 @@ Asynchronous removal
service = c.root.cimv2.LMI_SoftwareInstallationService.first_instance()
identity = c.root.cimv2.LMI_SoftwareIdentity.new_instance_name(
{"InstanceID" : "LMI:LMI_SoftwareIdentity:sblim-sfcb-0:1.3.16-5.fc19.x86_64"})
- cs = c.root.cimv2.Linux_ComputerSystem.first_instance_name()
+ cs = c.root.cimv2.PG_ComputerSystem.first_instance_name()
ret = service.InstallFromSoftwareIdentity(
Source=identity.path,
Target=cs.path,
@@ -373,7 +373,7 @@ Example below shows the synchronous invocation of asynchronous method. ::
service = c.root.cimv2.LMI_SoftwareInstallationService.first_instance()
identity = c.root.cimv2.LMI_SoftwareIdentity.new_instance_name(
{"InstanceID" : "LMI:LMI_SoftwareIdentity:sblim-sfcb-0:1.3.16-5.fc19.x86_64"})
- cs = c.root.cimv2.Linux_ComputerSystem.first_instance_name()
+ cs = c.root.cimv2.PG_ComputerSystem.first_instance_name()
ret = service.SyncInstallFromSoftwareIdentity(
Source=identity.path,
Target=cs.path,
@@ -420,7 +420,7 @@ if we want to be able to list failed files.
{"InstanceID" : "LMI:LMI_SoftwareIdentity:sblim-sfcb-0:1.3.16-5.fc19.x86_64"})
results = service.VerifyInstalledIdentity(
Source=identity.path,
- Target=ns.Linux_ComputerSystem.first_instance().path)
+ Target=ns.PG_ComputerSystem.first_instance().path)
nevra = ( identity.path['InstanceId']
if isinstance(identity, LMIInstanceName)
else identity.InstanceId)[len('LMI:LMI_SoftwareIdentity:'):]
diff --git a/src/software/lmi/software/core/AffectedSoftwareJobElement.py b/src/software/lmi/software/core/AffectedSoftwareJobElement.py
index df4e123..9a0e370 100644
--- a/src/software/lmi/software/core/AffectedSoftwareJobElement.py
+++ b/src/software/lmi/software/core/AffectedSoftwareJobElement.py
@@ -125,7 +125,7 @@ def check_path(env, op):
else:
raise pywbem.CIMError(pywbem.CIM_ERR_INVALID_PARAMETER,
"Expected an instance of LMI_SoftwareIdentity,"
- " LMI_SystemSoftwareCollection or Linux_ComputerSystem.")
+ " LMI_SystemSoftwareCollection or CIM_ComputerSystem.")
return (job, affected)
@cmpi_logging.trace_function
diff --git a/src/software/test/base.py b/src/software/test/base.py
index e1adb2d..35e437a 100644
--- a/src/software/test/base.py
+++ b/src/software/test/base.py
@@ -150,7 +150,7 @@ class SoftwareBaseTestCase(unittest.TestCase): #pylint: disable=R0904
if "CreationClassName" in self.KEYS:
self.objpath["CreationClassName"] = self.CLASS_NAME
if "SystemCreationClassName" in self.KEYS:
- self.objpath["SystemCreationClassName"] = "Linux_ComputerSystem"
+ self.objpath["SystemCreationClassName"] = "PG_ComputerSystem"
def install_pkg(self, pkg, newer=True, repolist=None):
"""
diff --git a/src/software/test/test_hosted_software_collection.py b/src/software/test/test_hosted_software_collection.py
index e399b4a..6f4adc3 100755
--- a/src/software/test/test_hosted_software_collection.py
+++ b/src/software/test/test_hosted_software_collection.py
@@ -47,10 +47,10 @@ class TestHostedSoftwareCollection(base.SoftwareBaseTestCase):
"""
objpath = self.objpath.copy()
objpath["Antecedent"] = pywbem.CIMInstanceName(
- classname="Linux_ComputerSystem",
+ classname="PG_ComputerSystem",
namespace="root/cimv2",
keybindings=pywbem.NocaseDict({
- "CreationClassName" : "Linux_ComputerSystem",
+ "CreationClassName" : "PG_ComputerSystem",
"Name" : socket.getfqdn()
}))
objpath["Dependent"] = pywbem.CIMInstanceName(
@@ -145,7 +145,7 @@ class TestHostedSoftwareCollection(base.SoftwareBaseTestCase):
ObjectName=objpath["Dependent"],
Role="Dependent",
ResultRole="Antecedent",
- ResultClass="Linux_ComputerSystem")
+ ResultClass="PG_ComputerSystem")
self.assertEqual(1, len(refs))
ref = refs[0]
self.assertEqual(objpath["Antecedent"], ref)
diff --git a/src/software/test/test_hosted_software_identity_resource.py b/src/software/test/test_hosted_software_identity_resource.py
index 4771e9b..df4b11f 100755
--- a/src/software/test/test_hosted_software_identity_resource.py
+++ b/src/software/test/test_hosted_software_identity_resource.py
@@ -50,10 +50,10 @@ class TestHostedSoftwareIdentityResource(base.SoftwareBaseTestCase):
"""
objpath = self.objpath.copy()
objpath["Antecedent"] = pywbem.CIMInstanceName(
- classname="Linux_ComputerSystem",
+ classname="PG_ComputerSystem",
namespace="root/cimv2",
keybindings=pywbem.NocaseDict({
- "CreationClassName" : "Linux_ComputerSystem",
+ "CreationClassName" : "PG_ComputerSystem",
"Name" : socket.getfqdn()
}))
objpath["Dependent"] = pywbem.CIMInstanceName(
@@ -61,7 +61,7 @@ class TestHostedSoftwareIdentityResource(base.SoftwareBaseTestCase):
namespace="root/cimv2",
keybindings=pywbem.NocaseDict({
"CreationClassName" : "LMI_SoftwareIdentityResource",
- "SystemCreationClassName" : "Linux_ComputerSystem",
+ "SystemCreationClassName" : "PG_ComputerSystem",
"SystemName" : socket.getfqdn(),
"Name" : repo.repoid
}))
@@ -154,7 +154,7 @@ class TestHostedSoftwareIdentityResource(base.SoftwareBaseTestCase):
Role="Dependent",
ObjectName=objpath["Dependent"],
ResultRole="Antecedent",
- ResultClass="Linux_ComputerSystem")
+ ResultClass="PG_ComputerSystem")
self.assertEqual(len(refs), 1)
self.assertEqual(objpath["Antecedent"], refs[0])
diff --git a/src/software/test/test_installed_software_identity.py b/src/software/test/test_installed_software_identity.py
index 3ca3e05..31bbd1c 100755
--- a/src/software/test/test_installed_software_identity.py
+++ b/src/software/test/test_installed_software_identity.py
@@ -43,10 +43,10 @@ class TestInstalledSoftwareIdentity(base.SoftwareBaseTestCase):
"""
objpath = self.objpath.copy()
objpath["System"] = pywbem.CIMInstanceName(
- classname="Linux_ComputerSystem",
+ classname="PG_ComputerSystem",
namespace="root/cimv2",
keybindings=pywbem.NocaseDict({
- "CreationClassName" : "Linux_ComputerSystem",
+ "CreationClassName" : "PG_ComputerSystem",
"Name" : socket.getfqdn()
}))
objpath["InstalledSoftware"] = pywbem.CIMInstanceName(
@@ -238,7 +238,7 @@ class TestInstalledSoftwareIdentity(base.SoftwareBaseTestCase):
ObjectName=objpath["InstalledSoftware"],
Role="InstalledSoftware",
ResultRole="System",
- ResultClass="Linux_ComputerSystem")
+ ResultClass="PG_ComputerSystem")
self.assertEqual(len(refs), 1)
ref = refs[0]
self.assertEqual(objpath["System"], ref)
diff --git a/src/software/test/test_resource_for_software_identity.py b/src/software/test/test_resource_for_software_identity.py
index a2d1e7e..39bbfb2 100755
--- a/src/software/test/test_resource_for_software_identity.py
+++ b/src/software/test/test_resource_for_software_identity.py
@@ -50,7 +50,7 @@ class TestResourceForSoftwareIdentity(base.SoftwareBaseTestCase):
namespace="root/cimv2",
keybindings=pywbem.NocaseDict({
"CreationClassName" : "LMI_SoftwareIdentityResource",
- "SystemCreationClassName" : "Linux_ComputerSystem",
+ "SystemCreationClassName" : "PG_ComputerSystem",
"SystemName" : socket.getfqdn()
}))
if repo is not None:
diff --git a/src/software/test/test_software_identity_file_check.py b/src/software/test/test_software_identity_file_check.py
index 3242113..96e086d 100755
--- a/src/software/test/test_software_identity_file_check.py
+++ b/src/software/test/test_software_identity_file_check.py
@@ -371,9 +371,9 @@ class TestSoftwareIdentityFileCheck(
ObjectName=objpath,
TargetSystem=pywbem.CIMInstanceName(
namespace="root/cimv2",
- classname="Linux_ComputerSystem",
+ classname="PG_ComputerSystem",
keybindings=pywbem.NocaseDict({
- "CreationClassName" : "Linux_ComputerSystem",
+ "CreationClassName" : "PG_ComputerSystem",
"Name" : socket.getfqdn()})))
self.assertEqual(pywbem.Uint32(0), #Satisfied
@@ -386,7 +386,7 @@ class TestSoftwareIdentityFileCheck(
ObjectName=objpath,
TargetSystem=pywbem.CIMInstanceName(
namespace="root/cimv2",
- classname="Linux_ComputerSystem",
+ classname="PG_ComputerSystem",
keybindings=pywbem.NocaseDict({
"CreationClassName" : "Bad class name",
"Name" : "some random name"})))