ExtentProvider

” Module for ExtentProvider class.

ExtentProvider

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

Base of all StorageExtent providers. It fills common properties in the StorageExtent.

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

Enumerate instances.

The WBEM operations EnumerateInstances and EnumerateInstanceNames 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.
keys_only – A boolean. True if only the key properties should be
set on the generated instances.

Possible Errors: CIM_ERR_FAILED (some other unspecified error occurred)

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

Enumerate all StorageDevices, that this provider provides.

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

Returns Anaconda StorageDevice for given CIM InstanceName or None if no device is found.

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

Returns ExtentDiscriminator property value for given StorageDevice. It must return array of strings.

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

Return ElementName property value for given StorageDevice. Device path (/dev/sda) is the default.

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

Return ExtentStatus property value for given StorageDevice. It must be array of int16 values.

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

Provider implementation of GetInstance intrinsic method. It fills common StorageExtent properties.

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

Returns CIM InstanceName for given Anaconda StorageDevice. None if no device is found.

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

Return array of all aliases (symlinks) of the device. The real device path is always the first element of the array.

Parameters:device – (StorageDevice) The device.
Returns:array of strings.
get_primordial(*args, **kwargs)[source]

Returns True, if given StorageDevice is primordial.

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

Return (BlockSize, NumberOfBlocks, ConsumableBlocks) properties for given StorageDevice.

The ConsumableBlocks should be reduced by partition table size.

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

Returns True, if this class is provider for given CIM InstanceName.

Table Of Contents

Previous topic

DeviceProvider

Next topic

FormatProvider

This Page