summaryrefslogtreecommitdiffstats
path: root/src/software/openlmi/software/LMI_SoftwareIdentityResource.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/software/openlmi/software/LMI_SoftwareIdentityResource.py')
-rw-r--r--src/software/openlmi/software/LMI_SoftwareIdentityResource.py86
1 files changed, 43 insertions, 43 deletions
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)
-
+