blivet.populator.helpers package

Submodules

blivet.populator.helpers.boot module

class blivet.populator.helpers.boot.BootFormatPopulator(devicetree, data, device=None)

Bases: FormatPopulator

:param DeviceTree devicetree: the calling devicetree :param pyudev.Device data: udev data describing a device :keyword device: device instance corresponding to the udev data :type device: StorageDevice

classmethod match(data, device)

Return True if this helper is appropriate for the given device.

:param pyudev.Device data: udev data describing a device :param device: device instance corresponding to the udev data :type device: StorageDevice :returns: whether this class is appropriate for the specified device :rtype: bool

priority = 500

Higher priority value gets checked for match first.

class blivet.populator.helpers.boot.EFIFormatPopulator(devicetree, data, device=None)

Bases: BootFormatPopulator

:param DeviceTree devicetree: the calling devicetree :param pyudev.Device data: udev data describing a device :keyword device: device instance corresponding to the udev data :type device: StorageDevice

class blivet.populator.helpers.boot.MacEFIFormatPopulator(devicetree, data, device=None)

Bases: BootFormatPopulator

:param DeviceTree devicetree: the calling devicetree :param pyudev.Device data: udev data describing a device :keyword device: device instance corresponding to the udev data :type device: StorageDevice

classmethod match(data, device)

Return True if this helper is appropriate for the given device.

:param pyudev.Device data: udev data describing a device :param device: device instance corresponding to the udev data :type device: StorageDevice :returns: whether this class is appropriate for the specified device :rtype: bool

blivet.populator.helpers.btrfs module

class blivet.populator.helpers.btrfs.BTRFSFormatPopulator(devicetree, data, device=None)

Bases: FormatPopulator

:param DeviceTree devicetree: the calling devicetree :param pyudev.Device data: udev data describing a device :keyword device: device instance corresponding to the udev data :type device: StorageDevice

priority = 100

Higher priority value gets checked for match first.

run()

Create a format instance and associate it with the device instance.

blivet.populator.helpers.devicepopulator module

class blivet.populator.helpers.devicepopulator.DevicePopulator(devicetree, data, device=None)

Bases: PopulatorHelper

Populator helper base class for devices.

Subclasses must define a match method and, if they want to instantiate a device, a run method.

:param DeviceTree devicetree: the calling devicetree :param pyudev.Device data: udev data describing a device :keyword device: device instance corresponding to the udev data :type device: StorageDevice

classmethod match(data)

Return True if this helper is appropriate for the given device.

:param pyudev.Device data: udev data describing a device :returns: whether this class is appropriate for the specified device :rtype: bool

update()

Handle changes associated with an event.

This method should handle any changes to an existing format instance. It should not handle reformatting.

blivet.populator.helpers.disk module

class blivet.populator.helpers.disk.DASDDevicePopulator(devicetree, data, device=None)

Bases: DiskDevicePopulator

:param DeviceTree devicetree: the calling devicetree :param pyudev.Device data: udev data describing a device :keyword device: device instance corresponding to the udev data :type device: StorageDevice

classmethod match(data)

Return True if this helper is appropriate for the given device.

:param pyudev.Device data: udev data describing a device :returns: whether this class is appropriate for the specified device :rtype: bool

priority = 20

Higher priority value gets checked for match first.

class blivet.populator.helpers.disk.DiskDevicePopulator(devicetree, data, device=None)

Bases: DevicePopulator

:param DeviceTree devicetree: the calling devicetree :param pyudev.Device data: udev data describing a device :keyword device: device instance corresponding to the udev data :type device: StorageDevice

classmethod match(data)

Return True if this helper is appropriate for the given device.

:param pyudev.Device data: udev data describing a device :returns: whether this class is appropriate for the specified device :rtype: bool

priority = 10

Higher priority value gets checked for match first.

run()

Run type-specific processing.

For device handlers, this method should instantiate the appropriate device type and add the instance to the device tree. For format handlers, this method should instantiate the appropriate format type, associate the instance with the appropriate device, and perform all processing related to the device’s formatting.

class blivet.populator.helpers.disk.FCoEDevicePopulator(devicetree, data, device=None)

Bases: DiskDevicePopulator

:param DeviceTree devicetree: the calling devicetree :param pyudev.Device data: udev data describing a device :keyword device: device instance corresponding to the udev data :type device: StorageDevice

