FormatProvider

” Module for FormatProvider.

FormatProvider

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

Abstract provider for data formats and filesystems. Each provider must have .device_type property, which represents blivet.formats.<DeviceFormat child>.type of format it represents.

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

Enumerate instances. Subclasses do not need to override this method, as long as enumeration by self.provides_format is sufficient.

get_devices(device, _fmt)[source]

Return all devices, on which the format resides. Usually there is only one device, but btrfs may provide more.

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

Return tuple (StorageDevice, DeviceFormat) for given Name property of CIMInstance. Return (None, None) if no such format exist. This is reverse function to get_format_id(). Subclasses do not need to override this method if they do not override get_format_id(). The returned device represents one randomly chosen device if the format spans over multiple devices, use get_devices() to get all of them.

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

Return tuple (StorageDevice, DeviceFormat) instance for given CIMInstanceName. Return (None, None) if no such instance_name exists. The returned device represents one randomly chosen device if the format spans over multiple devices, use get_devices() to get all of them.

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

Return LMI_DataFormat.Name. The name should be unique and stable across reboots or reconfigurations. UUID is used, subclasses do not need to override this method.

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

Get instance. Subclasses should override this method, the default implementation just check if the instance exists.

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

Return CIMInstanceName for given DeviceFormat subclass.

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

Return UUID of the format or None when it does not exist.

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

Returns True, if this class is provider for given Anaconda DeviceFormat class. Subclasses must override this method.

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

Returns True, if this class is provider for given CIMInstanceName. Subclasses do not need to override this method as long as self.classname is correct CIM class name.

LMI_ResidesOnExtent

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

Implementation of LMI_ResidesOnExtent association.

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

Enumerate instances.

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

Get instance.

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

Instrument Associations.

Table Of Contents

Previous topic

ExtentProvider

Next topic

LMI_AttachedFileSystem

This Page