SettingHelper

” Module for SettingHelper class.

SettingHelper

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

Abstract interface to help implementation of LMI_*Setting classes. LMI_*Setting instances are associated with some managed element, let’s say LMI_Foo. LMI_Foo has its own provider, which can enumerate and provide LMI_Foo instances. If LMI_Foo inherits also SettingHelper, it can then enumerate and provider CIM_FooSetting instances associated to the managed foos.

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

This method returns iterable with all instances of LMI_*Setting as Setting instances.

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

Return CIMInstanceName of ManagedElement for ElementSettingData association for setting with given ID. Return None if no such ManagedElement exists.

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

Return Setting instance, which corresponds to LMI_*Setting with given InstanceID. Return None if there is no such instance.

Subclasses must override this method.

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

Return hash property_name -> default value. If this value of the property is set, the ModifyInstance won’t complain, but it will silently ignore the value. This is useful when someone tries to set default value of a property and the provider does not implement it.

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

Return hash property_name -> validator validator is a function which takes pywbem (Uint32, bool ...) value as parameter and returns True, if the value is correct for the property. Not all properties do need to have a validator.

get_supported_setting_properties(*args, **kwargs)[source]
Return hash property_name -> constructor.
constructor is a function which takes string argument and returns CIM value. (i.e. pywbem.Uint16 or bool or string etc).

This hash will be passed to SettingProvider.__init__

Table Of Contents

Previous topic

ServiceProvider

Next topic

SettingManager

This Page