classmethod match(data)

Return True if this helper is appropriate for the given device.

:param pyudev.Device data: udev data describing a device :returns: whether this class is appropriate for the specified device :rtype: bool

priority = 20

Higher priority value gets checked for match first.

class blivet.populator.helpers.disk.MDBiosRaidDevicePopulator(devicetree, data, device=None)

Bases: DiskDevicePopulator

:param DeviceTree devicetree: the calling devicetree :param pyudev.Device data: udev data describing a device :keyword device: device instance corresponding to the udev data :type device: StorageDevice

classmethod match(data)

Return True if this helper is appropriate for the given device.

:param pyudev.Device data: udev data describing a device :returns: whether this class is appropriate for the specified device :rtype: bool

priority = 20

Higher priority value gets checked for match first.

class blivet.populator.helpers.disk.NVMeFabricsNamespaceDevicePopulator(devicetree, data, device=None)

Bases: DiskDevicePopulator

:param DeviceTree devicetree: the calling devicetree :param pyudev.Device data: udev data describing a device :keyword device: device instance corresponding to the udev data :type device: StorageDevice

classmethod match(data)

Return True if this helper is appropriate for the given device.

:param pyudev.Device data: udev data describing a device :returns: whether this class is appropriate for the specified device :rtype: bool

priority = 20

Higher priority value gets checked for match first.

class blivet.populator.helpers.disk.NVMeNamespaceDevicePopulator(devicetree, data, device=None)

Bases: DiskDevicePopulator

:param DeviceTree devicetree: the calling devicetree :param pyudev.Device data: udev data describing a device :keyword device: device instance corresponding to the udev data :type device: StorageDevice

classmethod match(data)

Return True if this helper is appropriate for the given device.

:param pyudev.Device data: udev data describing a device :returns: whether this class is appropriate for the specified device :rtype: bool

priority = 20

Higher priority value gets checked for match first.

class blivet.populator.helpers.disk.ZFCPDevicePopulator(devicetree, data, device=None)

Bases: DiskDevicePopulator

:param DeviceTree devicetree: the calling devicetree :param pyudev.Device data: udev data describing a device :keyword device: device instance corresponding to the udev data :type device: StorageDevice

classmethod match(data)

Return True if this helper is appropriate for the given device.

:param pyudev.Device data: udev data describing a device :returns: whether this class is appropriate for the specified device :rtype: bool

priority = 20

Higher priority value gets checked for match first.

class blivet.populator.helpers.disk.iScsiDevicePopulator(devicetree, data, device=None)

Bases: DiskDevicePopulator

:param DeviceTree devicetree: the calling devicetree :param pyudev.Device data: udev data describing a device :keyword device: device instance corresponding to the udev data :type device: StorageDevice

classmethod match(data)

Return True if this helper is appropriate for the given device.

:param pyudev.Device data: udev data describing a device :returns: whether this class is appropriate for the specified device :rtype: bool

priority = 20

Higher priority value gets checked for match first.

blivet.populator.helpers.disklabel module

class blivet.populator.helpers.disklabel.DiskLabelFormatPopulator(devicetree, data, device=None)

Bases: FormatPopulator

:param DeviceTree devicetree: the calling devicetree :param pyudev.Device data: udev data describing a device :keyword device: device instance corresponding to the udev data :type device: StorageDevice

classmethod match(data, device)

Return True if this helper is appropriate for the given device.

:param pyudev.Device data: udev data describing a device :param device: device instance corresponding to the udev data :type device: StorageDevice :returns: whether this class is appropriate for the specified device :rtype: bool

priority = 100

Higher priority value gets checked for match first.

run()

Create a format instance and associate it with the device instance.

update()

Handle changes associated with an event.

This method should handle any changes to an existing format instance. It should not handle reformatting.

blivet.populator.helpers.dm module

class blivet.populator.helpers.dm.DMDevicePopulator(devicetree, data, device=None)

Bases: DevicePopulator

:param DeviceTree devicetree: the calling devicetree :param pyudev.Device data: udev data describing a device :keyword device: device instance corresponding to the udev data :type device: StorageDevice

classmethod match(data)

Return True if this helper is appropriate for the given device.

:param pyudev.Device data: udev data describing a device :returns: whether this class is appropriate for the specified device :rtype: bool

