” Module for CapabilitiesProvider class.
Base class for every LMI_*Capabilities providers. It implements get_instance and enum_instances methods.
This class assumes that most LMI_*Capabilities are associated to appropriate LMI_*Service and adds support for it.
Of course, LMI_*Capabilities can be associated to different instances in subclasses of this provider.
Implements LMI_*Capabilities.CreateSetting()
Create LMI_*Setting according to this capabilities. All properties its will have default values.
InstanceID should have format LMI:<classname>:<ID>. This method returns string LMI:<classname>:<myid>
Create LMI_*Setting for given capabilities. Return CIMInstanceName of the setting or raise CIMError on error.
Subclasses must override this method.
Provider implementation of EnumerateInstances intrinsic method.
Return an iterable with all capabilities instances, i.e. dictionaries property_name -> value. If the capabilities are the default ones, it must have ‘_default’ as a property name.
Subclasses must override this method.
Return dictionary property_name -> value. If the capabilities are the default ones, it must have ‘_default’ as a property name. Return None if there is no such Capabilities instance.
Subclasses can override this method.
Return default capabilities or None if there are no default ones.
Base class for LMI_*ElementCapabilities providers.
If all capabilities instances are associated only with appropriate LMI_*Service, this class does not need to be subclasses.
Otherwise, subclasses can associate capabilities to other managed elements.
Provider implementation of EnumerateInstances intrinsic method.
Return iterable with (managed_element_name, capabilities_name), where managed_element_name and capabilities_name are CIMInstanceName.
By default, all capabilities provided by capabilities_provider are associated to service_provider.
Subclasses can override this method if different behavior is requested.