BaseProvider

” Module for BaseProvider class.

BaseProvider

class openlmi.storage.BaseProvider.BaseProvider(*args, **kwargs)[source]

CIM Provider for LMI. It adds access to ProviderManager, configuration and blivet.Blivet instance.

In addition to CIM provider methods, this class and its subclasses can convert CIM InstanceName to Anaconda’s StorageDevice instance and a vice versa.

__init__(*args, **kwargs)[source]

Initialize the provider. Store reference to blivet.Blivet. Store reference to StorageConfiguration. Register at given ProviderManager.

simple_references(*args, **kwargs)[source]

Implementation of basic associations. This method can be used by all subclasses, which implement association provider.

It has the same arguments as references() method of CIMProvider2, additional ‘first_class’ and ‘second_class’ should contain string with CIM class names of the associated classes.

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

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 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 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 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, result_role, and result_class_name parameters. +————————+ +——————-+ | object_name.classname | | result_class_name | | ~~~~~~~~~~~~~~~~~~~~~ | | ~~~~~~~~~~~~~~~~~ | +————————+ +——————-+

+———————————–+ |
| [Association] model.classname | |
object_name | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | |

+————–+ object_name.classname REF role | |

(CIMInstanceName) | result_class_name REF result_role +——+
|(CIMInstanceName)

Possible Errors: CIM_ERR_ACCESS_DENIED CIM_ERR_NOT_SUPPORTED CIM_ERR_INVALID_NAMESPACE CIM_ERR_INVALID_PARAMETER (including missing, duplicate, unrecognized

or otherwise incorrect parameters)

CIM_ERR_FAILED (some other unspecified error occurred)

Table Of Contents

Previous topic

BasedOnProvider

Next topic

CapabilitiesProvider

This Page