priority = 50

Higher priority value gets checked for match first.

run()

Run type-specific processing.

For device handlers, this method should instantiate the appropriate device type and add the instance to the device tree. For format handlers, this method should instantiate the appropriate format type, associate the instance with the appropriate device, and perform all processing related to the device’s formatting.

blivet.populator.helpers.formatpopulator module

class blivet.populator.helpers.formatpopulator.FormatPopulator(devicetree, data, device=None)

Bases: PopulatorHelper

:param DeviceTree devicetree: the calling devicetree :param pyudev.Device data: udev data describing a device :keyword device: device instance corresponding to the udev data :type device: StorageDevice

classmethod match(data, device)

Return True if this helper is appropriate for the given device.

:param pyudev.Device data: udev data describing a device :param device: device instance corresponding to the udev data :type device: StorageDevice :returns: whether this class is appropriate for the specified device :rtype: bool

priority = 0

Higher priority value gets checked for match first.

run()

Create a format instance and associate it with the device instance.

property type_spec
update()

Handle changes associated with an event.

This method should handle any changes to an existing format instance. It should not handle reformatting.

blivet.populator.helpers.loop module

class blivet.populator.helpers.loop.LoopDevicePopulator(devicetree, data, device=None)

Bases: DevicePopulator

:param DeviceTree devicetree: the calling devicetree :param pyudev.Device data: udev data describing a device :keyword device: device instance corresponding to the udev data :type device: StorageDevice

classmethod match(data)

Return True if this helper is appropriate for the given device.

:param pyudev.Device data: udev data describing a device :returns: whether this class is appropriate for the specified device :rtype: bool

run()

Run type-specific processing.

For device handlers, this method should instantiate the appropriate device type and add the instance to the device tree. For format handlers, this method should instantiate the appropriate format type, associate the instance with the appropriate device, and perform all processing related to the device’s formatting.

blivet.populator.helpers.luks module

class blivet.populator.helpers.luks.BITLKDevicePopulator(devicetree, data, device=None)

Bases: DevicePopulator

:param DeviceTree devicetree: the calling devicetree :param pyudev.Device data: udev data describing a device :keyword device: device instance corresponding to the udev data :type device: StorageDevice

classmethod match(data)

Return True if this helper is appropriate for the given device.

:param pyudev.Device data: udev data describing a device :returns: whether this class is appropriate for the specified device :rtype: bool

run()

Run type-specific processing.

For device handlers, this method should instantiate the appropriate device type and add the instance to the device tree. For format handlers, this method should instantiate the appropriate format type, associate the instance with the appropriate device, and perform all processing related to the device’s formatting.

class blivet.populator.helpers.luks.IntegrityDevicePopulator(devicetree, data, device=None)

Bases: DevicePopulator

:param DeviceTree devicetree: the calling devicetree :param pyudev.Device data: udev data describing a device :keyword device: device instance corresponding to the udev data :type device: StorageDevice

classmethod match(data)

Return True if this helper is appropriate for the given device.

:param pyudev.Device data: udev data describing a device :returns: whether this class is appropriate for the specified device :rtype: bool

run()

Run type-specific processing.

For device handlers, this method should instantiate the appropriate device type and add the instance to the device tree. For format handlers, this method should instantiate the appropriate format type, associate the instance with the appropriate device, and perform all processing related to the device’s formatting.

class blivet.populator.helpers.luks.IntegrityFormatPopulator(devicetree, data, device=None)

Bases: FormatPopulator

:param DeviceTree devicetree: the calling devicetree :param pyudev.Device data: udev data describing a device :keyword device: device instance corresponding to the udev data :type device: StorageDevice

priority = 100

Higher priority value gets checked for match first.

class blivet.populator.helpers.luks.LUKSDevicePopulator(devicetree, data, device=None)

Bases: DevicePopulator

:param DeviceTree devicetree: the calling devicetree :param pyudev.Device data: udev data describing a device :keyword device: device instance corresponding to the udev data :type device: StorageDevice

classmethod match(data)

Return True if this helper is appropriate for the given device.

:param pyudev.Device data: udev data describing a device :returns: whether this class is appropriate for the specified device :rtype: bool

run()

Run type-specific processing.

For device handlers, this method should instantiate the appropriate device type and add the instance to the device tree. For format handlers, this method should instantiate the appropriate format type, associate the instance with the appropriate device, and perform all processing related to the device’s formatting.

