summaryrefslogtreecommitdiffstats
path: root/src/software
diff options
context:
space:
mode:
authorMichal Minar <miminar@redhat.com>2013-03-20 13:50:42 +0100
committerMichal Minar <miminar@redhat.com>2013-03-20 13:50:42 +0100
commite3102c1da64230309d8da5f3740db9b493cb8db5 (patch)
tree698790e6bedcfb95802e355f1d21efb71b397aa0 /src/software
parentd0d3fb803114c070bd9b8f088025fbf7dba7fa02 (diff)
parentb5e14dcdb73d3b70131b9a602efd209488922a4e (diff)
downloadopenlmi-providers-e3102c1da64230309d8da5f3740db9b493cb8db5.tar.gz
openlmi-providers-e3102c1da64230309d8da5f3740db9b493cb8db5.tar.xz
openlmi-providers-e3102c1da64230309d8da5f3740db9b493cb8db5.zip
Merge remote-tracking branch 'origin/master' into software-smash
Conflicts: src/software/cli/software.py src/software/openlmi/__init__.py src/software/openlmi/software/LMI_HostedSoftwareIdentityResource.py src/software/openlmi/software/LMI_SoftwareFileCheck.py src/software/openlmi/software/LMI_SoftwareInstalledPackage.py src/software/openlmi/software/LMI_SoftwarePackage.py src/software/openlmi/software/__init__.py src/software/openlmi/software/cimom_entry.py src/software/openlmi/software/core/ComputerSystem.py src/software/openlmi/software/core/SoftwareFileCheck.py src/software/openlmi/software/core/SoftwareInstalledPackage.py src/software/openlmi/software/core/SoftwarePackage.py src/software/openlmi/software/core/SoftwarePackageChecks.py src/software/openlmi/software/core/__init__.py src/software/openlmi/software/util/__init__.py src/software/openlmi/software/yumdb/__init__.py src/software/openlmi/software/yumdb/errors.py src/software/openlmi/software/yumdb/jobs.py src/software/openlmi/software/yumdb/packagecheck.py src/software/openlmi/software/yumdb/packageinfo.py src/software/openlmi/software/yumdb/process.py src/software/test/base.py src/software/test/rpmcache.py src/software/test/run.py src/software/test/test_software_file_check.py src/software/test/test_software_installed_package.py src/software/test/test_software_package.py
Diffstat (limited to 'src/software')
-rwxr-xr-xsrc/software/cli/software.py4
-rw-r--r--src/software/openlmi/__init__.py2
-rw-r--r--src/software/openlmi/software/LMI_HostedSoftwareCollection.py108
-rw-r--r--src/software/openlmi/software/LMI_HostedSoftwareIdentityResource.py104
-rw-r--r--src/software/openlmi/software/LMI_InstalledSoftwareIdentity.py100
-rw-r--r--src/software/openlmi/software/LMI_MemberOfSoftwareCollection.py98
-rw-r--r--src/software/openlmi/software/LMI_ResourceForSoftwareIdentity.py102
-rw-r--r--src/software/openlmi/software/LMI_SoftwareIdentity.py58
-rw-r--r--src/software/openlmi/software/LMI_SoftwareIdentityResource.py86
-rw-r--r--src/software/openlmi/software/LMI_SoftwareInstallationJob.py128
-rw-r--r--src/software/openlmi/software/LMI_SoftwareInstallationService.py262
-rw-r--r--src/software/openlmi/software/LMI_SystemSoftwareCollection.py64
-rw-r--r--src/software/openlmi/software/__init__.py2
-rw-r--r--src/software/openlmi/software/cimom_entry.py2
-rw-r--r--src/software/openlmi/software/core/ComputerSystem.py2
-rw-r--r--src/software/openlmi/software/core/Error.py2
-rw-r--r--src/software/openlmi/software/core/Identity.py62
-rw-r--r--src/software/openlmi/software/core/IdentityResource.py2
-rw-r--r--src/software/openlmi/software/core/InstallationJob.py4
-rw-r--r--src/software/openlmi/software/core/InstallationService.py4
-rw-r--r--src/software/openlmi/software/core/SystemCollection.py2
-rw-r--r--src/software/openlmi/software/core/__init__.py2
-rw-r--r--src/software/openlmi/software/util/__init__.py4
-rw-r--r--src/software/openlmi/software/util/singletonmixin.py2
-rw-r--r--src/software/openlmi/software/yumdb/__init__.py10
-rw-r--r--src/software/openlmi/software/yumdb/errors.py2
-rw-r--r--src/software/openlmi/software/yumdb/jobmanager.py2
-rw-r--r--src/software/openlmi/software/yumdb/jobs.py10
-rw-r--r--src/software/openlmi/software/yumdb/packagecheck.py2
-rw-r--r--src/software/openlmi/software/yumdb/packageinfo.py4
-rw-r--r--src/software/openlmi/software/yumdb/process.py10
-rw-r--r--src/software/openlmi/software/yumdb/repository.py4
-rw-r--r--src/software/test/base.py2
-rw-r--r--src/software/test/package.py2
-rw-r--r--src/software/test/repository.py2
-rw-r--r--src/software/test/rpmcache.py6
-rwxr-xr-xsrc/software/test/run.py2
-rwxr-xr-xsrc/software/test/test_hosted_software_collection.py2
-rwxr-xr-xsrc/software/test/test_hosted_software_identity_resource.py2
-rwxr-xr-xsrc/software/test/test_installed_software_identity.py4
-rwxr-xr-xsrc/software/test/test_member_of_software_collection.py2
-rwxr-xr-xsrc/software/test/test_resource_for_software_identity.py2
-rwxr-xr-xsrc/software/test/test_software_identity.py2
-rwxr-xr-xsrc/software/test/test_software_identity_resource.py2
-rwxr-xr-xsrc/software/test/test_system_software_collection.py2
-rw-r--r--src/software/test/util.py2
46 files changed, 642 insertions, 642 deletions
diff --git a/src/software/cli/software.py b/src/software/cli/software.py
index 39c9f7d..55c3592 100755
--- a/src/software/cli/software.py
+++ b/src/software/cli/software.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Copyright (C) 2013 Red Hat, Inc. All rights reserved.
+# Copyright (C) 2012-2013 Red Hat, Inc. All rights reserved.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
@@ -209,7 +209,7 @@ def main(args):
if args.debug:
sys.stderr.write('url:\t%s\n'%args.url)
conn = pywbem.WBEMConnection(args.url, auth)
-
+
if args.command == 'list':
func, attrs = \
{ 'available' : (list_available, tuple())
diff --git a/src/software/openlmi/__init__.py b/src/software/openlmi/__init__.py
index 4a016e8..aa4170a 100644
--- a/src/software/openlmi/__init__.py
+++ b/src/software/openlmi/__init__.py
@@ -1,6 +1,6 @@
# Software Management Providers
#
-# Copyright (C) 2013 Red Hat, Inc. All rights reserved.
+# Copyright (C) 2012-2013 Red Hat, Inc. All rights reserved.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
diff --git a/src/software/openlmi/software/LMI_HostedSoftwareCollection.py b/src/software/openlmi/software/LMI_HostedSoftwareCollection.py
index c49ec13..113ce7c 100644
--- a/src/software/openlmi/software/LMI_HostedSoftwareCollection.py
+++ b/src/software/openlmi/software/LMI_HostedSoftwareCollection.py
@@ -1,6 +1,6 @@
# Software Management Providers
#
-# Copyright (C) 2013 Red Hat, Inc. All rights reserved.
+# Copyright (C) 2012-2013 Red Hat, Inc. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -28,13 +28,13 @@ from openlmi.common import cmpi_logging
from openlmi.software.core import ComputerSystem, SystemCollection
class LMI_HostedSoftwareCollection(CIMProvider2):
- """Instrument the CIM class LMI_HostedSoftwareCollection
+ """Instrument the CIM class LMI_HostedSoftwareCollection
HostedSoftwareCollection defines a SystemSpecificCollection in the context of a
scoping System. It represents a Collection that has meaning only in
the context of a System, a Collection whose elements are restricted by
the definition of the System, or both of these types of Collections.
-
+
"""
def __init__ (self, _env):
@@ -47,19 +47,19 @@ class LMI_HostedSoftwareCollection(CIMProvider2):
Keyword arguments:
env -- Provider Environment (pycimmb.ProviderEnvironment)
- model -- A template of the pywbem.CIMInstance to be returned. The
- key properties are set on this instance to correspond to the
+ model -- A template of the pywbem.CIMInstance to be returned. The
+ key properties are set on this instance to correspond to the
instanceName that was requested. The properties of the model
- are already filtered according to the PropertyList from the
+ are already filtered according to the PropertyList from the
request. Only properties present in the model need to be
- given values. If you prefer, you can set all of the
- values, and the instance will be filtered for you.
+ given values. If you prefer, you can set all of the
+ values, and the instance will be filtered for you.
Possible Errors:
CIM_ERR_ACCESS_DENIED
- CIM_ERR_INVALID_PARAMETER (including missing, duplicate, unrecognized
+ CIM_ERR_INVALID_PARAMETER (including missing, duplicate, unrecognized
or otherwise incorrect parameters)
- CIM_ERR_NOT_FOUND (the CIM Class does exist, but the requested CIM
+ CIM_ERR_NOT_FOUND (the CIM Class does exist, but the requested CIM
Instance does not exist in the specified namespace)
CIM_ERR_FAILED (some other unspecified error occurred)
@@ -83,17 +83,17 @@ class LMI_HostedSoftwareCollection(CIMProvider2):
"""Enumerate instances.
The WBEM operations EnumerateInstances and EnumerateInstanceNames
- are both mapped to this method.
+ are both mapped to this method.
This method is a python generator
Keyword arguments:
env -- Provider Environment (pycimmb.ProviderEnvironment)
- model -- A template of the pywbem.CIMInstances to be generated.
- The properties of the model are already filtered according to
- the PropertyList from the request. Only properties present in
- the model need to be given values. If you prefer, you can
- always set all of the values, and the instance will be filtered
- for you.
+ model -- A template of the pywbem.CIMInstances to be generated.
+ The properties of the model are already filtered according to
+ the PropertyList from the request. Only properties present in
+ the model need to be given values. If you prefer, you can
+ always set all of the values, and the instance will be filtered
+ for you.
keys_only -- A boolean. True if only the key properties should be
set on the generated instances.
@@ -103,12 +103,12 @@ class LMI_HostedSoftwareCollection(CIMProvider2):
"""
# Prime model.path with knowledge of the keys, so key values on
# the CIMInstanceName (model.path) will automatically be set when
- # we set property values on the model.
+ # we set property values on the model.
model.path.update({'Dependent': None, 'Antecedent': None})
-
+
model["Antecedent"] = ComputerSystem.get_path()
model["Dependent"] = SystemCollection.get_path()
-
+
yield model
@@ -118,22 +118,22 @@ class LMI_HostedSoftwareCollection(CIMProvider2):
Keyword arguments:
env -- Provider Environment (pycimmb.ProviderEnvironment)
- instance -- The new pywbem.CIMInstance. If modifying an existing
- instance, the properties on this instance have been filtered by
+ instance -- The new pywbem.CIMInstance. If modifying an existing
+ instance, the properties on this instance have been filtered by
the PropertyList from the request.
modify_existing -- True if ModifyInstance, False if CreateInstance
- Return the new instance. The keys must be set on the new instance.
+ Return the new instance. The keys must be set on the new instance.
Possible Errors:
CIM_ERR_ACCESS_DENIED
CIM_ERR_NOT_SUPPORTED
- CIM_ERR_INVALID_PARAMETER (including missing, duplicate, unrecognized
+ CIM_ERR_INVALID_PARAMETER (including missing, duplicate, unrecognized
or otherwise incorrect parameters)
- CIM_ERR_ALREADY_EXISTS (the CIM Instance already exists -- only
+ CIM_ERR_ALREADY_EXISTS (the CIM Instance already exists -- only
valid if modify_existing is False, indicating that the operation
was CreateInstance)
- CIM_ERR_NOT_FOUND (the CIM Instance does not exist -- only valid
+ CIM_ERR_NOT_FOUND (the CIM Instance does not exist -- only valid
if modify_existing is True, indicating that the operation
was ModifyInstance)
CIM_ERR_FAILED (some other unspecified error occurred)
@@ -147,61 +147,61 @@ class LMI_HostedSoftwareCollection(CIMProvider2):
Keyword arguments:
env -- Provider Environment (pycimmb.ProviderEnvironment)
- instance_name -- A pywbem.CIMInstanceName specifying the instance
+ instance_name -- A pywbem.CIMInstanceName specifying the instance
to delete.
Possible Errors:
CIM_ERR_ACCESS_DENIED
CIM_ERR_NOT_SUPPORTED
CIM_ERR_INVALID_NAMESPACE
- CIM_ERR_INVALID_PARAMETER (including missing, duplicate, unrecognized
+ CIM_ERR_INVALID_PARAMETER (including missing, duplicate, unrecognized
or otherwise incorrect parameters)
- CIM_ERR_INVALID_CLASS (the CIM Class does not exist in the specified
+ CIM_ERR_INVALID_CLASS (the CIM Class does not exist in the specified
namespace)
- CIM_ERR_NOT_FOUND (the CIM Class does exist, but the requested CIM
+ CIM_ERR_NOT_FOUND (the CIM Class does exist, but the requested CIM
Instance does not exist in the specified namespace)
CIM_ERR_FAILED (some other unspecified error occurred)
- """
+ """
raise pywbem.CIMError(pywbem.CIM_ERR_NOT_SUPPORTED)
-
+
@cmpi_logging.trace_method
def references(self, env, object_name, model, result_class_name, role,
result_role, keys_only):
"""Instrument Associations.
- All four association-related operations (Associators, AssociatorNames,
- References, ReferenceNames) are mapped to this method.
+ All four association-related operations (Associators, AssociatorNames,
+ References, ReferenceNames) are mapped to this method.
This method is a python generator
Keyword arguments:
env -- Provider Environment (pycimmb.ProviderEnvironment)
- object_name -- A pywbem.CIMInstanceName that defines the source
+ object_name -- A pywbem.CIMInstanceName that defines the source
CIM Object whose associated Objects are to be returned.
model -- A template pywbem.CIMInstance to serve as a model
of the objects to be returned. Only properties present on this
- model need to be set.
- result_class_name -- If not empty, this string acts as a filter on
- the returned set of Instances by mandating that each returned
- Instances MUST represent an association between object_name
+ model need to be set.
+ result_class_name -- If not empty, this string acts as a filter on
+ the returned set of Instances by mandating that each returned
+ Instances MUST represent an association between object_name
and an Instance of a Class whose name matches this parameter
- or a subclass.
- role -- If not empty, MUST be a valid Property name. It acts as a
- filter on the returned set of Instances by mandating that each
- returned Instance MUST refer to object_name via a Property
+ or a subclass.
+ role -- If not empty, MUST be a valid Property name. It acts as a
+ filter on the returned set of Instances by mandating that each
+ returned Instance MUST refer to object_name via a Property
whose name matches the value of this parameter.
- result_role -- If not empty, MUST be a valid Property name. It acts
- as a filter on the returned set of Instances by mandating that
- each returned Instance MUST represent associations of
- object_name to other Instances, where the other Instances play
- the specified result_role in the association (i.e. the
- name of the Property in the Association Class that refers to
- the Object related to object_name MUST match the value of this
+ result_role -- If not empty, MUST be a valid Property name. It acts
+ as a filter on the returned set of Instances by mandating that
+ each returned Instance MUST represent associations of
+ object_name to other Instances, where the other Instances play
+ the specified result_role in the association (i.e. the
+ name of the Property in the Association Class that refers to
+ the Object related to object_name MUST match the value of this
parameter).
keys_only -- A boolean. True if only the key properties should be
set on the generated instances.
- The following diagram may be helpful in understanding the role,
+ The following diagram may be helpful in understanding the role,
result_role, and result_class_name parameters.
+------------------------+ +-------------------+
| object_name.classname | | result_class_name |
@@ -219,15 +219,15 @@ class LMI_HostedSoftwareCollection(CIMProvider2):
CIM_ERR_ACCESS_DENIED
CIM_ERR_NOT_SUPPORTED
CIM_ERR_INVALID_NAMESPACE
- CIM_ERR_INVALID_PARAMETER (including missing, duplicate, unrecognized
+ CIM_ERR_INVALID_PARAMETER (including missing, duplicate, unrecognized
or otherwise incorrect parameters)
CIM_ERR_FAILED (some other unspecified error occurred)
"""
ch = env.get_cimom_handle()
- # If you want to get references for free, implemented in terms
+ # If you want to get references for free, implemented in terms
# of enum_instances, just leave the code below unaltered.
- if ch.is_subclass(object_name.namespace,
+ if ch.is_subclass(object_name.namespace,
sub=object_name.classname,
super='CIM_SystemSpecificCollection') or \
ch.is_subclass(object_name.namespace,
diff --git a/src/software/openlmi/software/LMI_HostedSoftwareIdentityResource.py b/src/software/openlmi/software/LMI_HostedSoftwareIdentityResource.py
index 89ef382..d6e07b0 100644
--- a/src/software/openlmi/software/LMI_HostedSoftwareIdentityResource.py
+++ b/src/software/openlmi/software/LMI_HostedSoftwareIdentityResource.py
@@ -1,6 +1,6 @@
# Software Management Providers
#
-# Copyright (C) 2013 Red Hat, Inc. All rights reserved.
+# Copyright (C) 2012-2013 Red Hat, Inc. All rights reserved.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
@@ -61,7 +61,7 @@ def generate_repository_referents(env, object_name, model, _keys_only):
yield model
class LMI_HostedSoftwareIdentityResource(CIMProvider2):
- """Instrument the CIM class LMI_HostedSoftwareIdentityResource
+ """Instrument the CIM class LMI_HostedSoftwareIdentityResource
CIM_HostedAccessPoint is an association between a Service AccessPoint
and the System on which it is provided. The cardinality of this
@@ -70,7 +70,7 @@ class LMI_HostedSoftwareIdentityResource(CIMProvider2):
implementation of the ServiceAccessPoint is modeled, it must be
implemented by a Device or SoftwareFeature that is part of the System
that is hosting the ServiceAccessPoint.
-
+
"""
def __init__ (self, _env):
@@ -83,19 +83,19 @@ class LMI_HostedSoftwareIdentityResource(CIMProvider2):
Keyword arguments:
env -- Provider Environment (pycimmb.ProviderEnvironment)
- model -- A template of the pywbem.CIMInstance to be returned. The
- key properties are set on this instance to correspond to the
+ model -- A template of the pywbem.CIMInstance to be returned. The
+ key properties are set on this instance to correspond to the
instanceName that was requested. The properties of the model
- are already filtered according to the PropertyList from the
+ are already filtered according to the PropertyList from the
request. Only properties present in the model need to be
- given values. If you prefer, you can set all of the
- values, and the instance will be filtered for you.
+ given values. If you prefer, you can set all of the
+ values, and the instance will be filtered for you.
Possible Errors:
CIM_ERR_ACCESS_DENIED
- CIM_ERR_INVALID_PARAMETER (including missing, duplicate, unrecognized
+ CIM_ERR_INVALID_PARAMETER (including missing, duplicate, unrecognized
or otherwise incorrect parameters)
- CIM_ERR_NOT_FOUND (the CIM Class does exist, but the requested CIM
+ CIM_ERR_NOT_FOUND (the CIM Class does exist, but the requested CIM
Instance does not exist in the specified namespace)
CIM_ERR_FAILED (some other unspecified error occurred)
@@ -121,17 +121,17 @@ class LMI_HostedSoftwareIdentityResource(CIMProvider2):
"""Enumerate instances.
The WBEM operations EnumerateInstances and EnumerateInstanceNames
- are both mapped to this method.
+ are both mapped to this method.
This method is a python generator
Keyword arguments:
env -- Provider Environment (pycimmb.ProviderEnvironment)
- model -- A template of the pywbem.CIMInstances to be generated.
- The properties of the model are already filtered according to
- the PropertyList from the request. Only properties present in
- the model need to be given values. If you prefer, you can
- always set all of the values, and the instance will be filtered
- for you.
+ model -- A template of the pywbem.CIMInstances to be generated.
+ The properties of the model are already filtered according to
+ the PropertyList from the request. Only properties present in
+ the model need to be given values. If you prefer, you can
+ always set all of the values, and the instance will be filtered
+ for you.
keys_only -- A boolean. True if only the key properties should be
set on the generated instances.
@@ -139,12 +139,12 @@ class LMI_HostedSoftwareIdentityResource(CIMProvider2):
CIM_ERR_FAILED (some other unspecified error occurred)
"""
-
+
# Prime model.path with knowledge of the keys, so key values on
# the CIMInstanceName (model.path) will automatically be set when
- # we set property values on the model.
+ # we set property values on the model.
model.path.update({'Dependent': None, 'Antecedent': None})
-
+
repolist = YumDB.get_instance().get_repository_list('all')
model["Antecedent"] = ComputerSystem.get_path()
repomodel = pywbem.CIMInstanceName(
@@ -161,22 +161,22 @@ class LMI_HostedSoftwareIdentityResource(CIMProvider2):
Keyword arguments:
env -- Provider Environment (pycimmb.ProviderEnvironment)
- instance -- The new pywbem.CIMInstance. If modifying an existing
- instance, the properties on this instance have been filtered by
+ instance -- The new pywbem.CIMInstance. If modifying an existing
+ instance, the properties on this instance have been filtered by
the PropertyList from the request.
modify_existing -- True if ModifyInstance, False if CreateInstance
- Return the new instance. The keys must be set on the new instance.
+ Return the new instance. The keys must be set on the new instance.
Possible Errors:
CIM_ERR_ACCESS_DENIED
CIM_ERR_NOT_SUPPORTED
- CIM_ERR_INVALID_PARAMETER (including missing, duplicate, unrecognized
+ CIM_ERR_INVALID_PARAMETER (including missing, duplicate, unrecognized
or otherwise incorrect parameters)
- CIM_ERR_ALREADY_EXISTS (the CIM Instance already exists -- only
+ CIM_ERR_ALREADY_EXISTS (the CIM Instance already exists -- only
valid if modify_existing is False, indicating that the operation
was CreateInstance)
- CIM_ERR_NOT_FOUND (the CIM Instance does not exist -- only valid
+ CIM_ERR_NOT_FOUND (the CIM Instance does not exist -- only valid
if modify_existing is True, indicating that the operation
was ModifyInstance)
CIM_ERR_FAILED (some other unspecified error occurred)
@@ -191,61 +191,61 @@ class LMI_HostedSoftwareIdentityResource(CIMProvider2):
Keyword arguments:
env -- Provider Environment (pycimmb.ProviderEnvironment)
- instance_name -- A pywbem.CIMInstanceName specifying the instance
+ instance_name -- A pywbem.CIMInstanceName specifying the instance
to delete.
Possible Errors:
CIM_ERR_ACCESS_DENIED
CIM_ERR_NOT_SUPPORTED
CIM_ERR_INVALID_NAMESPACE
- CIM_ERR_INVALID_PARAMETER (including missing, duplicate, unrecognized
+ CIM_ERR_INVALID_PARAMETER (including missing, duplicate, unrecognized
or otherwise incorrect parameters)
- CIM_ERR_INVALID_CLASS (the CIM Class does not exist in the specified
+ CIM_ERR_INVALID_CLASS (the CIM Class does not exist in the specified
namespace)
- CIM_ERR_NOT_FOUND (the CIM Class does exist, but the requested CIM
+ CIM_ERR_NOT_FOUND (the CIM Class does exist, but the requested CIM
Instance does not exist in the specified namespace)
CIM_ERR_FAILED (some other unspecified error occurred)
- """
+ """
raise pywbem.CIMError(pywbem.CIM_ERR_NOT_SUPPORTED)
-
+
@cmpi_logging.trace_method
def references(self, env, object_name, model, result_class_name, role,
result_role, keys_only):
"""Instrument Associations.
- All four association-related operations (Associators, AssociatorNames,
- References, ReferenceNames) are mapped to this method.
+ All four association-related operations (Associators, AssociatorNames,
+ References, ReferenceNames) are mapped to this method.
This method is a python generator
Keyword arguments:
env -- Provider Environment (pycimmb.ProviderEnvironment)
- object_name -- A pywbem.CIMInstanceName that defines the source
+ object_name -- A pywbem.CIMInstanceName that defines the source
CIM Object whose associated Objects are to be returned.
model -- A template pywbem.CIMInstance to serve as a model
of the objects to be returned. Only properties present on this
- model need to be set.
- result_class_name -- If not empty, this string acts as a filter on
- the returned set of Instances by mandating that each returned
- Instances MUST represent an association between object_name
+ model need to be set.
+ result_class_name -- If not empty, this string acts as a filter on
+ the returned set of Instances by mandating that each returned
+ Instances MUST represent an association between object_name
and an Instance of a Class whose name matches this parameter
- or a subclass.
- role -- If not empty, MUST be a valid Property name. It acts as a
- filter on the returned set of Instances by mandating that each
- returned Instance MUST refer to object_name via a Property
+ or a subclass.
+ role -- If not empty, MUST be a valid Property name. It acts as a
+ filter on the returned set of Instances by mandating that each
+ returned Instance MUST refer to object_name via a Property
whose name matches the value of this parameter.
- result_role -- If not empty, MUST be a valid Property name. It acts
- as a filter on the returned set of Instances by mandating that
- each returned Instance MUST represent associations of
- object_name to other Instances, where the other Instances play
- the specified result_role in the association (i.e. the
- name of the Property in the Association Class that refers to
- the Object related to object_name MUST match the value of this
+ result_role -- If not empty, MUST be a valid Property name. It acts
+ as a filter on the returned set of Instances by mandating that
+ each returned Instance MUST represent associations of
+ object_name to other Instances, where the other Instances play
+ the specified result_role in the association (i.e. the
+ name of the Property in the Association Class that refers to
+ the Object related to object_name MUST match the value of this
parameter).
keys_only -- A boolean. True if only the key properties should be
set on the generated instances.
- The following diagram may be helpful in understanding the role,
+ The following diagram may be helpful in understanding the role,
result_role, and result_class_name parameters.
+------------------------+ +-------------------+
| object_name.classname | | result_class_name |
@@ -263,7 +263,7 @@ class LMI_HostedSoftwareIdentityResource(CIMProvider2):
CIM_ERR_ACCESS_DENIED
CIM_ERR_NOT_SUPPORTED
CIM_ERR_INVALID_NAMESPACE
- CIM_ERR_INVALID_PARAMETER (including missing, duplicate, unrecognized
+ CIM_ERR_INVALID_PARAMETER (including missing, duplicate, unrecognized
or otherwise incorrect parameters)
CIM_ERR_FAILED (some other unspecified error occurred)
diff --git a/src/software/openlmi/software/LMI_InstalledSoftwareIdentity.py b/src/software/openlmi/software/LMI_InstalledSoftwareIdentity.py
index a0bfa7a..ab4fbea 100644
--- a/src/software/openlmi/software/LMI_InstalledSoftwareIdentity.py
+++ b/src/software/openlmi/software/LMI_InstalledSoftwareIdentity.py
@@ -1,6 +1,6 @@
# Software Management Providers
#
-# Copyright (C) 2013 Red Hat, Inc. All rights reserved.
+# Copyright (C) 2012-2013 Red Hat, Inc. All rights reserved.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
@@ -63,14 +63,14 @@ def generate_package_referents(_env, object_name, model, _keys_only):
yield model
class LMI_InstalledSoftwareIdentity(CIMProvider2):
- """Instrument the CIM class LMI_InstalledSoftwareIdentity
+ """Instrument the CIM class LMI_InstalledSoftwareIdentity
The InstalledSoftwareIdentity association identifies the System on
which a SoftwareIdentity is installed. This class is a corollary to
InstalledSoftwareElement, but deals with the asset aspects of software
(as indicated by SoftwareIdentity), versus the deployment aspects (as
indicated by SoftwareElement).
-
+
"""
def __init__ (self, _env):
@@ -83,19 +83,19 @@ class LMI_InstalledSoftwareIdentity(CIMProvider2):
Keyword arguments:
env -- Provider Environment (pycimmb.ProviderEnvironment)
- model -- A template of the pywbem.CIMInstance to be returned. The
- key properties are set on this instance to correspond to the
+ model -- A template of the pywbem.CIMInstance to be returned. The
+ key properties are set on this instance to correspond to the
instanceName that was requested. The properties of the model
- are already filtered according to the PropertyList from the
+ are already filtered according to the PropertyList from the
request. Only properties present in the model need to be
- given values. If you prefer, you can set all of the
- values, and the instance will be filtered for you.
+ given values. If you prefer, you can set all of the
+ values, and the instance will be filtered for you.
Possible Errors:
CIM_ERR_ACCESS_DENIED
- CIM_ERR_INVALID_PARAMETER (including missing, duplicate, unrecognized
+ CIM_ERR_INVALID_PARAMETER (including missing, duplicate, unrecognized
or otherwise incorrect parameters)
- CIM_ERR_NOT_FOUND (the CIM Class does exist, but the requested CIM
+ CIM_ERR_NOT_FOUND (the CIM Class does exist, but the requested CIM
Instance does not exist in the specified namespace)
CIM_ERR_FAILED (some other unspecified error occurred)
@@ -118,17 +118,17 @@ class LMI_InstalledSoftwareIdentity(CIMProvider2):
"""Enumerate instances.
The WBEM operations EnumerateInstances and EnumerateInstanceNames
- are both mapped to this method.
+ are both mapped to this method.
This method is a python generator
Keyword arguments:
env -- Provider Environment (pycimmb.ProviderEnvironment)
- model -- A template of the pywbem.CIMInstances to be generated.
- The properties of the model are already filtered according to
- the PropertyList from the request. Only properties present in
- the model need to be given values. If you prefer, you can
- always set all of the values, and the instance will be filtered
- for you.
+ model -- A template of the pywbem.CIMInstances to be generated.
+ The properties of the model are already filtered according to
+ the PropertyList from the request. Only properties present in
+ the model need to be given values. If you prefer, you can
+ always set all of the values, and the instance will be filtered
+ for you.
keys_only -- A boolean. True if only the key properties should be
set on the generated instances.
@@ -137,7 +137,7 @@ class LMI_InstalledSoftwareIdentity(CIMProvider2):
"""
# Prime model.path with knowledge of the keys, so key values on
# the CIMInstanceName (model.path) will automatically be set when
- # we set property values on the model.
+ # we set property values on the model.
model.path.update({'InstalledSoftware': None, 'System': None})
model['System'] = ComputerSystem.get_path()
@@ -157,22 +157,22 @@ class LMI_InstalledSoftwareIdentity(CIMProvider2):
Keyword arguments:
env -- Provider Environment (pycimmb.ProviderEnvironment)
- instance -- The new pywbem.CIMInstance. If modifying an existing
- instance, the properties on this instance have been filtered by
+ instance -- The new pywbem.CIMInstance. If modifying an existing
+ instance, the properties on this instance have been filtered by
the PropertyList from the request.
modify_existing -- True if ModifyInstance, False if CreateInstance
- Return the new instance. The keys must be set on the new instance.
+ Return the new instance. The keys must be set on the new instance.
Possible Errors:
CIM_ERR_ACCESS_DENIED
CIM_ERR_NOT_SUPPORTED
- CIM_ERR_INVALID_PARAMETER (including missing, duplicate, unrecognized
+ CIM_ERR_INVALID_PARAMETER (including missing, duplicate, unrecognized
or otherwise incorrect parameters)
- CIM_ERR_ALREADY_EXISTS (the CIM Instance already exists -- only
+ CIM_ERR_ALREADY_EXISTS (the CIM Instance already exists -- only
valid if modify_existing is False, indicating that the operation
was CreateInstance)
- CIM_ERR_NOT_FOUND (the CIM Instance does not exist -- only valid
+ CIM_ERR_NOT_FOUND (the CIM Instance does not exist -- only valid
if modify_existing is True, indicating that the operation
was ModifyInstance)
CIM_ERR_FAILED (some other unspecified error occurred)
@@ -208,21 +208,21 @@ class LMI_InstalledSoftwareIdentity(CIMProvider2):
Keyword arguments:
env -- Provider Environment (pycimmb.ProviderEnvironment)
- instance_name -- A pywbem.CIMInstanceName specifying the instance
+ instance_name -- A pywbem.CIMInstanceName specifying the instance
to delete.
Possible Errors:
CIM_ERR_ACCESS_DENIED
CIM_ERR_NOT_SUPPORTED
CIM_ERR_INVALID_NAMESPACE
- CIM_ERR_INVALID_PARAMETER (including missing, duplicate, unrecognized
+ CIM_ERR_INVALID_PARAMETER (including missing, duplicate, unrecognized
or otherwise incorrect parameters)
- CIM_ERR_INVALID_CLASS (the CIM Class does not exist in the specified
+ CIM_ERR_INVALID_CLASS (the CIM Class does not exist in the specified
namespace)
- CIM_ERR_NOT_FOUND (the CIM Class does exist, but the requested CIM
+ CIM_ERR_NOT_FOUND (the CIM Class does exist, but the requested CIM
Instance does not exist in the specified namespace)
CIM_ERR_FAILED (some other unspecified error occurred)
- """
+ """
if not "InstalledSoftware" in instance_name:
raise pywbem.CIMError(pywbem.CIM_ERR_INVALID_PARAMETER,
"Missing InstalledSoftware property.")
@@ -243,38 +243,38 @@ class LMI_InstalledSoftwareIdentity(CIMProvider2):
result_role, keys_only):
"""Instrument Associations.
- All four association-related operations (Associators, AssociatorNames,
- References, ReferenceNames) are mapped to this method.
+ All four association-related operations (Associators, AssociatorNames,
+ References, ReferenceNames) are mapped to this method.
This method is a python generator
Keyword arguments:
env -- Provider Environment (pycimmb.ProviderEnvironment)
- object_name -- A pywbem.CIMInstanceName that defines the source
+ object_name -- A pywbem.CIMInstanceName that defines the source
CIM Object whose associated Objects are to be returned.
model -- A template pywbem.CIMInstance to serve as a model
of the objects to be returned. Only properties present on this
- model need to be set.
- result_class_name -- If not empty, this string acts as a filter on
- the returned set of Instances by mandating that each returned
- Instances MUST represent an association between object_name
+ model need to be set.
+ result_class_name -- If not empty, this string acts as a filter on
+ the returned set of Instances by mandating that each returned
+ Instances MUST represent an association between object_name
and an Instance of a Class whose name matches this parameter
- or a subclass.
- role -- If not empty, MUST be a valid Property name. It acts as a
- filter on the returned set of Instances by mandating that each
- returned Instance MUST refer to object_name via a Property
+ or a subclass.
+ role -- If not empty, MUST be a valid Property name. It acts as a
+ filter on the returned set of Instances by mandating that each
+ returned Instance MUST refer to object_name via a Property
whose name matches the value of this parameter.
- result_role -- If not empty, MUST be a valid Property name. It acts
- as a filter on the returned set of Instances by mandating that
- each returned Instance MUST represent associations of
- object_name to other Instances, where the other Instances play
- the specified result_role in the association (i.e. the
- name of the Property in the Association Class that refers to
- the Object related to object_name MUST match the value of this
+ result_role -- If not empty, MUST be a valid Property name. It acts
+ as a filter on the returned set of Instances by mandating that
+ each returned Instance MUST represent associations of
+ object_name to other Instances, where the other Instances play
+ the specified result_role in the association (i.e. the
+ name of the Property in the Association Class that refers to
+ the Object related to object_name MUST match the value of this
parameter).
keys_only -- A boolean. True if only the key properties should be
set on the generated instances.
- The following diagram may be helpful in understanding the role,
+ The following diagram may be helpful in understanding the role,
result_role, and result_class_name parameters.
+------------------------+ +-------------------+
| object_name.classname | | result_class_name |
@@ -292,7 +292,7 @@ class LMI_InstalledSoftwareIdentity(CIMProvider2):
CIM_ERR_ACCESS_DENIED
CIM_ERR_NOT_SUPPORTED
CIM_ERR_INVALID_NAMESPACE
- CIM_ERR_INVALID_PARAMETER (including missing, duplicate, unrecognized
+ CIM_ERR_INVALID_PARAMETER (including missing, duplicate, unrecognized
or otherwise incorrect parameters)
CIM_ERR_FAILED (some other unspecified error occurred)
@@ -302,7 +302,7 @@ class LMI_InstalledSoftwareIdentity(CIMProvider2):
("InstalledSoftware", "LMI_SoftwareIdentity",
generate_package_referents)
]
-
+
for ref in generate_references(env, object_name, model,
result_class_name, role, result_role, keys_only, handlers):
yield ref
diff --git a/src/software/openlmi/software/LMI_MemberOfSoftwareCollection.py b/src/software/openlmi/software/LMI_MemberOfSoftwareCollection.py
index 53cbcb8..1868efa 100644
--- a/src/software/openlmi/software/LMI_MemberOfSoftwareCollection.py
+++ b/src/software/openlmi/software/LMI_MemberOfSoftwareCollection.py
@@ -1,6 +1,6 @@
# Software Management Providers
#
-# Copyright (C) 2013 Red Hat, Inc. All rights reserved.
+# Copyright (C) 2012-2013 Red Hat, Inc. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -69,7 +69,7 @@ def generate_member_referents(_env, object_name, model, _keys_only):
yield model
class LMI_MemberOfSoftwareCollection(CIMProvider2):
- """Instrument the CIM class LMI_MemberOfSoftwareCollection
+ """Instrument the CIM class LMI_MemberOfSoftwareCollection
LMI_MemberOfSoftwareCollection is an aggregation used to establish
membership of ManagedElements in a Collection.
@@ -85,19 +85,19 @@ class LMI_MemberOfSoftwareCollection(CIMProvider2):
Keyword arguments:
env -- Provider Environment (pycimmb.ProviderEnvironment)
- model -- A template of the pywbem.CIMInstance to be returned. The
- key properties are set on this instance to correspond to the
+ model -- A template of the pywbem.CIMInstance to be returned. The
+ key properties are set on this instance to correspond to the
instanceName that was requested. The properties of the model
- are already filtered according to the PropertyList from the
+ are already filtered according to the PropertyList from the
request. Only properties present in the model need to be
- given values. If you prefer, you can set all of the
- values, and the instance will be filtered for you.
+ given values. If you prefer, you can set all of the
+ values, and the instance will be filtered for you.
Possible Errors:
CIM_ERR_ACCESS_DENIED
- CIM_ERR_INVALID_PARAMETER (including missing, duplicate, unrecognized
+ CIM_ERR_INVALID_PARAMETER (including missing, duplicate, unrecognized
or otherwise incorrect parameters)
- CIM_ERR_NOT_FOUND (the CIM Class does exist, but the requested CIM
+ CIM_ERR_NOT_FOUND (the CIM Class does exist, but the requested CIM
Instance does not exist in the specified namespace)
CIM_ERR_FAILED (some other unspecified error occurred)
@@ -122,17 +122,17 @@ class LMI_MemberOfSoftwareCollection(CIMProvider2):
"""Enumerate instances.
The WBEM operations EnumerateInstances and EnumerateInstanceNames
- are both mapped to this method.
+ are both mapped to this method.
This method is a python generator
Keyword arguments:
env -- Provider Environment (pycimmb.ProviderEnvironment)
- model -- A template of the pywbem.CIMInstances to be generated.
- The properties of the model are already filtered according to
- the PropertyList from the request. Only properties present in
- the model need to be given values. If you prefer, you can
- always set all of the values, and the instance will be filtered
- for you.
+ model -- A template of the pywbem.CIMInstances to be generated.
+ The properties of the model are already filtered according to
+ the PropertyList from the request. Only properties present in
+ the model need to be given values. If you prefer, you can
+ always set all of the values, and the instance will be filtered
+ for you.
keys_only -- A boolean. True if only the key properties should be
set on the generated instances.
@@ -141,7 +141,7 @@ class LMI_MemberOfSoftwareCollection(CIMProvider2):
"""
# Prime model.path with knowledge of the keys, so key values on
# the CIMInstanceName (model.path) will automatically be set when
- # we set property values on the model.
+ # we set property values on the model.
model.path.update({'Member': None, 'Collection': None})
model['Collection'] = SystemCollection.get_path()
@@ -162,22 +162,22 @@ class LMI_MemberOfSoftwareCollection(CIMProvider2):
Keyword arguments:
env -- Provider Environment (pycimmb.ProviderEnvironment)
- instance -- The new pywbem.CIMInstance. If modifying an existing
- instance, the properties on this instance have been filtered by
+ instance -- The new pywbem.CIMInstance. If modifying an existing
+ instance, the properties on this instance have been filtered by
the PropertyList from the request.
modify_existing -- True if ModifyInstance, False if CreateInstance
- Return the new instance. The keys must be set on the new instance.
+ Return the new instance. The keys must be set on the new instance.
Possible Errors:
CIM_ERR_ACCESS_DENIED
CIM_ERR_NOT_SUPPORTED
- CIM_ERR_INVALID_PARAMETER (including missing, duplicate, unrecognized
+ CIM_ERR_INVALID_PARAMETER (including missing, duplicate, unrecognized
or otherwise incorrect parameters)
- CIM_ERR_ALREADY_EXISTS (the CIM Instance already exists -- only
+ CIM_ERR_ALREADY_EXISTS (the CIM Instance already exists -- only
valid if modify_existing is False, indicating that the operation
was CreateInstance)
- CIM_ERR_NOT_FOUND (the CIM Instance does not exist -- only valid
+ CIM_ERR_NOT_FOUND (the CIM Instance does not exist -- only valid
if modify_existing is True, indicating that the operation
was ModifyInstance)
CIM_ERR_FAILED (some other unspecified error occurred)
@@ -191,61 +191,61 @@ class LMI_MemberOfSoftwareCollection(CIMProvider2):
Keyword arguments:
env -- Provider Environment (pycimmb.ProviderEnvironment)
- instance_name -- A pywbem.CIMInstanceName specifying the instance
+ instance_name -- A pywbem.CIMInstanceName specifying the instance
to delete.
Possible Errors:
CIM_ERR_ACCESS_DENIED
CIM_ERR_NOT_SUPPORTED
CIM_ERR_INVALID_NAMESPACE
- CIM_ERR_INVALID_PARAMETER (including missing, duplicate, unrecognized
+ CIM_ERR_INVALID_PARAMETER (including missing, duplicate, unrecognized
or otherwise incorrect parameters)
- CIM_ERR_INVALID_CLASS (the CIM Class does not exist in the specified
+ CIM_ERR_INVALID_CLASS (the CIM Class does not exist in the specified
namespace)
- CIM_ERR_NOT_FOUND (the CIM Class does exist, but the requested CIM
+ CIM_ERR_NOT_FOUND (the CIM Class does exist, but the requested CIM
Instance does not exist in the specified namespace)
CIM_ERR_FAILED (some other unspecified error occurred)
- """
+ """
raise pywbem.CIMError(pywbem.CIM_ERR_NOT_SUPPORTED)
-
+
@cmpi_logging.trace_method
def references(self, env, object_name, model, result_class_name, role,
result_role, keys_only):
"""Instrument Associations.
- All four association-related operations (Associators, AssociatorNames,
- References, ReferenceNames) are mapped to this method.
+ All four association-related operations (Associators, AssociatorNames,
+ References, ReferenceNames) are mapped to this method.
This method is a python generator
Keyword arguments:
env -- Provider Environment (pycimmb.ProviderEnvironment)
- object_name -- A pywbem.CIMInstanceName that defines the source
+ object_name -- A pywbem.CIMInstanceName that defines the source
CIM Object whose associated Objects are to be returned.
model -- A template pywbem.CIMInstance to serve as a model
of the objects to be returned. Only properties present on this
- model need to be set.
- result_class_name -- If not empty, this string acts as a filter on
- the returned set of Instances by mandating that each returned
- Instances MUST represent an association between object_name
+ model need to be set.
+ result_class_name -- If not empty, this string acts as a filter on
+ the returned set of Instances by mandating that each returned
+ Instances MUST represent an association between object_name
and an Instance of a Class whose name matches this parameter
- or a subclass.
- role -- If not empty, MUST be a valid Property name. It acts as a
- filter on the returned set of Instances by mandating that each
- returned Instance MUST refer to object_name via a Property
+ or a subclass.
+ role -- If not empty, MUST be a valid Property name. It acts as a
+ filter on the returned set of Instances by mandating that each
+ returned Instance MUST refer to object_name via a Property
whose name matches the value of this parameter.
- result_role -- If not empty, MUST be a valid Property name. It acts
- as a filter on the returned set of Instances by mandating that
- each returned Instance MUST represent associations of
- object_name to other Instances, where the other Instances play
- the specified result_role in the association (i.e. the
- name of the Property in the Association Class that refers to
- the Object related to object_name MUST match the value of this
+ result_role -- If not empty, MUST be a valid Property name. It acts
+ as a filter on the returned set of Instances by mandating that
+ each returned Instance MUST represent associations of
+ object_name to other Instances, where the other Instances play
+ the specified result_role in the association (i.e. the
+ name of the Property in the Association Class that refers to
+ the Object related to object_name MUST match the value of this
parameter).
keys_only -- A boolean. True if only the key properties should be
set on the generated instances.
- The following diagram may be helpful in understanding the role,
+ The following diagram may be helpful in understanding the role,
result_role, and result_class_name parameters.
+------------------------+ +-------------------+
| object_name.classname | | result_class_name |
@@ -263,7 +263,7 @@ class LMI_MemberOfSoftwareCollection(CIMProvider2):
CIM_ERR_ACCESS_DENIED
CIM_ERR_NOT_SUPPORTED
CIM_ERR_INVALID_NAMESPACE
- CIM_ERR_INVALID_PARAMETER (including missing, duplicate, unrecognized
+ CIM_ERR_INVALID_PARAMETER (including missing, duplicate, unrecognized
or otherwise incorrect parameters)
CIM_ERR_FAILED (some other unspecified error occurred)
diff --git a/src/software/openlmi/software/LMI_ResourceForSoftwareIdentity.py b/src/software/openlmi/software/LMI_ResourceForSoftwareIdentity.py
index f25a5a2..e7815a7 100644
--- a/src/software/openlmi/software/LMI_ResourceForSoftwareIdentity.py
+++ b/src/software/openlmi/software/LMI_ResourceForSoftwareIdentity.py
@@ -1,7 +1,7 @@
# -*- encoding: utf-8 -*-
# Software Management Providers
#
-# Copyright (C) 2013 Red Hat, Inc. All rights reserved.
+# Copyright (C) 2012-2013 Red Hat, Inc. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -70,7 +70,7 @@ def generate_repository_referents(env, object_name, model, _keys_only):
yield model
class LMI_ResourceForSoftwareIdentity(CIMProvider2):
- """Instrument the CIM class LMI_ResourceForSoftwareIdentity
+ """Instrument the CIM class LMI_ResourceForSoftwareIdentity
CIM_SAPAvailableForElement conveys the semantics of a Service Access
Point that is available for a ManagedElement. When
@@ -79,7 +79,7 @@ class LMI_ResourceForSoftwareIdentity(CIMProvider2):
available only for the associated ManagedElements. For example, a
device might provide management access through a URL. This association
allows the URL to be advertised for the device.
-
+
"""
def __init__ (self, _env):
@@ -92,19 +92,19 @@ class LMI_ResourceForSoftwareIdentity(CIMProvider2):
Keyword arguments:
env -- Provider Environment (pycimmb.ProviderEnvironment)
- model -- A template of the pywbem.CIMInstance to be returned. The
- key properties are set on this instance to correspond to the
+ model -- A template of the pywbem.CIMInstance to be returned. The
+ key properties are set on this instance to correspond to the
instanceName that was requested. The properties of the model
- are already filtered according to the PropertyList from the
+ are already filtered according to the PropertyList from the
request. Only properties present in the model need to be
- given values. If you prefer, you can set all of the
- values, and the instance will be filtered for you.
+ given values. If you prefer, you can set all of the
+ values, and the instance will be filtered for you.
Possible Errors:
CIM_ERR_ACCESS_DENIED
- CIM_ERR_INVALID_PARAMETER (including missing, duplicate, unrecognized
+ CIM_ERR_INVALID_PARAMETER (including missing, duplicate, unrecognized
or otherwise incorrect parameters)
- CIM_ERR_NOT_FOUND (the CIM Class does exist, but the requested CIM
+ CIM_ERR_NOT_FOUND (the CIM Class does exist, but the requested CIM
Instance does not exist in the specified namespace)
CIM_ERR_FAILED (some other unspecified error occurred)
"""
@@ -144,17 +144,17 @@ class LMI_ResourceForSoftwareIdentity(CIMProvider2):
"""Enumerate instances.
The WBEM operations EnumerateInstances and EnumerateInstanceNames
- are both mapped to this method.
+ are both mapped to this method.
This method is a python generator
Keyword arguments:
env -- Provider Environment (pycimmb.ProviderEnvironment)
- model -- A template of the pywbem.CIMInstances to be generated.
- The properties of the model are already filtered according to
- the PropertyList from the request. Only properties present in
- the model need to be given values. If you prefer, you can
- always set all of the values, and the instance will be filtered
- for you.
+ model -- A template of the pywbem.CIMInstances to be generated.
+ The properties of the model are already filtered according to
+ the PropertyList from the request. Only properties present in
+ the model need to be given values. If you prefer, you can
+ always set all of the values, and the instance will be filtered
+ for you.
keys_only -- A boolean. True if only the key properties should be
set on the generated instances.
@@ -164,9 +164,9 @@ class LMI_ResourceForSoftwareIdentity(CIMProvider2):
"""
# Prime model.path with knowledge of the keys, so key values on
# the CIMInstanceName (model.path) will automatically be set when
- # we set property values on the model.
+ # we set property values on the model.
model.path.update({'ManagedElement': None, 'AvailableSAP': None})
-
+
elem_model = pywbem.CIMInstanceName(
classname="LMI_SoftwareIdentity",
namespace="root/cimv2")
@@ -198,22 +198,22 @@ class LMI_ResourceForSoftwareIdentity(CIMProvider2):
Keyword arguments:
env -- Provider Environment (pycimmb.ProviderEnvironment)
- instance -- The new pywbem.CIMInstance. If modifying an existing
- instance, the properties on this instance have been filtered by
+ instance -- The new pywbem.CIMInstance. If modifying an existing
+ instance, the properties on this instance have been filtered by
the PropertyList from the request.
modify_existing -- True if ModifyInstance, False if CreateInstance
- Return the new instance. The keys must be set on the new instance.
+ Return the new instance. The keys must be set on the new instance.
Possible Errors:
CIM_ERR_ACCESS_DENIED
CIM_ERR_NOT_SUPPORTED
- CIM_ERR_INVALID_PARAMETER (including missing, duplicate, unrecognized
+ CIM_ERR_INVALID_PARAMETER (including missing, duplicate, unrecognized
or otherwise incorrect parameters)
- CIM_ERR_ALREADY_EXISTS (the CIM Instance already exists -- only
+ CIM_ERR_ALREADY_EXISTS (the CIM Instance already exists -- only
valid if modify_existing is False, indicating that the operation
was CreateInstance)
- CIM_ERR_NOT_FOUND (the CIM Instance does not exist -- only valid
+ CIM_ERR_NOT_FOUND (the CIM Instance does not exist -- only valid
if modify_existing is True, indicating that the operation
was ModifyInstance)
CIM_ERR_FAILED (some other unspecified error occurred)
@@ -227,61 +227,61 @@ class LMI_ResourceForSoftwareIdentity(CIMProvider2):
Keyword arguments:
env -- Provider Environment (pycimmb.ProviderEnvironment)
- instance_name -- A pywbem.CIMInstanceName specifying the instance
+ instance_name -- A pywbem.CIMInstanceName specifying the instance
to delete.
Possible Errors:
CIM_ERR_ACCESS_DENIED
CIM_ERR_NOT_SUPPORTED
CIM_ERR_INVALID_NAMESPACE
- CIM_ERR_INVALID_PARAMETER (including missing, duplicate, unrecognized
+ CIM_ERR_INVALID_PARAMETER (including missing, duplicate, unrecognized
or otherwise incorrect parameters)
- CIM_ERR_INVALID_CLASS (the CIM Class does not exist in the specified
+ CIM_ERR_INVALID_CLASS (the CIM Class does not exist in the specified
namespace)
- CIM_ERR_NOT_FOUND (the CIM Class does exist, but the requested CIM
+ CIM_ERR_NOT_FOUND (the CIM Class does exist, but the requested CIM
Instance does not exist in the specified namespace)
CIM_ERR_FAILED (some other unspecified error occurred)
- """
+ """
raise pywbem.CIMError(pywbem.CIM_ERR_NOT_SUPPORTED)
-
+
@cmpi_logging.trace_method
def references(self, env, object_name, model, result_class_name, role,
result_role, keys_only):
"""Instrument Associations.
- All four association-related operations (Associators, AssociatorNames,
- References, ReferenceNames) are mapped to this method.
+ All four association-related operations (Associators, AssociatorNames,
+ References, ReferenceNames) are mapped to this method.
This method is a python generator
Keyword arguments:
env -- Provider Environment (pycimmb.ProviderEnvironment)
- object_name -- A pywbem.CIMInstanceName that defines the source
+ object_name -- A pywbem.CIMInstanceName that defines the source
CIM Object whose associated Objects are to be returned.
model -- A template pywbem.CIMInstance to serve as a model
of the objects to be returned. Only properties present on this
- model need to be set.
- result_class_name -- If not empty, this string acts as a filter on
- the returned set of Instances by mandating that each returned
- Instances MUST represent an association between object_name
+ model need to be set.
+ result_class_name -- If not empty, this string acts as a filter on
+ the returned set of Instances by mandating that each returned
+ Instances MUST represent an association between object_name
and an Instance of a Class whose name matches this parameter
- or a subclass.
- role -- If not empty, MUST be a valid Property name. It acts as a
- filter on the returned set of Instances by mandating that each
- returned Instance MUST refer to object_name via a Property
+ or a subclass.
+ role -- If not empty, MUST be a valid Property name. It acts as a
+ filter on the returned set of Instances by mandating that each
+ returned Instance MUST refer to object_name via a Property
whose name matches the value of this parameter.
- result_role -- If not empty, MUST be a valid Property name. It acts
- as a filter on the returned set of Instances by mandating that
- each returned Instance MUST represent associations of
- object_name to other Instances, where the other Instances play
- the specified result_role in the association (i.e. the
- name of the Property in the Association Class that refers to
- the Object related to object_name MUST match the value of this
+ result_role -- If not empty, MUST be a valid Property name. It acts
+ as a filter on the returned set of Instances by mandating that
+ each returned Instance MUST represent associations of
+ object_name to other Instances, where the other Instances play
+ the specified result_role in the association (i.e. the
+ name of the Property in the Association Class that refers to
+ the Object related to object_name MUST match the value of this
parameter).
keys_only -- A boolean. True if only the key properties should be
set on the generated instances.
- The following diagram may be helpful in understanding the role,
+ The following diagram may be helpful in understanding the role,
result_role, and result_class_name parameters.
+------------------------+ +-------------------+
| object_name.classname | | result_class_name |
@@ -299,7 +299,7 @@ class LMI_ResourceForSoftwareIdentity(CIMProvider2):
CIM_ERR_ACCESS_DENIED
CIM_ERR_NOT_SUPPORTED
CIM_ERR_INVALID_NAMESPACE
- CIM_ERR_INVALID_PARAMETER (including missing, duplicate, unrecognized
+ CIM_ERR_INVALID_PARAMETER (including missing, duplicate, unrecognized
or otherwise incorrect parameters)
CIM_ERR_FAILED (some other unspecified error occurred)
diff --git a/src/software/openlmi/software/LMI_SoftwareIdentity.py b/src/software/openlmi/software/LMI_SoftwareIdentity.py
index 18ef98c..62c9875 100644
--- a/src/software/openlmi/software/LMI_SoftwareIdentity.py
+++ b/src/software/openlmi/software/LMI_SoftwareIdentity.py
@@ -1,7 +1,7 @@
# -*- encoding: utf-8 -*-
# Software Management Providers
#
-# Copyright (C) 2013 Red Hat, Inc. All rights reserved.
+# Copyright (C) 2012-2013 Red Hat, Inc. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -30,7 +30,7 @@ from openlmi.software.core import Identity
from openlmi.software.yumdb import YumDB
class LMI_SoftwareIdentity(CIMProvider2):
- """Instrument the CIM class LMI_SoftwareIdentity
+ """Instrument the CIM class LMI_SoftwareIdentity
SoftwareIdentity provides descriptive information about a software
component for asset tracking and/or installation dependency
@@ -65,7 +65,7 @@ class LMI_SoftwareIdentity(CIMProvider2):
software to any LogicalFiles that result from installing it. As above,
there may not be sufficient detail or instrumentation to instantiate
this association.
-
+
"""
def __init__ (self, _env):
@@ -78,19 +78,19 @@ class LMI_SoftwareIdentity(CIMProvider2):
Keyword arguments:
env -- Provider Environment (pycimmb.ProviderEnvironment)
- model -- A template of the pywbem.CIMInstance to be returned. The
- key properties are set on this instance to correspond to the
+ model -- A template of the pywbem.CIMInstance to be returned. The
+ key properties are set on this instance to correspond to the
instanceName that was requested. The properties of the model
- are already filtered according to the PropertyList from the
+ are already filtered according to the PropertyList from the
request. Only properties present in the model need to be
- given values. If you prefer, you can set all of the
- values, and the instance will be filtered for you.
+ given values. If you prefer, you can set all of the
+ values, and the instance will be filtered for you.
Possible Errors:
CIM_ERR_ACCESS_DENIED
- CIM_ERR_INVALID_PARAMETER (including missing, duplicate, unrecognized
+ CIM_ERR_INVALID_PARAMETER (including missing, duplicate, unrecognized
or otherwise incorrect parameters)
- CIM_ERR_NOT_FOUND (the CIM Class does exist, but the requested CIM
+ CIM_ERR_NOT_FOUND (the CIM Class does exist, but the requested CIM
Instance does not exist in the specified namespace)
CIM_ERR_FAILED (some other unspecified error occurred)
@@ -104,17 +104,17 @@ class LMI_SoftwareIdentity(CIMProvider2):
"""Enumerate instances.
The WBEM operations EnumerateInstances and EnumerateInstanceNames
- are both mapped to this method.
+ are both mapped to this method.
This method is a python generator
Keyword arguments:
env -- Provider Environment (pycimmb.ProviderEnvironment)
- model -- A template of the pywbem.CIMInstances to be generated.
- The properties of the model are already filtered according to
- the PropertyList from the request. Only properties present in
- the model need to be given values. If you prefer, you can
- always set all of the values, and the instance will be filtered
- for you.
+ model -- A template of the pywbem.CIMInstances to be generated.
+ The properties of the model are already filtered according to
+ the PropertyList from the request. Only properties present in
+ the model need to be given values. If you prefer, you can
+ always set all of the values, and the instance will be filtered
+ for you.
keys_only -- A boolean. True if only the key properties should be
set on the generated instances.
@@ -124,7 +124,7 @@ class LMI_SoftwareIdentity(CIMProvider2):
"""
# Prime model.path with knowledge of the keys, so key values on
# the CIMInstanceName (model.path) will automatically be set when
- # we set property values on the model.
+ # we set property values on the model.
model.path.update({'InstanceID': None})
with YumDB.get_instance() as ydb:
@@ -139,22 +139,22 @@ class LMI_SoftwareIdentity(CIMProvider2):
Keyword arguments:
env -- Provider Environment (pycimmb.ProviderEnvironment)
- instance -- The new pywbem.CIMInstance. If modifying an existing
- instance, the properties on this instance have been filtered by
+ instance -- The new pywbem.CIMInstance. If modifying an existing
+ instance, the properties on this instance have been filtered by
the PropertyList from the request.
modify_existing -- True if ModifyInstance, False if CreateInstance
- Return the new instance. The keys must be set on the new instance.
+ Return the new instance. The keys must be set on the new instance.
Possible Errors:
CIM_ERR_ACCESS_DENIED
CIM_ERR_NOT_SUPPORTED
- CIM_ERR_INVALID_PARAMETER (including missing, duplicate, unrecognized
+ CIM_ERR_INVALID_PARAMETER (including missing, duplicate, unrecognized
or otherwise incorrect parameters)
- CIM_ERR_ALREADY_EXISTS (the CIM Instance already exists -- only
+ CIM_ERR_ALREADY_EXISTS (the CIM Instance already exists -- only
valid if modify_existing is False, indicating that the operation
was CreateInstance)
- CIM_ERR_NOT_FOUND (the CIM Instance does not exist -- only valid
+ CIM_ERR_NOT_FOUND (the CIM Instance does not exist -- only valid
if modify_existing is True, indicating that the operation
was ModifyInstance)
CIM_ERR_FAILED (some other unspecified error occurred)
@@ -168,21 +168,21 @@ class LMI_SoftwareIdentity(CIMProvider2):
Keyword arguments:
env -- Provider Environment (pycimmb.ProviderEnvironment)
- instance_name -- A pywbem.CIMInstanceName specifying the instance
+ instance_name -- A pywbem.CIMInstanceName specifying the instance
to delete.
Possible Errors:
CIM_ERR_ACCESS_DENIED
CIM_ERR_NOT_SUPPORTED
CIM_ERR_INVALID_NAMESPACE
- CIM_ERR_INVALID_PARAMETER (including missing, duplicate, unrecognized
+ CIM_ERR_INVALID_PARAMETER (including missing, duplicate, unrecognized
or otherwise incorrect parameters)
- CIM_ERR_INVALID_CLASS (the CIM Class does not exist in the specified
+ CIM_ERR_INVALID_CLASS (the CIM Class does not exist in the specified
namespace)
- CIM_ERR_NOT_FOUND (the CIM Class does exist, but the requested CIM
+ CIM_ERR_NOT_FOUND (the CIM Class does exist, but the requested CIM
Instance does not exist in the specified namespace)
CIM_ERR_FAILED (some other unspecified error occurred)
- """
+ """
raise pywbem.CIMError(pywbem.CIM_ERR_NOT_SUPPORTED)
diff --git a/src/software/openlmi/software/LMI_SoftwareIdentityResource.py b/src/software/openlmi/software/LMI_SoftwareIdentityResource.py
index 7cd5bbe..1d1564a 100644
--- a/src/software/openlmi/software/LMI_SoftwareIdentityResource.py
+++ b/src/software/openlmi/software/LMI_SoftwareIdentityResource.py
@@ -1,6 +1,6 @@
# Software Management Providers
#
-# Copyright (C) 2013 Red Hat, Inc. All rights reserved.
+# Copyright (C) 2012-2013 Red Hat, Inc. All rights reserved.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
@@ -33,7 +33,7 @@ from openlmi.software.core import IdentityResource
from openlmi.software.yumdb import YumDB, errors
class LMI_SoftwareIdentityResource(CIMProvider2):
- """Instrument the CIM class LMI_SoftwareIdentityResource
+ """Instrument the CIM class LMI_SoftwareIdentityResource
SoftwareIdentityResource describes the URL of a file or other resource
that contains all or part of of a SoftwareIdentity for use by the
@@ -46,7 +46,7 @@ class LMI_SoftwareIdentityResource(CIMProvider2):
SoftwareIdentity class without downloading the entire package.
SoftwareIdentityResources will be related to the SoftwareIdentity
using the SAPAvailableForElement association.
-
+
"""
def __init__ (self, _env):
@@ -59,19 +59,19 @@ class LMI_SoftwareIdentityResource(CIMProvider2):
Keyword arguments:
env -- Provider Environment (pycimmb.ProviderEnvironment)
- model -- A template of the pywbem.CIMInstance to be returned. The
- key properties are set on this instance to correspond to the
+ model -- A template of the pywbem.CIMInstance to be returned. The
+ key properties are set on this instance to correspond to the
instanceName that was requested. The properties of the model
- are already filtered according to the PropertyList from the
+ are already filtered according to the PropertyList from the
request. Only properties present in the model need to be
- given values. If you prefer, you can set all of the
- values, and the instance will be filtered for you.
+ given values. If you prefer, you can set all of the
+ values, and the instance will be filtered for you.
Possible Errors:
CIM_ERR_ACCESS_DENIED
- CIM_ERR_INVALID_PARAMETER (including missing, duplicate, unrecognized
+ CIM_ERR_INVALID_PARAMETER (including missing, duplicate, unrecognized
or otherwise incorrect parameters)
- CIM_ERR_NOT_FOUND (the CIM Class does exist, but the requested CIM
+ CIM_ERR_NOT_FOUND (the CIM Class does exist, but the requested CIM
Instance does not exist in the specified namespace)
CIM_ERR_FAILED (some other unspecified error occurred)
@@ -87,17 +87,17 @@ class LMI_SoftwareIdentityResource(CIMProvider2):
"""Enumerate instances.
The WBEM operations EnumerateInstances and EnumerateInstanceNames
- are both mapped to this method.
+ are both mapped to this method.
This method is a python generator
Keyword arguments:
env -- Provider Environment (pycimmb.ProviderEnvironment)
- model -- A template of the pywbem.CIMInstances to be generated.
- The properties of the model are already filtered according to
- the PropertyList from the request. Only properties present in
- the model need to be given values. If you prefer, you can
- always set all of the values, and the instance will be filtered
- for you.
+ model -- A template of the pywbem.CIMInstances to be generated.
+ The properties of the model are already filtered according to
+ the PropertyList from the request. Only properties present in
+ the model need to be given values. If you prefer, you can
+ always set all of the values, and the instance will be filtered
+ for you.
keys_only -- A boolean. True if only the key properties should be
set on the generated instances.
@@ -107,10 +107,10 @@ class LMI_SoftwareIdentityResource(CIMProvider2):
"""
# Prime model.path with knowledge of the keys, so key values on
# the CIMInstanceName (model.path) will automatically be set when
- # we set property values on the model.
+ # we set property values on the model.
model.path.update({'CreationClassName': None, 'SystemName': None,
'Name': None, 'SystemCreationClassName': None})
-
+
repolist = YumDB.get_instance().get_repository_list('all')
for repo in repolist:
yield IdentityResource.repo2model(
@@ -122,22 +122,22 @@ class LMI_SoftwareIdentityResource(CIMProvider2):
Keyword arguments:
env -- Provider Environment (pycimmb.ProviderEnvironment)
- instance -- The new pywbem.CIMInstance. If modifying an existing
- instance, the properties on this instance have been filtered by
+ instance -- The new pywbem.CIMInstance. If modifying an existing
+ instance, the properties on this instance have been filtered by
the PropertyList from the request.
modify_existing -- True if ModifyInstance, False if CreateInstance
- Return the new instance. The keys must be set on the new instance.
+ Return the new instance. The keys must be set on the new instance.
Possible Errors:
CIM_ERR_ACCESS_DENIED
CIM_ERR_NOT_SUPPORTED
- CIM_ERR_INVALID_PARAMETER (including missing, duplicate, unrecognized
+ CIM_ERR_INVALID_PARAMETER (including missing, duplicate, unrecognized
or otherwise incorrect parameters)
- CIM_ERR_ALREADY_EXISTS (the CIM Instance already exists -- only
+ CIM_ERR_ALREADY_EXISTS (the CIM Instance already exists -- only
valid if modify_existing is False, indicating that the operation
was CreateInstance)
- CIM_ERR_NOT_FOUND (the CIM Instance does not exist -- only valid
+ CIM_ERR_NOT_FOUND (the CIM Instance does not exist -- only valid
if modify_existing is True, indicating that the operation
was ModifyInstance)
CIM_ERR_FAILED (some other unspecified error occurred)
@@ -152,25 +152,25 @@ class LMI_SoftwareIdentityResource(CIMProvider2):
Keyword arguments:
env -- Provider Environment (pycimmb.ProviderEnvironment)
- instance_name -- A pywbem.CIMInstanceName specifying the instance
+ instance_name -- A pywbem.CIMInstanceName specifying the instance
to delete.
Possible Errors:
CIM_ERR_ACCESS_DENIED
CIM_ERR_NOT_SUPPORTED
CIM_ERR_INVALID_NAMESPACE
- CIM_ERR_INVALID_PARAMETER (including missing, duplicate, unrecognized
+ CIM_ERR_INVALID_PARAMETER (including missing, duplicate, unrecognized
or otherwise incorrect parameters)
- CIM_ERR_INVALID_CLASS (the CIM Class does not exist in the specified
+ CIM_ERR_INVALID_CLASS (the CIM Class does not exist in the specified
namespace)
- CIM_ERR_NOT_FOUND (the CIM Class does exist, but the requested CIM
+ CIM_ERR_NOT_FOUND (the CIM Class does exist, but the requested CIM
Instance does not exist in the specified namespace)
CIM_ERR_FAILED (some other unspecified error occurred)
- """
+ """
# TODO removal should also be supported
raise pywbem.CIMError(pywbem.CIM_ERR_NOT_SUPPORTED)
-
+
@cmpi_logging.trace_method
def cim_method_requeststatechange(self, env, object_name,
param_requestedstate=None,
@@ -190,14 +190,14 @@ class LMI_SoftwareIdentityResource(CIMProvider2):
initiated, a ConcreteJob has been created, and its reference
returned in the output parameter Job. Any other return code
indicates an error condition.
-
+
Keyword arguments:
env -- Provider Environment (pycimmb.ProviderEnvironment)
- object_name -- A pywbem.CIMInstanceName or pywbem.CIMCLassName
- specifying the object on which the method RequestStateChange()
+ object_name -- A pywbem.CIMInstanceName or pywbem.CIMCLassName
+ specifying the object on which the method RequestStateChange()
should be invoked.
param_requestedstate -- The input parameter RequestedState (
- type pywbem.Uint16 Values.RequestStateChange.RequestedState)
+ type pywbem.Uint16 Values.RequestStateChange.RequestedState)
The state requested for the element. This information will be
placed into the RequestedState property of the instance if the
return code of the RequestStateChange method is 0 ('Completed
@@ -205,9 +205,9 @@ class LMI_SoftwareIdentityResource(CIMProvider2):
the description of the EnabledState and RequestedState
properties for the detailed explanations of the RequestedState
values.
-
+
param_timeoutperiod -- The input parameter TimeoutPeriod (
- type pywbem.CIMDateTime)
+ type pywbem.CIMDateTime)
A timeout period that specifies the maximum amount of time that
the client expects the transition to the new state to take.
The interval format must be used to specify the TimeoutPeriod.
@@ -216,7 +216,7 @@ class LMI_SoftwareIdentityResource(CIMProvider2):
does not contain 0 or null and the implementation does not
support this parameter, a return code of 'Use Of Timeout
Parameter Not Supported' shall be returned.
-
+
Returns a two-tuple containing the return value (
type pywbem.Uint32 Values.RequestStateChange)
@@ -224,17 +224,17 @@ class LMI_SoftwareIdentityResource(CIMProvider2):
Output parameters:
Job -- (type REF (pywbem.CIMInstanceName(
- classname='CIM_ConcreteJob', ...))
+ classname='CIM_ConcreteJob', ...))
May contain a reference to the ConcreteJob created to track the
state transition initiated by the method invocation.
Possible Errors:
CIM_ERR_ACCESS_DENIED
- CIM_ERR_INVALID_PARAMETER (including missing, duplicate,
+ CIM_ERR_INVALID_PARAMETER (including missing, duplicate,
unrecognized or otherwise incorrect parameters)
- CIM_ERR_NOT_FOUND (the target CIM Class or instance does not
+ CIM_ERR_NOT_FOUND (the target CIM Class or instance does not
exist in the specified namespace)
- CIM_ERR_METHOD_NOT_AVAILABLE (the CIM Server is unable to honor
+ CIM_ERR_METHOD_NOT_AVAILABLE (the CIM Server is unable to honor
the invocation request)
CIM_ERR_FAILED (some other unspecified error occurred)
"""
@@ -274,4 +274,4 @@ class LMI_SoftwareIdentityResource(CIMProvider2):
rval = IdentityResource.Values.RequestStateChange. \
Completed_with_No_Error
return (rval, out_params)
-
+
diff --git a/src/software/openlmi/software/LMI_SoftwareInstallationJob.py b/src/software/openlmi/software/LMI_SoftwareInstallationJob.py
index df62f0d..ee12aa0 100644
--- a/src/software/openlmi/software/LMI_SoftwareInstallationJob.py
+++ b/src/software/openlmi/software/LMI_SoftwareInstallationJob.py
@@ -13,11 +13,11 @@ from openlmi.software.core import Error, InstallationJob
from openlmi.software.yumdb import errors, YumDB
class LMI_SoftwareInstallationJob(CIMProvider2):
- """Instrument the CIM class LMI_SoftwareInstallationJob
+ """Instrument the CIM class LMI_SoftwareInstallationJob
A concrete version of Job. This class represents a generic and
instantiable unit of work, such as a batch or a print job.
-
+
"""
def __init__ (self, _env):
@@ -31,19 +31,19 @@ class LMI_SoftwareInstallationJob(CIMProvider2):
Keyword arguments:
env -- Provider Environment (pycimmb.ProviderEnvironment)
- model -- A template of the pywbem.CIMInstance to be returned. The
- key properties are set on this instance to correspond to the
+ model -- A template of the pywbem.CIMInstance to be returned. The
+ key properties are set on this instance to correspond to the
instanceName that was requested. The properties of the model
- are already filtered according to the PropertyList from the
+ are already filtered according to the PropertyList from the
request. Only properties present in the model need to be
- given values. If you prefer, you can set all of the
- values, and the instance will be filtered for you.
+ given values. If you prefer, you can set all of the
+ values, and the instance will be filtered for you.
Possible Errors:
CIM_ERR_ACCESS_DENIED
- CIM_ERR_INVALID_PARAMETER (including missing, duplicate, unrecognized
+ CIM_ERR_INVALID_PARAMETER (including missing, duplicate, unrecognized
or otherwise incorrect parameters)
- CIM_ERR_NOT_FOUND (the CIM Class does exist, but the requested CIM
+ CIM_ERR_NOT_FOUND (the CIM Class does exist, but the requested CIM
Instance does not exist in the specified namespace)
CIM_ERR_FAILED (some other unspecified error occurred)
"""
@@ -56,17 +56,17 @@ class LMI_SoftwareInstallationJob(CIMProvider2):
"""Enumerate instances.
The WBEM operations EnumerateInstances and EnumerateInstanceNames
- are both mapped to this method.
+ are both mapped to this method.
This method is a python generator
Keyword arguments:
env -- Provider Environment (pycimmb.ProviderEnvironment)
- model -- A template of the pywbem.CIMInstances to be generated.
- The properties of the model are already filtered according to
- the PropertyList from the request. Only properties present in
- the model need to be given values. If you prefer, you can
- always set all of the values, and the instance will be filtered
- for you.
+ model -- A template of the pywbem.CIMInstances to be generated.
+ The properties of the model are already filtered according to
+ the PropertyList from the request. Only properties present in
+ the model need to be given values. If you prefer, you can
+ always set all of the values, and the instance will be filtered
+ for you.
keys_only -- A boolean. True if only the key properties should be
set on the generated instances.
@@ -75,9 +75,9 @@ class LMI_SoftwareInstallationJob(CIMProvider2):
"""
# Prime model.path with knowledge of the keys, so key values on
# the CIMInstanceName (model.path) will automatically be set when
- # we set property values on the model.
+ # we set property values on the model.
model.path.update({'InstanceID': None})
-
+
for job in YumDB.get_instance().get_job_list():
yield InstallationJob.job2model(job, keys_only, model)
@@ -87,22 +87,22 @@ class LMI_SoftwareInstallationJob(CIMProvider2):
Keyword arguments:
env -- Provider Environment (pycimmb.ProviderEnvironment)
- instance -- The new pywbem.CIMInstance. If modifying an existing
- instance, the properties on this instance have been filtered by
+ instance -- The new pywbem.CIMInstance. If modifying an existing
+ instance, the properties on this instance have been filtered by
the PropertyList from the request.
modify_existing -- True if ModifyInstance, False if CreateInstance
- Return the new instance. The keys must be set on the new instance.
+ Return the new instance. The keys must be set on the new instance.
Possible Errors:
CIM_ERR_ACCESS_DENIED
CIM_ERR_NOT_SUPPORTED
- CIM_ERR_INVALID_PARAMETER (including missing, duplicate, unrecognized
+ CIM_ERR_INVALID_PARAMETER (including missing, duplicate, unrecognized
or otherwise incorrect parameters)
- CIM_ERR_ALREADY_EXISTS (the CIM Instance already exists -- only
+ CIM_ERR_ALREADY_EXISTS (the CIM Instance already exists -- only
valid if modify_existing is False, indicating that the operation
was CreateInstance)
- CIM_ERR_NOT_FOUND (the CIM Instance does not exist -- only valid
+ CIM_ERR_NOT_FOUND (the CIM Instance does not exist -- only valid
if modify_existing is True, indicating that the operation
was ModifyInstance)
CIM_ERR_FAILED (some other unspecified error occurred)
@@ -119,21 +119,21 @@ class LMI_SoftwareInstallationJob(CIMProvider2):
Keyword arguments:
env -- Provider Environment (pycimmb.ProviderEnvironment)
- instance_name -- A pywbem.CIMInstanceName specifying the instance
+ instance_name -- A pywbem.CIMInstanceName specifying the instance
to delete.
Possible Errors:
CIM_ERR_ACCESS_DENIED
CIM_ERR_NOT_SUPPORTED
CIM_ERR_INVALID_NAMESPACE
- CIM_ERR_INVALID_PARAMETER (including missing, duplicate, unrecognized
+ CIM_ERR_INVALID_PARAMETER (including missing, duplicate, unrecognized
or otherwise incorrect parameters)
- CIM_ERR_INVALID_CLASS (the CIM Class does not exist in the specified
+ CIM_ERR_INVALID_CLASS (the CIM Class does not exist in the specified
namespace)
- CIM_ERR_NOT_FOUND (the CIM Class does exist, but the requested CIM
+ CIM_ERR_NOT_FOUND (the CIM Class does exist, but the requested CIM
Instance does not exist in the specified namespace)
CIM_ERR_FAILED (some other unspecified error occurred)
- """
+ """
with YumDB.get_instance() as ydb:
job = InstallationJob.object_path2job(instance_name)
try:
@@ -159,15 +159,15 @@ class LMI_SoftwareInstallationJob(CIMProvider2):
requests being overwritten or lost. If 0 is returned, then the
task completed successfully. Any other return code indicates an
error condition.
-
+
Keyword arguments:
env -- Provider Environment (pycimmb.ProviderEnvironment)
- object_name -- A pywbem.CIMInstanceName or pywbem.CIMCLassName
- specifying the object on which the method RequestStateChange()
+ object_name -- A pywbem.CIMInstanceName or pywbem.CIMCLassName
+ specifying the object on which the method RequestStateChange()
should be invoked.
param_requestedstate -- The input parameter RequestedState (
type pywbem.Uint16
- self.Values.RequestStateChange.RequestedState)
+ self.Values.RequestStateChange.RequestedState)
RequestStateChange changes the state of a job. The possible
values are as follows: Start (2) changes the state to
'Running'. Suspend (3) stops the job temporarily. The
@@ -180,9 +180,9 @@ class LMI_SoftwareInstallationJob(CIMProvider2):
data or preserve the state. Service (6) puts the job into a
vendor-specific service state. It might be possible to restart
the job.
-
+
param_timeoutperiod -- The input parameter TimeoutPeriod (
- type pywbem.CIMDateTime)
+ type pywbem.CIMDateTime)
A timeout period that specifies the maximum amount of time that
the client expects the transition to the new state to take.
The interval format must be used to specify the TimeoutPeriod.
@@ -191,7 +191,7 @@ class LMI_SoftwareInstallationJob(CIMProvider2):
does not contain 0 or null and the implementation does not
support this parameter, a return code of 'Use Of Timeout
Parameter Not Supported' must be returned.
-
+
Returns a two-tuple containing the return value (
type pywbem.Uint32 self.Values.RequestStateChange)
@@ -201,11 +201,11 @@ class LMI_SoftwareInstallationJob(CIMProvider2):
Possible Errors:
CIM_ERR_ACCESS_DENIED
- CIM_ERR_INVALID_PARAMETER (including missing, duplicate,
+ CIM_ERR_INVALID_PARAMETER (including missing, duplicate,
unrecognized or otherwise incorrect parameters)
- CIM_ERR_NOT_FOUND (the target CIM Class or instance does not
+ CIM_ERR_NOT_FOUND (the target CIM Class or instance does not
exist in the specified namespace)
- CIM_ERR_METHOD_NOT_AVAILABLE (the CIM Server is unable to honor
+ CIM_ERR_METHOD_NOT_AVAILABLE (the CIM Server is unable to honor
the invocation request)
CIM_ERR_FAILED (some other unspecified error occurred)
"""
@@ -227,7 +227,7 @@ class LMI_SoftwareInstallationJob(CIMProvider2):
raise pywbem.CIMError(pywbem.CIM_ERR_FAILED,
getattr(exc, 'message', str(exc)))
return (self.values.GetErrors.Success, [])
-
+
@cmpi_logging.trace_method
def cim_method_geterrors(self, env, object_name):
"""Implements LMI_SoftwareInstallationJob.GetErrors()
@@ -239,11 +239,11 @@ class LMI_SoftwareInstallationJob(CIMProvider2):
job. If Operatational Status is not "OK" or "Completed"then
GetErrors may return CIM_Error instances related to the running of
the job.
-
+
Keyword arguments:
env -- Provider Environment (pycimmb.ProviderEnvironment)
- object_name -- A pywbem.CIMInstanceName or pywbem.CIMCLassName
- specifying the object on which the method GetErrors()
+ object_name -- A pywbem.CIMInstanceName or pywbem.CIMCLassName
+ specifying the object on which the method GetErrors()
should be invoked.
Returns a two-tuple containing the return value (
@@ -251,19 +251,19 @@ class LMI_SoftwareInstallationJob(CIMProvider2):
and a list of CIMParameter objects representing the output parameters
Output parameters:
- Errors -- (type pywbem.CIMInstance(classname='CIM_Error', ...))
+ Errors -- (type pywbem.CIMInstance(classname='CIM_Error', ...))
If the OperationalStatus on the Job is not "OK", then this
method will return one or more CIM Error instance(s).
Otherwise, when the Job is "OK", null is returned.
-
+
Possible Errors:
CIM_ERR_ACCESS_DENIED
- CIM_ERR_INVALID_PARAMETER (including missing, duplicate,
+ CIM_ERR_INVALID_PARAMETER (including missing, duplicate,
unrecognized or otherwise incorrect parameters)
- CIM_ERR_NOT_FOUND (the target CIM Class or instance does not
+ CIM_ERR_NOT_FOUND (the target CIM Class or instance does not
exist in the specified namespace)
- CIM_ERR_METHOD_NOT_AVAILABLE (the CIM Server is unable to honor
+ CIM_ERR_METHOD_NOT_AVAILABLE (the CIM Server is unable to honor
the invocation request)
CIM_ERR_FAILED (some other unspecified error occurred)
"""
@@ -304,17 +304,17 @@ class LMI_SoftwareInstallationJob(CIMProvider2):
'Kill' options to allow this distinction. A method to kill this
job and any underlying processes, and to remove any 'dangling'
associations.
-
+
Keyword arguments:
env -- Provider Environment (pycimmb.ProviderEnvironment)
- object_name -- A pywbem.CIMInstanceName or pywbem.CIMCLassName
- specifying the object on which the method KillJob()
+ object_name -- A pywbem.CIMInstanceName or pywbem.CIMCLassName
+ specifying the object on which the method KillJob()
should be invoked.
- param_deleteonkill -- The input parameter DeleteOnKill (type bool)
+ param_deleteonkill -- The input parameter DeleteOnKill (type bool)
Indicates whether or not the Job should be automatically
deleted upon termination. This parameter takes precedence over
the property, DeleteOnCompletion.
-
+
Returns a two-tuple containing the return value (
type pywbem.Uint32 self.Values.KillJob)
@@ -324,11 +324,11 @@ class LMI_SoftwareInstallationJob(CIMProvider2):
Possible Errors:
CIM_ERR_ACCESS_DENIED
- CIM_ERR_INVALID_PARAMETER (including missing, duplicate,
+ CIM_ERR_INVALID_PARAMETER (including missing, duplicate,
unrecognized or otherwise incorrect parameters)
- CIM_ERR_NOT_FOUND (the target CIM Class or instance does not
+ CIM_ERR_NOT_FOUND (the target CIM Class or instance does not
exist in the specified namespace)
- CIM_ERR_METHOD_NOT_AVAILABLE (the CIM Server is unable to honor
+ CIM_ERR_METHOD_NOT_AVAILABLE (the CIM Server is unable to honor
the invocation request)
CIM_ERR_FAILED (some other unspecified error occurred)
"""
@@ -344,11 +344,11 @@ class LMI_SoftwareInstallationJob(CIMProvider2):
job has failed because of some internal problem or because the job
has been terminated by a client, then a CIM_Error instance is
returned.
-
+
Keyword arguments:
env -- Provider Environment (pycimmb.ProviderEnvironment)
- object_name -- A pywbem.CIMInstanceName or pywbem.CIMCLassName
- specifying the object on which the method GetError()
+ object_name -- A pywbem.CIMInstanceName or pywbem.CIMCLassName
+ specifying the object on which the method GetError()
should be invoked.
Returns a two-tuple containing the return value (
@@ -356,19 +356,19 @@ class LMI_SoftwareInstallationJob(CIMProvider2):
and a list of CIMParameter objects representing the output parameters
Output parameters:
- Error -- (type pywbem.CIMInstance(classname='CIM_Error', ...))
+ Error -- (type pywbem.CIMInstance(classname='CIM_Error', ...))
If the OperationalStatus on the Job is not "OK", then this
method will return a CIM Error instance. Otherwise, when the
Job is "OK", null is returned.
-
+
Possible Errors:
CIM_ERR_ACCESS_DENIED
- CIM_ERR_INVALID_PARAMETER (including missing, duplicate,
+ CIM_ERR_INVALID_PARAMETER (including missing, duplicate,
unrecognized or otherwise incorrect parameters)
- CIM_ERR_NOT_FOUND (the target CIM Class or instance does not
+ CIM_ERR_NOT_FOUND (the target CIM Class or instance does not
exist in the specified namespace)
- CIM_ERR_METHOD_NOT_AVAILABLE (the CIM Server is unable to honor
+ CIM_ERR_METHOD_NOT_AVAILABLE (the CIM Server is unable to honor
the invocation request)
CIM_ERR_FAILED (some other unspecified error occurred)
"""
diff --git a/src/software/openlmi/software/LMI_SoftwareInstallationService.py b/src/software/openlmi/software/LMI_SoftwareInstallationService.py
index 97d4887..8d29b3d 100644
--- a/src/software/openlmi/software/LMI_SoftwareInstallationService.py
+++ b/src/software/openlmi/software/LMI_SoftwareInstallationService.py
@@ -1,6 +1,6 @@
# Software Management Providers
#
-# Copyright (C) 2013 Red Hat, Inc. All rights reserved.
+# Copyright (C) 2012-2013 Red Hat, Inc. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -29,11 +29,11 @@ from openlmi.software.core import InstallationJob
from openlmi.software.core import InstallationService
class LMI_SoftwareInstallationService(CIMProvider2):
- """Instrument the CIM class LMI_SoftwareInstallationService
+ """Instrument the CIM class LMI_SoftwareInstallationService
A subclass of service which provides methods to install (or update)
Software Identities in ManagedElements.
-
+
"""
def __init__ (self, _env):
@@ -47,19 +47,19 @@ class LMI_SoftwareInstallationService(CIMProvider2):
Keyword arguments:
env -- Provider Environment (pycimmb.ProviderEnvironment)
- model -- A template of the pywbem.CIMInstance to be returned. The
- key properties are set on this instance to correspond to the
+ model -- A template of the pywbem.CIMInstance to be returned. The
+ key properties are set on this instance to correspond to the
instanceName that was requested. The properties of the model
- are already filtered according to the PropertyList from the
+ are already filtered according to the PropertyList from the
request. Only properties present in the model need to be
- given values. If you prefer, you can set all of the
- values, and the instance will be filtered for you.
+ given values. If you prefer, you can set all of the
+ values, and the instance will be filtered for you.
Possible Errors:
CIM_ERR_ACCESS_DENIED
- CIM_ERR_INVALID_PARAMETER (including missing, duplicate, unrecognized
+ CIM_ERR_INVALID_PARAMETER (including missing, duplicate, unrecognized
or otherwise incorrect parameters)
- CIM_ERR_NOT_FOUND (the CIM Class does exist, but the requested CIM
+ CIM_ERR_NOT_FOUND (the CIM Class does exist, but the requested CIM
Instance does not exist in the specified namespace)
CIM_ERR_FAILED (some other unspecified error occurred)
@@ -95,17 +95,17 @@ class LMI_SoftwareInstallationService(CIMProvider2):
"""Enumerate instances.
The WBEM operations EnumerateInstances and EnumerateInstanceNames
- are both mapped to this method.
+ are both mapped to this method.
This method is a python generator
Keyword arguments:
env -- Provider Environment (pycimmb.ProviderEnvironment)
- model -- A template of the pywbem.CIMInstances to be generated.
- The properties of the model are already filtered according to
- the PropertyList from the request. Only properties present in
- the model need to be given values. If you prefer, you can
- always set all of the values, and the instance will be filtered
- for you.
+ model -- A template of the pywbem.CIMInstances to be generated.
+ The properties of the model are already filtered according to
+ the PropertyList from the request. Only properties present in
+ the model need to be given values. If you prefer, you can
+ always set all of the values, and the instance will be filtered
+ for you.
keys_only -- A boolean. True if only the key properties should be
set on the generated instances.
@@ -114,7 +114,7 @@ class LMI_SoftwareInstallationService(CIMProvider2):
"""
model.path.update({'CreationClassName': None, 'SystemName': None,
'Name': None, 'SystemCreationClassName': None})
-
+
objpath = InstallationService.get_path()
for key, value in objpath.keybindings.items():
model[key] = value
@@ -128,22 +128,22 @@ class LMI_SoftwareInstallationService(CIMProvider2):
Keyword arguments:
env -- Provider Environment (pycimmb.ProviderEnvironment)
- instance -- The new pywbem.CIMInstance. If modifying an existing
- instance, the properties on this instance have been filtered by
+ instance -- The new pywbem.CIMInstance. If modifying an existing
+ instance, the properties on this instance have been filtered by
the PropertyList from the request.
modify_existing -- True if ModifyInstance, False if CreateInstance
- Return the new instance. The keys must be set on the new instance.
+ Return the new instance. The keys must be set on the new instance.
Possible Errors:
CIM_ERR_ACCESS_DENIED
CIM_ERR_NOT_SUPPORTED
- CIM_ERR_INVALID_PARAMETER (including missing, duplicate, unrecognized
+ CIM_ERR_INVALID_PARAMETER (including missing, duplicate, unrecognized
or otherwise incorrect parameters)
- CIM_ERR_ALREADY_EXISTS (the CIM Instance already exists -- only
+ CIM_ERR_ALREADY_EXISTS (the CIM Instance already exists -- only
valid if modify_existing is False, indicating that the operation
was CreateInstance)
- CIM_ERR_NOT_FOUND (the CIM Instance does not exist -- only valid
+ CIM_ERR_NOT_FOUND (the CIM Instance does not exist -- only valid
if modify_existing is True, indicating that the operation
was ModifyInstance)
CIM_ERR_FAILED (some other unspecified error occurred)
@@ -157,24 +157,24 @@ class LMI_SoftwareInstallationService(CIMProvider2):
Keyword arguments:
env -- Provider Environment (pycimmb.ProviderEnvironment)
- instance_name -- A pywbem.CIMInstanceName specifying the instance
+ instance_name -- A pywbem.CIMInstanceName specifying the instance
to delete.
Possible Errors:
CIM_ERR_ACCESS_DENIED
CIM_ERR_NOT_SUPPORTED
CIM_ERR_INVALID_NAMESPACE
- CIM_ERR_INVALID_PARAMETER (including missing, duplicate, unrecognized
+ CIM_ERR_INVALID_PARAMETER (including missing, duplicate, unrecognized
or otherwise incorrect parameters)
- CIM_ERR_INVALID_CLASS (the CIM Class does not exist in the specified
+ CIM_ERR_INVALID_CLASS (the CIM Class does not exist in the specified
namespace)
- CIM_ERR_NOT_FOUND (the CIM Class does exist, but the requested CIM
+ CIM_ERR_NOT_FOUND (the CIM Class does exist, but the requested CIM
Instance does not exist in the specified namespace)
CIM_ERR_FAILED (some other unspecified error occurred)
- """
+ """
raise pywbem.CIMError(pywbem.CIM_ERR_NOT_SUPPORTED)
-
+
@cmpi_logging.trace_method
def cim_method_requeststatechange(self, env, object_name,
param_requestedstate=None,
@@ -194,14 +194,14 @@ class LMI_SoftwareInstallationService(CIMProvider2):
initiated, a ConcreteJob has been created, and its reference
returned in the output parameter Job. Any other return code
indicates an error condition.
-
+
Keyword arguments:
env -- Provider Environment (pycimmb.ProviderEnvironment)
- object_name -- A pywbem.CIMInstanceName or pywbem.CIMCLassName
- specifying the object on which the method RequestStateChange()
+ object_name -- A pywbem.CIMInstanceName or pywbem.CIMCLassName
+ specifying the object on which the method RequestStateChange()
should be invoked.
param_requestedstate -- The input parameter RequestedState (
- type pywbem.Uint16 self.Values.RequestStateChange.RequestedState)
+ type pywbem.Uint16 self.Values.RequestStateChange.RequestedState)
The state requested for the element. This information will be
placed into the RequestedState property of the instance if the
return code of the RequestStateChange method is 0 ('Completed
@@ -209,9 +209,9 @@ class LMI_SoftwareInstallationService(CIMProvider2):
the description of the EnabledState and RequestedState
properties for the detailed explanations of the RequestedState
values.
-
+
param_timeoutperiod -- The input parameter TimeoutPeriod (
- type pywbem.CIMDateTime)
+ type pywbem.CIMDateTime)
A timeout period that specifies the maximum amount of time that
the client expects the transition to the new state to take.
The interval format must be used to specify the TimeoutPeriod.
@@ -220,7 +220,7 @@ class LMI_SoftwareInstallationService(CIMProvider2):
does not contain 0 or null and the implementation does not
support this parameter, a return code of 'Use Of Timeout
Parameter Not Supported' shall be returned.
-
+
Returns a two-tuple containing the return value (
type pywbem.Uint32 self.Values.RequestStateChange)
@@ -231,15 +231,15 @@ class LMI_SoftwareInstallationService(CIMProvider2):
classname='CIM_ConcreteJob', ...))
May contain a reference to the ConcreteJob created to track the
state transition initiated by the method invocation.
-
+
Possible Errors:
CIM_ERR_ACCESS_DENIED
- CIM_ERR_INVALID_PARAMETER (including missing, duplicate,
+ CIM_ERR_INVALID_PARAMETER (including missing, duplicate,
unrecognized or otherwise incorrect parameters)
- CIM_ERR_NOT_FOUND (the target CIM Class or instance does not
+ CIM_ERR_NOT_FOUND (the target CIM Class or instance does not
exist in the specified namespace)
- CIM_ERR_METHOD_NOT_AVAILABLE (the CIM Server is unable to honor
+ CIM_ERR_METHOD_NOT_AVAILABLE (the CIM Server is unable to honor
the invocation request)
CIM_ERR_FAILED (some other unspecified error occurred)
"""
@@ -247,7 +247,7 @@ class LMI_SoftwareInstallationService(CIMProvider2):
out_params += [pywbem.CIMParameter('Job', type='reference', value=None)]
return ( self.values.RequestStateChange.Not_Supported
, out_params)
-
+
@cmpi_logging.trace_method
def cim_method_stopservice(self, env, object_name):
"""Implements LMI_SoftwareInstallationService.StopService()
@@ -268,11 +268,11 @@ class LMI_SoftwareInstallationService(CIMProvider2):
inherited from EnabledLogicalElement. This method is maintained
because it has been widely implemented, and its simple "stop"
semantics are convenient to use.
-
+
Keyword arguments:
env -- Provider Environment (pycimmb.ProviderEnvironment)
- object_name -- A pywbem.CIMInstanceName or pywbem.CIMCLassName
- specifying the object on which the method StopService()
+ object_name -- A pywbem.CIMInstanceName or pywbem.CIMCLassName
+ specifying the object on which the method StopService()
should be invoked.
Returns a two-tuple containing the return value (type pywbem.Uint32)
@@ -282,18 +282,18 @@ class LMI_SoftwareInstallationService(CIMProvider2):
Possible Errors:
CIM_ERR_ACCESS_DENIED
- CIM_ERR_INVALID_PARAMETER (including missing, duplicate,
+ CIM_ERR_INVALID_PARAMETER (including missing, duplicate,
unrecognized or otherwise incorrect parameters)
- CIM_ERR_NOT_FOUND (the target CIM Class or instance does not
+ CIM_ERR_NOT_FOUND (the target CIM Class or instance does not
exist in the specified namespace)
- CIM_ERR_METHOD_NOT_AVAILABLE (the CIM Server is unable to honor
+ CIM_ERR_METHOD_NOT_AVAILABLE (the CIM Server is unable to honor
the invocation request)
CIM_ERR_FAILED (some other unspecified error occurred)
"""
rval = pywbem.Uint32(1) # Not Supported
return (rval, [])
-
+
@cmpi_logging.trace_method
def cim_method_installfromuri(self, env, object_name,
param_installoptionsvalues=None,
@@ -311,14 +311,14 @@ class LMI_SoftwareInstallationService(CIMProvider2):
If 4096/0x1000 is returned, a ConcreteJob will be started to to
perform the install. The Job's reference will be returned in the
output parameter Job.
-
+
Keyword arguments:
env -- Provider Environment (pycimmb.ProviderEnvironment)
- object_name -- A pywbem.CIMInstanceName or pywbem.CIMCLassName
- specifying the object on which the method InstallFromURI()
+ object_name -- A pywbem.CIMInstanceName or pywbem.CIMCLassName
+ specifying the object on which the method InstallFromURI()
should be invoked.
param_installoptionsvalues -- The input parameter \
- InstallOptionsValues (type [unicode,])
+ InstallOptionsValues (type [unicode,])
InstallOptionsValues is an array of strings providing
additionalinformation to InstallOptions for the method to
install the software. Each entry of this array is related to
@@ -329,21 +329,21 @@ class LMI_SoftwareInstallationService(CIMProvider2):
parameter of the
InstallationService.InstallFromSoftwareIdentity
method.
-
- param_uri -- The input parameter URI (type unicode)
+
+ param_uri -- The input parameter URI (type unicode)
A URI for the software based on RFC 2079.
-
+
param_installoptions -- The input parameter InstallOptions (
type [pywbem.Uint16,] self.Values.InstallFromURI.InstallOptions)
Options to control the install process. See the InstallOptions
parameter of the
InstallationService.InstallFromSoftwareIdentity method
for the description of these values.
-
+
param_target -- The input parameter Target (type REF (
- pywbem.CIMInstanceName(classname='CIM_ManagedElement', ...))
+ pywbem.CIMInstanceName(classname='CIM_ManagedElement', ...))
The installation target.
-
+
Returns a two-tuple containing the return value (
type pywbem.Uint32 self.Values.InstallFromURI)
@@ -351,17 +351,17 @@ class LMI_SoftwareInstallationService(CIMProvider2):
Output parameters:
Job -- (type REF (pywbem.CIMInstanceName(
- classname='CIM_ConcreteJob', ...))
+ classname='CIM_ConcreteJob', ...))
Reference to the job (may be null if job completed).
-
+
Possible Errors:
CIM_ERR_ACCESS_DENIED
- CIM_ERR_INVALID_PARAMETER (including missing, duplicate,
+ CIM_ERR_INVALID_PARAMETER (including missing, duplicate,
unrecognized or otherwise incorrect parameters)
- CIM_ERR_NOT_FOUND (the target CIM Class or instance does not
+ CIM_ERR_NOT_FOUND (the target CIM Class or instance does not
exist in the specified namespace)
- CIM_ERR_METHOD_NOT_AVAILABLE (the CIM Server is unable to honor
+ CIM_ERR_METHOD_NOT_AVAILABLE (the CIM Server is unable to honor
the invocation request)
CIM_ERR_FAILED (some other unspecified error occurred)
"""
@@ -379,7 +379,7 @@ class LMI_SoftwareInstallationService(CIMProvider2):
"installation failed: %s", exc.description)
rval = exc.return_code
return (rval, out_params)
-
+
@cmpi_logging.trace_method
def cim_method_checksoftwareidentity(self, env, object_name,
param_source=None,
@@ -397,23 +397,23 @@ class LMI_SoftwareInstallationService(CIMProvider2):
parameters. The Collection parameter is only supported if
SoftwareInstallationServiceCapabilities.CanAddToCollection is
TRUE.
-
+
Keyword arguments:
env -- Provider Environment (pycimmb.ProviderEnvironment)
- object_name -- A pywbem.CIMInstanceName or pywbem.CIMCLassName
- specifying the object on which the method CheckSoftwareIdentity()
+ object_name -- A pywbem.CIMInstanceName or pywbem.CIMCLassName
+ specifying the object on which the method CheckSoftwareIdentity()
should be invoked.
param_source -- The input parameter Source (type REF (
- pywbem.CIMInstanceName(classname='CIM_SoftwareIdentity', ...))
+ pywbem.CIMInstanceName(classname='CIM_SoftwareIdentity', ...))
Reference to the SoftwareIdentity to be checked.
-
+
param_target -- The input parameter Target (type REF (
- pywbem.CIMInstanceName(classname='CIM_ManagedElement', ...))
+ pywbem.CIMInstanceName(classname='CIM_ManagedElement', ...))
Reference to the ManagedElement that the Software Identity is
going to be installed in (or updated).
-
+
param_collection -- The input parameter Collection (type REF (
- pywbem.CIMInstanceName(classname='CIM_Collection', ...))
+ pywbem.CIMInstanceName(classname='CIM_Collection', ...))
Reference to the Collection to which the Software Identity will
be added.
@@ -423,7 +423,7 @@ class LMI_SoftwareInstallationService(CIMProvider2):
Output parameters:
InstallCharacteristics -- (type [pywbem.Uint16,]
- self.Values.CheckSoftwareIdentity.InstallCharacteristics)
+ self.Values.CheckSoftwareIdentity.InstallCharacteristics)
The parameter describes the characteristics of the
installation/update that will take place if the Source
Software Identity is installed: Target automatic reset: The
@@ -433,11 +433,11 @@ class LMI_SoftwareInstallationService(CIMProvider2):
system itself) will automatically reset/reboot once the
installation is complete. Separate target reset required:
EnabledLogicalElement.RequestStateChange MUST be used to reset
- the target element after the SoftwareIdentity is installed.
+ the target element after the SoftwareIdentity is installed.
Separate system reset required:
EnabledLogicalElement.RequestStateChange MUST be used to
reset/reboot the containing system of the target
- ManagedElement after the SoftwareIdentity is installed.
+ ManagedElement after the SoftwareIdentity is installed.
Manual Reboot Required: The system MUST be manually rebooted
by the user. No reboot required : No reboot is required after
installation. User Intervention Recomended : It is
@@ -448,16 +448,16 @@ class LMI_SoftwareInstallationService(CIMProvider2):
Possible Errors:
CIM_ERR_ACCESS_DENIED
- CIM_ERR_INVALID_PARAMETER (including missing, duplicate,
+ CIM_ERR_INVALID_PARAMETER (including missing, duplicate,
unrecognized or otherwise incorrect parameters)
- CIM_ERR_NOT_FOUND (the target CIM Class or instance does not
+ CIM_ERR_NOT_FOUND (the target CIM Class or instance does not
exist in the specified namespace)
- CIM_ERR_METHOD_NOT_AVAILABLE (the CIM Server is unable to honor
+ CIM_ERR_METHOD_NOT_AVAILABLE (the CIM Server is unable to honor
the invocation request)
CIM_ERR_FAILED (some other unspecified error occurred)
"""
raise pywbem.CIMError(pywbem.CIM_ERR_METHOD_NOT_AVAILABLE)
-
+
@cmpi_logging.trace_method
def cim_method_changeaffectedelementsassignedsequence(self,
env, object_name,
@@ -498,23 +498,23 @@ class LMI_SoftwareInstallationService(CIMProvider2):
instance via CIM_ServiceAffectsElement and are not present in the
ManagedElements parameter array, the AssignedSequence property on
the CIM_ServiceAffects association shall be assigned a value of 0.
-
+
Keyword arguments:
env -- Provider Environment (pycimmb.ProviderEnvironment)
- object_name -- A pywbem.CIMInstanceName or pywbem.CIMCLassName
+ object_name -- A pywbem.CIMInstanceName or pywbem.CIMCLassName
specifying the object on which the method
ChangeAffectedElementsAssignedSequence() should be invoked.
param_managedelements -- The input parameter ManagedElements (
type REF (pywbem.CIMInstanceName(
classname='CIM_ManagedElement', ...)) (Required)
An array of ManagedElements.
-
+
param_assignedsequence -- The input parameter AssignedSequence (
type [pywbem.Uint16,]) (Required)
An array of integers representing AssignedSequence for the
ManagedElement in the corresponding index of the
ManagedElements parameter.
-
+
Returns a two-tuple containing the return value (
type pywbem.Uint32 self.Values. \
@@ -523,18 +523,18 @@ class LMI_SoftwareInstallationService(CIMProvider2):
Output parameters:
Job -- (type REF (pywbem.CIMInstanceName(
- classname='CIM_ConcreteJob', ...))
+ classname='CIM_ConcreteJob', ...))
Reference to the job spawned if the operation continues after
the method returns. (May be null if the task is completed).
-
+
Possible Errors:
CIM_ERR_ACCESS_DENIED
- CIM_ERR_INVALID_PARAMETER (including missing, duplicate,
+ CIM_ERR_INVALID_PARAMETER (including missing, duplicate,
unrecognized or otherwise incorrect parameters)
- CIM_ERR_NOT_FOUND (the target CIM Class or instance does not
+ CIM_ERR_NOT_FOUND (the target CIM Class or instance does not
exist in the specified namespace)
- CIM_ERR_METHOD_NOT_AVAILABLE (the CIM Server is unable to honor
+ CIM_ERR_METHOD_NOT_AVAILABLE (the CIM Server is unable to honor
the invocation request)
CIM_ERR_FAILED (some other unspecified error occurred)
@@ -562,16 +562,16 @@ class LMI_SoftwareInstallationService(CIMProvider2):
and no ConcreteJob instance was required. If 4096/0x1000 is
returned, a ConcreteJob will be started to perform the install.
The Job's reference will be returned in the output parameter Job.
-
+
Keyword arguments:
env -- Provider Environment (pycimmb.ProviderEnvironment)
- object_name -- A pywbem.CIMInstanceName or pywbem.CIMCLassName
+ object_name -- A pywbem.CIMInstanceName or pywbem.CIMCLassName
specifying the object on which the method
- InstallFromSoftwareIdentity()
+ InstallFromSoftwareIdentity()
should be invoked.
param_installoptions -- The input parameter InstallOptions (
type [pywbem.Uint16,] self.Values.InstallFromSoftwareIdentity.\
- InstallOptions)
+ InstallOptions)
Options to control the install process. Defer target/system
reset : do not automatically reset the target/system. Force
installation : Force the installation of the same or an older
@@ -592,26 +592,26 @@ class LMI_SoftwareInstallationService(CIMProvider2):
software in the administrative mode. ScheduleInstallAt:
Indicates the time at which theinstall or update of the
software will occur.
-
+
param_target -- The input parameter Target (type REF (
- pywbem.CIMInstanceName(classname='CIM_ManagedElement', ...))
+ pywbem.CIMInstanceName(classname='CIM_ManagedElement', ...))
The installation target. If NULL then the SOftwareIdentity will
be added to Collection only. The underlying implementation is
expected to be able to obtain any necessary metadata from the
Software Identity.
-
+
param_collection -- The input parameter Collection (type REF (
- pywbem.CIMInstanceName(classname='CIM_Collection', ...))
+ pywbem.CIMInstanceName(classname='CIM_Collection', ...))
Reference to the Collection to which the Software Identity
SHALL be added. If NULL then the SOftware Identity will not be
added to a Collection.
-
+
param_source -- The input parameter Source (type REF (
- pywbem.CIMInstanceName(classname='CIM_SoftwareIdentity', ...))
+ pywbem.CIMInstanceName(classname='CIM_SoftwareIdentity', ...))
Reference to the source of the install.
-
+
param_installoptionsvalues -- The input parameter
- InstallOptionsValues (type [unicode,])
+ InstallOptionsValues (type [unicode,])
InstallOptionsValues is an array of strings providing
additional information to InstallOptions for the method to
install the software. Each entry of this array is related to
@@ -629,7 +629,7 @@ class LMI_SoftwareInstallationService(CIMProvider2):
"Force installation","Install", "Update", "Repair" or "Reboot"
then a value at the corresponding index of InstallOptionValues
shall be NULL.
-
+
Returns a two-tuple containing the return value (
type pywbem.Uint32 self.Values.InstallFromSoftwareIdentity)
@@ -637,16 +637,16 @@ class LMI_SoftwareInstallationService(CIMProvider2):
Output parameters:
Job -- (type REF (pywbem.CIMInstanceName(
- classname='CIM_ConcreteJob', ...))
+ classname='CIM_ConcreteJob', ...))
Reference to the job (may be null if job completed).
-
+
Possible Errors:
CIM_ERR_ACCESS_DENIED
- CIM_ERR_INVALID_PARAMETER (including missing, duplicate,
+ CIM_ERR_INVALID_PARAMETER (including missing, duplicate,
unrecognized or otherwise incorrect parameters)
- CIM_ERR_NOT_FOUND (the target CIM Class or instance does not
+ CIM_ERR_NOT_FOUND (the target CIM Class or instance does not
exist in the specified namespace)
- CIM_ERR_METHOD_NOT_AVAILABLE (the CIM Server is unable to honor
+ CIM_ERR_METHOD_NOT_AVAILABLE (the CIM Server is unable to honor
the invocation request)
CIM_ERR_FAILED (some other unspecified error occurred)
"""
@@ -665,7 +665,7 @@ class LMI_SoftwareInstallationService(CIMProvider2):
"installation failed: %s", exc.description)
rval = exc.return_code
return (rval, out_params)
-
+
@cmpi_logging.trace_method
def cim_method_startservice(self, env, object_name):
"""Implements LMI_SoftwareInstallationService.StartService()
@@ -686,11 +686,11 @@ class LMI_SoftwareInstallationService(CIMProvider2):
inherited from EnabledLogicalElement. This method is maintained
because it has been widely implemented, and its simple "start"
semantics are convenient to use.
-
+
Keyword arguments:
env -- Provider Environment (pycimmb.ProviderEnvironment)
- object_name -- A pywbem.CIMInstanceName or pywbem.CIMCLassName
- specifying the object on which the method StartService()
+ object_name -- A pywbem.CIMInstanceName or pywbem.CIMCLassName
+ specifying the object on which the method StartService()
should be invoked.
Returns a two-tuple containing the return value (type pywbem.Uint32)
@@ -700,17 +700,17 @@ class LMI_SoftwareInstallationService(CIMProvider2):
Possible Errors:
CIM_ERR_ACCESS_DENIED
- CIM_ERR_INVALID_PARAMETER (including missing, duplicate,
+ CIM_ERR_INVALID_PARAMETER (including missing, duplicate,
unrecognized or otherwise incorrect parameters)
- CIM_ERR_NOT_FOUND (the target CIM Class or instance does not
+ CIM_ERR_NOT_FOUND (the target CIM Class or instance does not
exist in the specified namespace)
- CIM_ERR_METHOD_NOT_AVAILABLE (the CIM Server is unable to honor
+ CIM_ERR_METHOD_NOT_AVAILABLE (the CIM Server is unable to honor
the invocation request)
CIM_ERR_FAILED (some other unspecified error occurred)
"""
rval = pywbem.Uint32(1) # Not Supported
return (rval, [])
-
+
@cmpi_logging.trace_method
def cim_method_installfrombytestream(self, env, object_name,
param_installoptionsvalues=None,
@@ -728,13 +728,13 @@ class LMI_SoftwareInstallationService(CIMProvider2):
required. If 4096/0x1000 is returned, a ConcreteJob will be
started to to perform the install. The Job's reference will be
returned in the output parameter Job.
-
+
Keyword arguments:
env -- Provider Environment (pycimmb.ProviderEnvironment)
- object_name -- A pywbem.CIMInstanceName or pywbem.CIMCLassName
- specifying the object on which the method InstallFromByteStream()
+ object_name -- A pywbem.CIMInstanceName or pywbem.CIMCLassName
+ specifying the object on which the method InstallFromByteStream()
should be invoked.
- param_installoptionsvalues -- The input parameter InstallOptionsValues (type [unicode,])
+ param_installoptionsvalues -- The input parameter InstallOptionsValues (type [unicode,])
InstallOptionsValues is an array of strings providing
additional information to InstallOptions for the method to
install the software. Each entry of this array is related to
@@ -745,35 +745,35 @@ class LMI_SoftwareInstallationService(CIMProvider2):
parameter of the
InstallationService.InstallFromSoftwareIdentity
method.
-
- param_image -- The input parameter Image (type [pywbem.Uint8,])
+
+ param_image -- The input parameter Image (type [pywbem.Uint8,])
A array of bytes containing the install image.
-
- param_installoptions -- The input parameter InstallOptions (type [pywbem.Uint16,] self.Values.InstallFromByteStream.InstallOptions)
+
+ param_installoptions -- The input parameter InstallOptions (type [pywbem.Uint16,] self.Values.InstallFromByteStream.InstallOptions)
Options to control the install process. See the InstallOptions
parameter of the
InstallationService.InstallFromSoftwareIdentity method
for the description of these values.
-
- param_target -- The input parameter Target (type REF (pywbem.CIMInstanceName(classname='CIM_ManagedElement', ...))
+
+ param_target -- The input parameter Target (type REF (pywbem.CIMInstanceName(classname='CIM_ManagedElement', ...))
The installation target.
-
+
Returns a two-tuple containing the return value (type pywbem.Uint32 self.Values.InstallFromByteStream)
and a list of CIMParameter objects representing the output parameters
Output parameters:
- Job -- (type REF (pywbem.CIMInstanceName(classname='CIM_ConcreteJob', ...))
+ Job -- (type REF (pywbem.CIMInstanceName(classname='CIM_ConcreteJob', ...))
Reference to the job (may be null if job completed).
-
+
Possible Errors:
CIM_ERR_ACCESS_DENIED
- CIM_ERR_INVALID_PARAMETER (including missing, duplicate,
+ CIM_ERR_INVALID_PARAMETER (including missing, duplicate,
unrecognized or otherwise incorrect parameters)
- CIM_ERR_NOT_FOUND (the target CIM Class or instance does not
+ CIM_ERR_NOT_FOUND (the target CIM Class or instance does not
exist in the specified namespace)
- CIM_ERR_METHOD_NOT_AVAILABLE (the CIM Server is unable to honor
+ CIM_ERR_METHOD_NOT_AVAILABLE (the CIM Server is unable to honor
the invocation request)
CIM_ERR_FAILED (some other unspecified error occurred)
diff --git a/src/software/openlmi/software/LMI_SystemSoftwareCollection.py b/src/software/openlmi/software/LMI_SystemSoftwareCollection.py
index fb43dc4..a392994 100644
--- a/src/software/openlmi/software/LMI_SystemSoftwareCollection.py
+++ b/src/software/openlmi/software/LMI_SystemSoftwareCollection.py
@@ -1,6 +1,6 @@
# Software Management Providers
#
-# Copyright (C) 2013 Red Hat, Inc. All rights reserved.
+# Copyright (C) 2012-2013 Red Hat, Inc. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -27,7 +27,7 @@ from openlmi.common import cmpi_logging
from openlmi.software.core import SystemCollection
class LMI_SystemSoftwareCollection(CIMProvider2):
- """Instrument the CIM class LMI_SystemSoftwareCollection
+ """Instrument the CIM class LMI_SystemSoftwareCollection
SystemSoftwareCollection represents the general concept of a collection
that is scoped (or contained) by a System. It represents a Collection
@@ -42,7 +42,7 @@ class LMI_SystemSoftwareCollection(CIMProvider2):
in the domain. In other words, the context of the Collection is
restricted to the domain, and its members are also limited by the
domain.
-
+
"""
def __init__ (self, _env):
@@ -55,19 +55,19 @@ class LMI_SystemSoftwareCollection(CIMProvider2):
Keyword arguments:
env -- Provider Environment (pycimmb.ProviderEnvironment)
- model -- A template of the pywbem.CIMInstance to be returned. The
- key properties are set on this instance to correspond to the
+ model -- A template of the pywbem.CIMInstance to be returned. The
+ key properties are set on this instance to correspond to the
instanceName that was requested. The properties of the model
- are already filtered according to the PropertyList from the
+ are already filtered according to the PropertyList from the
request. Only properties present in the model need to be
- given values. If you prefer, you can set all of the
- values, and the instance will be filtered for you.
+ given values. If you prefer, you can set all of the
+ values, and the instance will be filtered for you.
Possible Errors:
CIM_ERR_ACCESS_DENIED
- CIM_ERR_INVALID_PARAMETER (including missing, duplicate, unrecognized
+ CIM_ERR_INVALID_PARAMETER (including missing, duplicate, unrecognized
or otherwise incorrect parameters)
- CIM_ERR_NOT_FOUND (the CIM Class does exist, but the requested CIM
+ CIM_ERR_NOT_FOUND (the CIM Class does exist, but the requested CIM
Instance does not exist in the specified namespace)
CIM_ERR_FAILED (some other unspecified error occurred)
@@ -80,8 +80,8 @@ class LMI_SystemSoftwareCollection(CIMProvider2):
"No such instance.")
model['Caption'] = "System RPM Package Collection"
- #model['Description'] = '' # TODO
- #model['ElementName'] = '' # TODO
+ #model['Description'] = '' # TODO
+ #model['ElementName'] = '' # TODO
return model
@cmpi_logging.trace_method
@@ -89,17 +89,17 @@ class LMI_SystemSoftwareCollection(CIMProvider2):
"""Enumerate instances.
The WBEM operations EnumerateInstances and EnumerateInstanceNames
- are both mapped to this method.
+ are both mapped to this method.
This method is a python generator
Keyword arguments:
env -- Provider Environment (pycimmb.ProviderEnvironment)
- model -- A template of the pywbem.CIMInstances to be generated.
- The properties of the model are already filtered according to
- the PropertyList from the request. Only properties present in
- the model need to be given values. If you prefer, you can
- always set all of the values, and the instance will be filtered
- for you.
+ model -- A template of the pywbem.CIMInstances to be generated.
+ The properties of the model are already filtered according to
+ the PropertyList from the request. Only properties present in
+ the model need to be given values. If you prefer, you can
+ always set all of the values, and the instance will be filtered
+ for you.
keys_only -- A boolean. True if only the key properties should be
set on the generated instances.
@@ -109,9 +109,9 @@ class LMI_SystemSoftwareCollection(CIMProvider2):
"""
# Prime model.path with knowledge of the keys, so key values on
# the CIMInstanceName (model.path) will automatically be set when
- # we set property values on the model.
+ # we set property values on the model.
model.path.update({'InstanceID': None})
-
+
model['InstanceID'] = SystemCollection.get_path()["InstanceID"]
if keys_only is False:
yield self.get_instance(env, model)
@@ -124,22 +124,22 @@ class LMI_SystemSoftwareCollection(CIMProvider2):
Keyword arguments:
env -- Provider Environment (pycimmb.ProviderEnvironment)
- instance -- The new pywbem.CIMInstance. If modifying an existing
- instance, the properties on this instance have been filtered by
+ instance -- The new pywbem.CIMInstance. If modifying an existing
+ instance, the properties on this instance have been filtered by
the PropertyList from the request.
modify_existing -- True if ModifyInstance, False if CreateInstance
- Return the new instance. The keys must be set on the new instance.
+ Return the new instance. The keys must be set on the new instance.
Possible Errors:
CIM_ERR_ACCESS_DENIED
CIM_ERR_NOT_SUPPORTED
- CIM_ERR_INVALID_PARAMETER (including missing, duplicate, unrecognized
+ CIM_ERR_INVALID_PARAMETER (including missing, duplicate, unrecognized
or otherwise incorrect parameters)
- CIM_ERR_ALREADY_EXISTS (the CIM Instance already exists -- only
+ CIM_ERR_ALREADY_EXISTS (the CIM Instance already exists -- only
valid if modify_existing is False, indicating that the operation
was CreateInstance)
- CIM_ERR_NOT_FOUND (the CIM Instance does not exist -- only valid
+ CIM_ERR_NOT_FOUND (the CIM Instance does not exist -- only valid
if modify_existing is True, indicating that the operation
was ModifyInstance)
CIM_ERR_FAILED (some other unspecified error occurred)
@@ -153,21 +153,21 @@ class LMI_SystemSoftwareCollection(CIMProvider2):
Keyword arguments:
env -- Provider Environment (pycimmb.ProviderEnvironment)
- instance_name -- A pywbem.CIMInstanceName specifying the instance
+ instance_name -- A pywbem.CIMInstanceName specifying the instance
to delete.
Possible Errors:
CIM_ERR_ACCESS_DENIED
CIM_ERR_NOT_SUPPORTED
CIM_ERR_INVALID_NAMESPACE
- CIM_ERR_INVALID_PARAMETER (including missing, duplicate, unrecognized
+ CIM_ERR_INVALID_PARAMETER (including missing, duplicate, unrecognized
or otherwise incorrect parameters)
- CIM_ERR_INVALID_CLASS (the CIM Class does not exist in the specified
+ CIM_ERR_INVALID_CLASS (the CIM Class does not exist in the specified
namespace)
- CIM_ERR_NOT_FOUND (the CIM Class does exist, but the requested CIM
+ CIM_ERR_NOT_FOUND (the CIM Class does exist, but the requested CIM
Instance does not exist in the specified namespace)
CIM_ERR_FAILED (some other unspecified error occurred)
- """
+ """
raise pywbem.CIMError(pywbem.CIM_ERR_NOT_SUPPORTED)
diff --git a/src/software/openlmi/software/__init__.py b/src/software/openlmi/software/__init__.py
index fcae716..ffdae3f 100644
--- a/src/software/openlmi/software/__init__.py
+++ b/src/software/openlmi/software/__init__.py
@@ -1,6 +1,6 @@
# Software Management Providers
#
-# Copyright (C) 2013 Red Hat, Inc. All rights reserved.
+# Copyright (C) 2012-2013 Red Hat, Inc. All rights reserved.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
diff --git a/src/software/openlmi/software/cimom_entry.py b/src/software/openlmi/software/cimom_entry.py
index 7429b51..033e06f 100644
--- a/src/software/openlmi/software/cimom_entry.py
+++ b/src/software/openlmi/software/cimom_entry.py
@@ -1,7 +1,7 @@
# -*- encoding: utf-8 -*-
# Software Management Providers
#
-# Copyright (C) 2013 Red Hat, Inc. All rights reserved.
+# Copyright (C) 2012-2013 Red Hat, Inc. All rights reserved.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
diff --git a/src/software/openlmi/software/core/ComputerSystem.py b/src/software/openlmi/software/core/ComputerSystem.py
index b354164..9cbf725 100644
--- a/src/software/openlmi/software/core/ComputerSystem.py
+++ b/src/software/openlmi/software/core/ComputerSystem.py
@@ -1,7 +1,7 @@
# -*- encoding: utf-8 -*-
# Software Management Providers
#
-# Copyright (C) 2013 Red Hat, Inc. All rights reserved.
+# Copyright (C) 2012-2013 Red Hat, Inc. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/src/software/openlmi/software/core/Error.py b/src/software/openlmi/software/core/Error.py
index aa91e7a..ccf4715 100644
--- a/src/software/openlmi/software/core/Error.py
+++ b/src/software/openlmi/software/core/Error.py
@@ -1,7 +1,7 @@
# -*- encoding: utf-8 -*-
# Software Management Providers
#
-# Copyright (C) 2013 Red Hat, Inc. All rights reserved.
+# Copyright (C) 2012-2013 Red Hat, Inc. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/src/software/openlmi/software/core/Identity.py b/src/software/openlmi/software/core/Identity.py
index 6cde2d8..b7e8020 100644
--- a/src/software/openlmi/software/core/Identity.py
+++ b/src/software/openlmi/software/core/Identity.py
@@ -1,7 +1,7 @@
# -*- encoding: utf-8 -*-
# Software Management Providers
#
-# Copyright (C) 2013 Red Hat, Inc. All rights reserved.
+# Copyright (C) 2012-2013 Red Hat, Inc. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,7 +20,7 @@
Just a common functionality related to LMI_SoftwareIdentity provider.
"""
-import pywbem
+import pywbem
from openlmi.common import cmpi_logging
from openlmi.software import util
@@ -245,40 +245,40 @@ def pkg2model(pkg_info, keys_only=True, model=None):
_set_key = model.__setitem__
_set_key('InstanceID', 'LMI:SoftwareIdentity:'+pkg_info.nevra)
if not keys_only:
- #model['BuildNumber'] = pywbem.Uint16() # TODO
+ #model['BuildNumber'] = pywbem.Uint16() # TODO
model['Caption'] = pkg_info.summary
- #model['ClassificationDescriptions'] = ['',] # TODO
+ #model['ClassificationDescriptions'] = ['',] # TODO
model['Classifications'] = [pywbem.Uint16(0)]
#model['CommunicationStatus'] = \
- # self.Values.CommunicationStatus.<VAL> # TODO
+ # self.Values.CommunicationStatus.<VAL> # TODO
model['Description'] = pkg_info.description
- #model['DetailedStatus'] = self.Values.DetailedStatus.<VAL> # TODO
+ #model['DetailedStatus'] = self.Values.DetailedStatus.<VAL> # TODO
model['ElementName'] = pkg_info.nevra
#model['ExtendedResourceType'] = \
- #self.Values.ExtendedResourceType.<VAL> # TODO
- #model['HealthState'] = self.Values.HealthState.<VAL> # TODO
- #model['IdentityInfoType'] = ['',] # TODO
- #model['IdentityInfoValue'] = ['',] # TODO
+ #self.Values.ExtendedResourceType.<VAL> # TODO
+ #model['HealthState'] = self.Values.HealthState.<VAL> # TODO
+ #model['IdentityInfoType'] = ['',] # TODO
+ #model['IdentityInfoValue'] = ['',] # TODO
if pkg_info.installed:
model['InstallDate'] = pywbem.CIMDateTime(pkg_info.install_time)
else:
model['InstallDate'] = pywbem.CIMProperty(
'InstallDate', None, type='datetime')
model['IsEntity'] = True
- #model['IsLargeBuildNumber'] = bool(False) # TODO
- #model['Languages'] = ['',] # TODO
- #model['LargeBuildNumber'] = pywbem.Uint64() # TODO
- #model['MajorVersion'] = pywbem.Uint16() # TODO
- #model['Manufacturer'] = '' # TODO
+ #model['IsLargeBuildNumber'] = bool(False) # TODO
+ #model['Languages'] = ['',] # TODO
+ #model['LargeBuildNumber'] = pywbem.Uint64() # TODO
+ #model['MajorVersion'] = pywbem.Uint16() # TODO
+ #model['Manufacturer'] = '' # TODO
#model['MinExtendedResourceTypeBuildNumber'] = \
- #pywbem.Uint16() # TODO
+ #pywbem.Uint16() # TODO
#model['MinExtendedResourceTypeMajorVersion'] = \
- #pywbem.Uint16() # TODO
+ #pywbem.Uint16() # TODO
#model['MinExtendedResourceTypeMinorVersion'] = \
- #pywbem.Uint16() # TODO
+ #pywbem.Uint16() # TODO
#model['MinExtendedResourceTypeRevisionNumber'] = \
- #pywbem.Uint16() # TODO
- #model['MinorVersion'] = pywbem.Uint16() # TODO
+ #pywbem.Uint16() # TODO
+ #model['MinorVersion'] = pywbem.Uint16() # TODO
model['Name'] = pkg_info.name
try:
model["Epoch"] = pywbem.Uint32(int(pkg_info.epoch))
@@ -290,18 +290,18 @@ def pkg2model(pkg_info, keys_only=True, model=None):
model['Release'] = pkg_info.release
model['Architecture'] = pkg_info.arch
#model['OperatingStatus'] = \
- #self.Values.OperatingStatus.<VAL> # TODO
+ #self.Values.OperatingStatus.<VAL> # TODO
#model['OperationalStatus'] = \
- #[self.Values.OperationalStatus.<VAL>,] # TODO
- #model['OtherExtendedResourceTypeDescription'] = '' # TODO
- #model['PrimaryStatus'] = self.Values.PrimaryStatus.<VAL> # TODO
- #model['ReleaseDate'] = pywbem.CIMDateTime() # TODO
- #model['RevisionNumber'] = pywbem.Uint16() # TODO
- #model['SerialNumber'] = '' # TODO
- #model['Status'] = self.Values.Status.<VAL> # TODO
- #model['StatusDescriptions'] = ['',] # TODO
- #model['TargetOperatingSystems'] = ['',] # TODO
- #model['TargetOSTypes'] = [pywbem.Uint16(),] # TODO
+ #[self.Values.OperationalStatus.<VAL>,] # TODO
+ #model['OtherExtendedResourceTypeDescription'] = '' # TODO
+ #model['PrimaryStatus'] = self.Values.PrimaryStatus.<VAL> # TODO
+ #model['ReleaseDate'] = pywbem.CIMDateTime() # TODO
+ #model['RevisionNumber'] = pywbem.Uint16() # TODO
+ #model['SerialNumber'] = '' # TODO
+ #model['Status'] = self.Values.Status.<VAL> # TODO
+ #model['StatusDescriptions'] = ['',] # TODO
+ #model['TargetOperatingSystems'] = ['',] # TODO
+ #model['TargetOSTypes'] = [pywbem.Uint16(),] # TODO
model['TargetTypes'] = ['rpm', 'yum']
model['VersionString'] = pkg_info.evra
return model
diff --git a/src/software/openlmi/software/core/IdentityResource.py b/src/software/openlmi/software/core/IdentityResource.py
index 660e15a..579b0f1 100644
--- a/src/software/openlmi/software/core/IdentityResource.py
+++ b/src/software/openlmi/software/core/IdentityResource.py
@@ -1,7 +1,7 @@
# -*- encoding: utf-8 -*-
# Software Management Providers
#
-# Copyright (C) 2013 Red Hat, Inc. All rights reserved.
+# Copyright (C) 2012-2013 Red Hat, Inc. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/src/software/openlmi/software/core/InstallationJob.py b/src/software/openlmi/software/core/InstallationJob.py
index de13a84..b758f6e 100644
--- a/src/software/openlmi/software/core/InstallationJob.py
+++ b/src/software/openlmi/software/core/InstallationJob.py
@@ -1,7 +1,7 @@
# -*- encoding: utf-8 -*-
# Software Management Providers
#
-# Copyright (C) 2013 Red Hat, Inc. All rights reserved.
+# Copyright (C) 2012-2013 Red Hat, Inc. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -402,7 +402,7 @@ def _fill_nonkeys(job, model):
job.__class__.__name__)
model['Description'] = pywbem.CIMProperty('Description',
type='string', value=None)
- if job.started:
+ if job.started:
if job.finished:
elapsed = job.finished - job.started
else:
diff --git a/src/software/openlmi/software/core/InstallationService.py b/src/software/openlmi/software/core/InstallationService.py
index 5ea87b7..56063f1 100644
--- a/src/software/openlmi/software/core/InstallationService.py
+++ b/src/software/openlmi/software/core/InstallationService.py
@@ -1,7 +1,7 @@
# -*- encoding: utf-8 -*-
# Software Management Providers
#
-# Copyright (C) 2013 Red Hat, Inc. All rights reserved.
+# Copyright (C) 2012-2013 Red Hat, Inc. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -21,7 +21,7 @@ Just a common functionality related to LMI_SoftwareInstallationService
provider.
"""
-import pywbem
+import pywbem
from openlmi.common import cmpi_logging
from openlmi.software.core import ComputerSystem
diff --git a/src/software/openlmi/software/core/SystemCollection.py b/src/software/openlmi/software/core/SystemCollection.py
index 2a250af..6fced8e 100644
--- a/src/software/openlmi/software/core/SystemCollection.py
+++ b/src/software/openlmi/software/core/SystemCollection.py
@@ -1,6 +1,6 @@
# Software Management Providers
#
-# Copyright (C) 2013 Red Hat, Inc. All rights reserved.
+# Copyright (C) 2012-2013 Red Hat, Inc. All rights reserved.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
diff --git a/src/software/openlmi/software/core/__init__.py b/src/software/openlmi/software/core/__init__.py
index ac52940..668e7be 100644
--- a/src/software/openlmi/software/core/__init__.py
+++ b/src/software/openlmi/software/core/__init__.py
@@ -1,6 +1,6 @@
# Software Management Providers
#
-# Copyright (C) 2013 Red Hat, Inc. All rights reserved.
+# Copyright (C) 2012-2013 Red Hat, Inc. All rights reserved.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
diff --git a/src/software/openlmi/software/util/__init__.py b/src/software/openlmi/software/util/__init__.py
index 5aa19b8..f42f25a 100644
--- a/src/software/openlmi/software/util/__init__.py
+++ b/src/software/openlmi/software/util/__init__.py
@@ -1,7 +1,7 @@
# -*- encoding: utf-8 -*-
# Software Management Providers
#
-# Copyright (C) 2013 Red Hat, Inc. All rights reserved.
+# Copyright (C) 2012-2013 Red Hat, Inc. All rights reserved.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
@@ -57,7 +57,7 @@ def get_target_operating_system():
of CIM_SoftwareElement class and text is its testual representation.
"""
- system = platform.system()
+ system = platform.system()
if system.lower() == 'linux':
try:
val, dist = \
diff --git a/src/software/openlmi/software/util/singletonmixin.py b/src/software/openlmi/software/util/singletonmixin.py
index 7b26b8b..c252676 100644
--- a/src/software/openlmi/software/util/singletonmixin.py
+++ b/src/software/openlmi/software/util/singletonmixin.py
@@ -257,7 +257,7 @@ class Singleton(object):
try:
if hasattr(cls.c_instance, '_prepare_to_forget_singleton'):
# tell instance to release anything it might be holding onto.
- cls.c_instance._prepare_to_forget_singleton()
+ cls.c_instance._prepare_to_forget_singleton()
del cls.c_instance
_remove_singleton(cls)
except AttributeError:
diff --git a/src/software/openlmi/software/yumdb/__init__.py b/src/software/openlmi/software/yumdb/__init__.py
index b021e1e..13539bb 100644
--- a/src/software/openlmi/software/yumdb/__init__.py
+++ b/src/software/openlmi/software/yumdb/__init__.py
@@ -1,6 +1,6 @@
# Software Management Providers
#
-# Copyright (C) 2013 Red Hat, Inc. All rights reserved.
+# Copyright (C) 2012-2013 Red Hat, Inc. All rights reserved.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
@@ -68,7 +68,7 @@ YUM_WORKER_DEBUG_LOGGING_CONFIG = {
"default": {
"()": DispatchingFormatter,
"formatters" : {
- "openlmi.software.yumdb.util.trace_function":
+ "openlmi.software.yumdb.util.trace_function":
"%(asctime)s %(levelname)s:%(message)s"
},
"default" : "%(asctime)s %(levelname)s:%(module)s:"
@@ -202,7 +202,7 @@ class YumDB(singletonmixin.Singleton):
Context manager for accessing yum/rpm database.
All requests are bundled into jobs -- instances of jobs.YumJob and
sent to YumWorker for processing.
-
+
YumWorker is a separate process handling all calls to yum api.
Communication is done via queues (uplink and downlink).
Uplink is used to send jobs to YumWorker and downlink for obtaining
@@ -528,7 +528,7 @@ class YumDB(singletonmixin.Singleton):
@param desired_pkg is an instance of PackageInfo,
which must be available
"""
- return self._do_job(_make_async_job(jobs.YumUpdateToPackage,
+ return self._do_job(_make_async_job(jobs.YumUpdateToPackage,
desired_pkg, async=async))
@job_request(async=True)
@@ -597,7 +597,7 @@ class YumDB(singletonmixin.Singleton):
@job_request()
def delete_job(self, jobid):
return self._do_job(jobs.YumJobDelete(jobid))
-
+
@job_request()
def terminate_job(self, jobid):
return self._do_job(jobs.YumJobTerminate(jobid))
diff --git a/src/software/openlmi/software/yumdb/errors.py b/src/software/openlmi/software/yumdb/errors.py
index 06d7ca1..101c40b 100644
--- a/src/software/openlmi/software/yumdb/errors.py
+++ b/src/software/openlmi/software/yumdb/errors.py
@@ -1,7 +1,7 @@
# -*- encoding: utf-8 -*-
# Software Management Providers
#
-# Copyright (C) 2013 Red Hat, Inc. All rights reserved.
+# Copyright (C) 2012-2013 Red Hat, Inc. All rights reserved.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
diff --git a/src/software/openlmi/software/yumdb/jobmanager.py b/src/software/openlmi/software/yumdb/jobmanager.py
index 13ee1f8..872e81f 100644
--- a/src/software/openlmi/software/yumdb/jobmanager.py
+++ b/src/software/openlmi/software/yumdb/jobmanager.py
@@ -1,6 +1,6 @@
# Software Management Providers
#
-# Copyright (C) 2013 Red Hat, Inc. All rights reserved.
+# Copyright (C) 2012-2013 Red Hat, Inc. All rights reserved.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
diff --git a/src/software/openlmi/software/yumdb/jobs.py b/src/software/openlmi/software/yumdb/jobs.py
index 6260b79..a46a2ca 100644
--- a/src/software/openlmi/software/yumdb/jobs.py
+++ b/src/software/openlmi/software/yumdb/jobs.py
@@ -1,7 +1,7 @@
# -*- encoding: utf-8 -*-
# Software Management Providers
#
-# Copyright (C) 2013 Red Hat, Inc. All rights reserved.
+# Copyright (C) 2012-2013 Red Hat, Inc. All rights reserved.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
@@ -406,7 +406,7 @@ class YumFilterPackages(YumGetPackageList): #pylint: disable=R0903
filter on packages.
Arguments (plus those in YumGetPackageList):
name, epoch, version, release, arch, nevra, envra, evra
-
+
Some of those are redundant, but filtering is optimized for
speed, so supplying all of them won't affect performance.
@@ -526,7 +526,7 @@ class YumUpdatePackage(YumSpecificPackageJob): #pylint: disable=R0903
class YumCheckPackage(YumSpecificPackageJob): #pylint: disable=R0903
"""
Request verification information for instaled package and its files.
-
+
Worker replies with new instance of yumdb.PackageCheck.
"""
def __init__(self, pkg, async=False, metadata=None):
@@ -591,7 +591,7 @@ class YumFilterRepositories(YumGetRepositoryList): #pylint: disable=R0903
filter on packages.
Arguments (plus those in YumGetRepositoryList):
name, gpg_check, repo_gpg_check
-
+
Some of those are redundant, but filtering is optimized for
speed, so supplying all of them won't affect performance.
@@ -603,7 +603,7 @@ class YumFilterRepositories(YumGetRepositoryList): #pylint: disable=R0903
repoid=None, gpg_check=None, repo_gpg_check=None):
YumGetRepositoryList.__init__(self, kind)
self.repoid = repoid
- self.gpg_check = None if gpg_check is None else bool(gpg_check)
+ self.gpg_check = None if gpg_check is None else bool(gpg_check)
self.repo_gpg_check = (
None if repo_gpg_check is None else bool(repo_gpg_check))
diff --git a/src/software/openlmi/software/yumdb/packagecheck.py b/src/software/openlmi/software/yumdb/packagecheck.py
index 116b579..4cdc5ee 100644
--- a/src/software/openlmi/software/yumdb/packagecheck.py
+++ b/src/software/openlmi/software/yumdb/packagecheck.py
@@ -1,7 +1,7 @@
# -*- encoding: utf-8 -*-
# Software Management Providers
#
-# Copyright (C) 2013 Red Hat, Inc. All rights reserved.
+# Copyright (C) 2012-2013 Red Hat, Inc. All rights reserved.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
diff --git a/src/software/openlmi/software/yumdb/packageinfo.py b/src/software/openlmi/software/yumdb/packageinfo.py
index dfaa618..a088993 100644
--- a/src/software/openlmi/software/yumdb/packageinfo.py
+++ b/src/software/openlmi/software/yumdb/packageinfo.py
@@ -1,7 +1,7 @@
# -*- encoding: utf-8 -*-
# Software Management Providers
#
-# Copyright (C) 2013 Red Hat, Inc. All rights reserved.
+# Copyright (C) 2012-2013 Red Hat, Inc. All rights reserved.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
@@ -44,7 +44,7 @@ class PackageInfo(object):
'summary', 'description', 'license', 'group', 'vendor',
"repoid", 'size',
'installed', # boolean
- 'install_time' # datetime instance
+ 'install_time' # datetime instance
)
def __init__(self, objid, name, epoch, version, release, arch, **kwargs):
diff --git a/src/software/openlmi/software/yumdb/process.py b/src/software/openlmi/software/yumdb/process.py
index 9d93efb..5f43c35 100644
--- a/src/software/openlmi/software/yumdb/process.py
+++ b/src/software/openlmi/software/yumdb/process.py
@@ -1,7 +1,7 @@
# -*- encoding: utf-8 -*-
# Software Management Providers
#
-# Copyright (C) 2013 Red Hat, Inc. All rights reserved.
+# Copyright (C) 2012-2013 Red Hat, Inc. All rights reserved.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
@@ -100,7 +100,7 @@ def _get_package_filter_function(filters):
class RepoFilterSetter(object):
"""
- A context manager, that will set a repository filter lasting
+ A context manager, that will set a repository filter lasting
as long as the object itself.
"""
def __init__(self, yum_base, include_repos=None, exclude_repos=None):
@@ -198,7 +198,7 @@ class YumWorker(Process):
"""
The main process, that works with YUM API. It has two queues, one
for input jobs and second for results.
-
+
Jobs are dispatched by their class names to particular handler method.
It spawns a second thread for managing asynchronous jobs and queue
@@ -256,7 +256,7 @@ class YumWorker(Process):
"""
Only one process is allowed to work with package database at given time.
That's why we lock it.
-
+
Try to lock it in loop, until success.
"""
while True:
@@ -427,7 +427,7 @@ class YumWorker(Process):
assert self._yum_base is not None
for repodir in self._yum_base.conf.reposdir:
if os.path.exists(repodir):
- self._repodir_mtimes[repodir] = os.stat(repodir).st_mtime
+ self._repodir_mtimes[repodir] = os.stat(repodir).st_mtime
@trace_function
def _do_work(self, job):
diff --git a/src/software/openlmi/software/yumdb/repository.py b/src/software/openlmi/software/yumdb/repository.py
index 16541df..2863dac 100644
--- a/src/software/openlmi/software/yumdb/repository.py
+++ b/src/software/openlmi/software/yumdb/repository.py
@@ -1,7 +1,7 @@
# -*- encoding: utf-8 -*-
# Software Management Providers
#
-# Copyright (C) 2013 Red Hat, Inc. All rights reserved.
+# Copyright (C) 2012-2013 Red Hat, Inc. All rights reserved.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
@@ -108,7 +108,7 @@ class Repository(object):
# on server
"mirror_list", # url of mirrorlist, or None
"mirror_urls", # list of urls obtained from mirrorlist or None
- #"persist_dir", #
+ #"persist_dir", #
#"pkg_count", # number of packages in directory
"pkg_dir", # directory with packages
#"proxy", # boolean saying whether this is a proxy
diff --git a/src/software/test/base.py b/src/software/test/base.py
index f0188ed..2fe1173 100644
--- a/src/software/test/base.py
+++ b/src/software/test/base.py
@@ -1,5 +1,5 @@
# -*- encoding: utf-8 -*-
-# Copyright (C) 2013 Red Hat, Inc. All rights reserved.
+# Copyright (C) 2012-2013 Red Hat, Inc. All rights reserved.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
diff --git a/src/software/test/package.py b/src/software/test/package.py
index 01cce2b..9f54a8d 100644
--- a/src/software/test/package.py
+++ b/src/software/test/package.py
@@ -1,7 +1,7 @@
#!/usr/bin/python
# -*- Coding:utf-8 -*-
#
-# Copyright (C) 2013 Red Hat, Inc. All rights reserved.
+# Copyright (C) 2012-2013 Red Hat, Inc. All rights reserved.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
diff --git a/src/software/test/repository.py b/src/software/test/repository.py
index 1b66d15..8f88a17 100644
--- a/src/software/test/repository.py
+++ b/src/software/test/repository.py
@@ -1,7 +1,7 @@
#!/usr/bin/python
# -*- Coding:utf-8 -*-
#
-# Copyright (C) 2013 Red Hat, Inc. All rights reserved.
+# Copyright (C) 2012-2013 Red Hat, Inc. All rights reserved.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
diff --git a/src/software/test/rpmcache.py b/src/software/test/rpmcache.py
index 6e61271..18b4779 100644
--- a/src/software/test/rpmcache.py
+++ b/src/software/test/rpmcache.py
@@ -1,7 +1,7 @@
#!/usr/bin/python
# -*- Coding:utf-8 -*-
#
-# Copyright (C) 2013 Red Hat, Inc. All rights reserved.
+# Copyright (C) 2012-2013 Red Hat, Inc. All rights reserved.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
@@ -495,7 +495,7 @@ def get_pkg_database(
where
safe is a list of instances of Package, representing installed
software, these should be used for not-dangerous tests;
- both older
+ both older
dangerous is a list of instances of Package of selected packages,
that are not installed, but available; instances contain
both newer and older version of package
@@ -531,7 +531,7 @@ def get_pkg_database(
dangerous_pkgs = make_dangerous_list(installed)
safe_pkgs = make_safe_list(installed, exclude=set(
pkg.name for pkg in dangerous_pkgs))
-
+
if use_cache:
repolist = _get_repo_list() if repolist in (None, []) else repolist
_download_dangerous(repolist, dangerous_pkgs, cache_dir)
diff --git a/src/software/test/run.py b/src/software/test/run.py
index 18ee1c4..74c2cf3 100755
--- a/src/software/test/run.py
+++ b/src/software/test/run.py
@@ -1,7 +1,7 @@
#!/usr/bin/python
# -*- Coding:utf-8 -*-
#
-# Copyright (C) 2013 Red Hat, Inc. All rights reserved.
+# Copyright (C) 2012-2013 Red Hat, Inc. All rights reserved.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
diff --git a/src/software/test/test_hosted_software_collection.py b/src/software/test/test_hosted_software_collection.py
index 3d2f30a..ccd00b8 100755
--- a/src/software/test/test_hosted_software_collection.py
+++ b/src/software/test/test_hosted_software_collection.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Copyright (C) 2013 Red Hat, Inc. All rights reserved.
+# Copyright (C) 2012-2013 Red Hat, Inc. All rights reserved.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
diff --git a/src/software/test/test_hosted_software_identity_resource.py b/src/software/test/test_hosted_software_identity_resource.py
index 29ed5f9..6a60e61 100755
--- a/src/software/test/test_hosted_software_identity_resource.py
+++ b/src/software/test/test_hosted_software_identity_resource.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Copyright (C) 2013 Red Hat, Inc. All rights reserved.
+# Copyright (C) 2012-2013 Red Hat, Inc. All rights reserved.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
diff --git a/src/software/test/test_installed_software_identity.py b/src/software/test/test_installed_software_identity.py
index 6a33b78..b796156 100755
--- a/src/software/test/test_installed_software_identity.py
+++ b/src/software/test/test_installed_software_identity.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Copyright (C) 2013 Red Hat, Inc. All rights reserved.
+# Copyright (C) 2012-2013 Red Hat, Inc. All rights reserved.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
@@ -171,7 +171,7 @@ class TestInstalledSoftwareIdentity(base.SoftwareBaseTestCase):
objpath = self.make_op(pkg)
self.assertFalse(rpmcache.is_pkg_installed(pkg))
- inst = pywbem.CIMInstance(self.CLASS_NAME,
+ inst = pywbem.CIMInstance(self.CLASS_NAME,
properties={
"InstalledSoftware" : objpath["InstalledSoftware"],
"System" : objpath["System"]},
diff --git a/src/software/test/test_member_of_software_collection.py b/src/software/test/test_member_of_software_collection.py
index f5d5076..0f6bac8 100755
--- a/src/software/test/test_member_of_software_collection.py
+++ b/src/software/test/test_member_of_software_collection.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Copyright (C) 2013 Red Hat, Inc. All rights reserved.
+# Copyright (C) 2012-2013 Red Hat, Inc. All rights reserved.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
diff --git a/src/software/test/test_resource_for_software_identity.py b/src/software/test/test_resource_for_software_identity.py
index c29b394..4c7e6b8 100755
--- a/src/software/test/test_resource_for_software_identity.py
+++ b/src/software/test/test_resource_for_software_identity.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Copyright (C) 2013 Red Hat, Inc. All rights reserved.
+# Copyright (C) 2012-2013 Red Hat, Inc. All rights reserved.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
diff --git a/src/software/test/test_software_identity.py b/src/software/test/test_software_identity.py
index dc96315..cf92bab 100755
--- a/src/software/test/test_software_identity.py
+++ b/src/software/test/test_software_identity.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Copyright (C) 2013 Red Hat, Inc. All rights reserved.
+# Copyright (C) 2012-2013 Red Hat, Inc. All rights reserved.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
diff --git a/src/software/test/test_software_identity_resource.py b/src/software/test/test_software_identity_resource.py
index 9e0b51a..34e5008 100755
--- a/src/software/test/test_software_identity_resource.py
+++ b/src/software/test/test_software_identity_resource.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Copyright (C) 2013 Red Hat, Inc. All rights reserved.
+# Copyright (C) 2012-2013 Red Hat, Inc. All rights reserved.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
diff --git a/src/software/test/test_system_software_collection.py b/src/software/test/test_system_software_collection.py
index 2204415..d68da47 100755
--- a/src/software/test/test_system_software_collection.py
+++ b/src/software/test/test_system_software_collection.py
@@ -1,6 +1,6 @@
#!/usr/bin/env python
#
-# Copyright (C) 2013 Red Hat, Inc. All rights reserved.
+# Copyright (C) 2012-2013 Red Hat, Inc. All rights reserved.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
diff --git a/src/software/test/util.py b/src/software/test/util.py
index 4918b24..958f1d3 100644
--- a/src/software/test/util.py
+++ b/src/software/test/util.py
@@ -1,7 +1,7 @@
#!/usr/bin/python
# -*- Coding:utf-8 -*-
#
-# Copyright (C) 2013 Red Hat, Inc. All rights reserved.
+# Copyright (C) 2012-2013 Red Hat, Inc. All rights reserved.
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public