class blivet.populator.helpers.luks.LUKSFormatPopulator(devicetree, data, device=None)

Bases: FormatPopulator

:param DeviceTree devicetree: the calling devicetree :param pyudev.Device data: udev data describing a device :keyword device: device instance corresponding to the udev data :type device: StorageDevice

classmethod match(data, device)

Return True if this helper is appropriate for the given device.

:param pyudev.Device data: udev data describing a device :param device: device instance corresponding to the udev data :type device: StorageDevice :returns: whether this class is appropriate for the specified device :rtype: bool

priority = 100

Higher priority value gets checked for match first.

run()

Create a format instance and associate it with the device instance.

blivet.populator.helpers.lvm module

class blivet.populator.helpers.lvm.LVMDevicePopulator(devicetree, data, device=None)

Bases: DevicePopulator

:param DeviceTree devicetree: the calling devicetree :param pyudev.Device data: udev data describing a device :keyword device: device instance corresponding to the udev data :type device: StorageDevice

classmethod match(data)

Return True if this helper is appropriate for the given device.

:param pyudev.Device data: udev data describing a device :returns: whether this class is appropriate for the specified device :rtype: bool

run()

Run type-specific processing.

For device handlers, this method should instantiate the appropriate device type and add the instance to the device tree. For format handlers, this method should instantiate the appropriate format type, associate the instance with the appropriate device, and perform all processing related to the device’s formatting.

class blivet.populator.helpers.lvm.LVMFormatPopulator(devicetree, data, device=None)

Bases: FormatPopulator

:param DeviceTree devicetree: the calling devicetree :param pyudev.Device data: udev data describing a device :keyword device: device instance corresponding to the udev data :type device: StorageDevice

priority = 100

Higher priority value gets checked for match first.

run()

Create a format instance and associate it with the device instance.

update()

Handle changes associated with an event.

This method should handle any changes to an existing format instance. It should not handle reformatting.

blivet.populator.helpers.mdraid module

class blivet.populator.helpers.mdraid.MDDevicePopulator(devicetree, data, device=None)

Bases: DevicePopulator

:param DeviceTree devicetree: the calling devicetree :param pyudev.Device data: udev data describing a device :keyword device: device instance corresponding to the udev data :type device: StorageDevice

classmethod match(data)

Return True if this helper is appropriate for the given device.

:param pyudev.Device data: udev data describing a device :returns: whether this class is appropriate for the specified device :rtype: bool

run()

Run type-specific processing.

For device handlers, this method should instantiate the appropriate device type and add the instance to the device tree. For format handlers, this method should instantiate the appropriate format type, associate the instance with the appropriate device, and perform all processing related to the device’s formatting.

class blivet.populator.helpers.mdraid.MDFormatPopulator(devicetree, data, device=None)

Bases: FormatPopulator

:param DeviceTree devicetree: the calling devicetree :param pyudev.Device data: udev data describing a device :keyword device: device instance corresponding to the udev data :type device: StorageDevice

priority = 100

Higher priority value gets checked for match first.

run()

Create a format instance and associate it with the device instance.

update()

Handle changes associated with an event.

This method should handle any changes to an existing format instance. It should not handle reformatting.

blivet.populator.helpers.multipath module

class blivet.populator.helpers.multipath.MultipathDevicePopulator(devicetree, data, device=None)

Bases: DevicePopulator

:param DeviceTree devicetree: the calling devicetree :param pyudev.Device data: udev data describing a device :keyword device: device instance corresponding to the udev data :type device: StorageDevice

classmethod match(data)

Return True if this helper is appropriate for the given device.

:param pyudev.Device data: udev data describing a device :returns: whether this class is appropriate for the specified device :rtype: bool

run()

Run type-specific processing.

For device handlers, this method should instantiate the appropriate device type and add the instance to the device tree. For format handlers, this method should instantiate the appropriate format type, associate the instance with the appropriate device, and perform all processing related to the device’s formatting.

class blivet.populator.helpers.multipath.MultipathFormatPopulator(devicetree, data, device=None)

Bases: FormatPopulator

:param DeviceTree devicetree: the calling devicetree :param pyudev.Device data: udev data describing a device :keyword device: device instance corresponding to the udev data :type device: StorageDevice

priority = 100

Higher priority value gets checked for match first.

blivet.populator.helpers.optical module

class blivet.populator.helpers.optical.OpticalDevicePopulator(devicetree, data, device=None)

Bases: DevicePopulator

:param DeviceTree devicetree: the calling devicetree :param pyudev.Device data: udev data describing a device :keyword device: device instance corresponding to the udev data :type device: StorageDevice

classmethod match(data)

Return True if this helper is appropriate for the given device.

:param pyudev.Device data: udev data describing a device :returns: whether this class is appropriate for the specified device :rtype: bool

run()

Run type-specific processing.

For device handlers, this method should instantiate the appropriate device type and add the instance to the device tree. For format handlers, this method should instantiate the appropriate format type, associate the instance with the appropriate device, and perform all processing related to the device’s formatting.

blivet.populator.helpers.partition module

class blivet.populator.helpers.partition.PartitionDevicePopulator(devicetree, data, device=None)

Bases: DevicePopulator

:param DeviceTree devicetree: the calling devicetree :param pyudev.Device data: udev data describing a device :keyword device: device instance corresponding to the udev data :type device: StorageDevice

classmethod match(data)

Return True if this helper is appropriate for the given device.

:param pyudev.Device data: udev data describing a device :returns: whether this class is appropriate for the specified device :rtype: bool

priority = 0

Higher priority value gets checked for match first.

run()

Run type-specific processing.

For device handlers, this method should instantiate the appropriate device type and add the instance to the device tree. For format handlers, this method should instantiate the appropriate format type, associate the instance with the appropriate device, and perform all processing related to the device’s formatting.

blivet.populator.helpers.populatorhelper module

class blivet.populator.helpers.populatorhelper.PopulatorHelper(devicetree, data, device=None)

Bases: object

Class to hold type-specific code for populating the devicetree.

:param DeviceTree devicetree: the calling devicetree :param pyudev.Device data: udev data describing a device :keyword device: device instance corresponding to the udev data :type device: StorageDevice

classmethod match(data)

Return True if this helper is appropriate for the given device.

:param pyudev.Device data: udev data describing a device :returns: whether this class is appropriate for the specified device :rtype: bool

priority = 100

Higher priority value gets checked for match first.

run()

Run type-specific processing.

For device handlers, this method should instantiate the appropriate device type and add the instance to the device tree. For format handlers, this method should instantiate the appropriate format type, associate the instance with the appropriate device, and perform all processing related to the device’s formatting.

update()

Handle changes associated with an event.

This method should handle any changes to an existing format instance. It should not handle reformatting.

blivet.populator.helpers.stratis module

class blivet.populator.helpers.stratis.StratisFormatPopulator(devicetree, data, device=None)

Bases: FormatPopulator

:param DeviceTree devicetree: the calling devicetree :param pyudev.Device data: udev data describing a device :keyword device: device instance corresponding to the udev data :type device: StorageDevice

classmethod match(data, device)

Return True if this helper is appropriate for the given device.

:param pyudev.Device data: udev data describing a device :param device: device instance corresponding to the udev data :type device: StorageDevice :returns: whether this class is appropriate for the specified device :rtype: bool

priority = 100

Higher priority value gets checked for match first.

run()

Create a format instance and associate it with the device instance.

class blivet.populator.helpers.stratis.StratisXFSFormatPopulator(devicetree, data, device=None)

Bases: FormatPopulator

:param DeviceTree devicetree: the calling devicetree :param pyudev.Device data: udev data describing a device :keyword device: device instance corresponding to the udev data :type device: StorageDevice

classmethod match(data, device)

Return True if this helper is appropriate for the given device.

:param pyudev.Device data: udev data describing a device :param device: device instance corresponding to the udev data :type device: StorageDevice :returns: whether this class is appropriate for the specified device :rtype: bool

priority = 100

Higher priority value gets checked for match first.

run()

Create a format instance and associate it with the device instance.

Module contents

blivet.populator.helpers.get_device_helper(data)

Return the device helper class appropriate for the specified data.

The helper lists are sorted according to priorities defined within each class. This function returns the first matching class.

blivet.populator.helpers.get_format_helper(data, device)

Return the device helper class appropriate for the specified data.

The helper lists are sorted according to priorities defined within each class. This function returns the first matching class.