pyanaconda.modules.storage.devicetree.viewer_interface
Classes
DBus interface for the device tree viewer. |
Module Contents
- class pyanaconda.modules.storage.devicetree.viewer_interface.DeviceTreeViewerInterface[source]
Bases:
pyanaconda.modules.common.base.base_template.InterfaceTemplate
DBus interface for the device tree viewer.
- GetRootDevice()[source]
Get the root device.
- Returns:
a name of the root device if any
- Return type:
Str
- GetDevices()[source]
Get all devices in the device tree.
- Returns:
a list of device IDs
- Return type:
List[Str]
- GetDisks()[source]
Get all disks in the device tree.
Ignored disks are excluded, as are disks with no media present.
- Returns:
a list of device IDs
- Return type:
List[Str]
- GetMountPoints()[source]
Get all mount points in the device tree.
- Returns:
a dictionary of mount points and device IDs
- Return type:
Dict[Str, Str]
- GetDeviceData(device_id)[source]
Get the device data.
- Parameters:
device_id (Str) – device ID
- Returns:
a structure with device data
- Raise:
UnknownDeviceError if the device is not found
- Return type:
Structure
- GetFormatData(device_id)[source]
Get the device format data.
Return data about a format of the specified device.
For example: sda1
- Parameters:
device_id (Str) – ID of the device
- Returns:
a structure with format data
- Return type:
Structure
- GetFormatTypeData(name)[source]
Get the format type data.
Return data about the specified format type.
For example: ext4
- Parameters:
name (Str) – a name of the format type
- Returns:
a structure with format data
- Return type:
Structure
- GetActions()[source]
Get the device actions.
- Returns:
a list of structures with device action data
- Return type:
List[Structure]
- ResolveDevice(dev_spec)[source]
Get the device matching the provided device specification.
The spec can be anything from a device name (eg: ‘sda3’) to a device node path (eg: ‘/dev/mapper/fedora-root’) to something like ‘UUID=xyz-tuv-qrs’ or ‘LABEL=rootfs’.
If no device is found, return an empty string.
- Parameters:
dev_spec (Str) – a string describing a block device
- Returns:
a device ID or an empty string
- Return type:
Str
- GetAncestors(device_ids)[source]
Collect ancestors of the specified devices.
Ancestors of a device don’t include the device itself. The list is sorted by IDs of the devices.
- Parameters:
device_ids (List[Str]) – a list of device names
- Returns:
a list of device IDs
- Return type:
List[Str]
- GetSupportedFileSystems()[source]
Get the supported types of filesystems.
- Returns:
a list of filesystem names
- Return type:
List[Str]
- GetRequiredDeviceSize(required_space)[source]
Get device size we need to get the required space on the device.
- Parameters:
required_space (UInt64) – a required space in bytes
- Returns:
a required device size in bytes
- Return type:
UInt64
- GetFileSystemFreeSpace(mount_points)[source]
Get total file system free space on the given mount points.
- Parameters:
mount_points (List[Str]) – a list of mount points
- Returns:
a total size in bytes
- Return type:
UInt64
- GetDiskFreeSpace(disk_ids)[source]
Get total free space on the given disks.
Calculates free space available for use.
- Parameters:
disk_ids (List[Str]) – a list of disk IDs
- Returns:
a total size in bytes
- Return type:
UInt64
- GetDiskReclaimableSpace(disk_ids)[source]
Get total reclaimable space on the given disks.
Calculates free space unavailable but reclaimable from existing partitions.
- Parameters:
disk_ids (List[Str]) – a list of disk IDs
- Returns:
a total size in bytes
- Return type:
UInt64
- GetDiskTotalSpace(disk_ids)[source]
Get total space on the given disks.
- Parameters:
disk_ids (List[Str]) – a list of disk IDs
- Returns:
a total size in bytes
- Return type:
UInt64
- GetFstabSpec(device_id)[source]
Get the device specifier for use in /etc/fstab.
- Parameters:
device_id (Str) – ID of the device
- Returns:
a device specifier for /etc/fstab
- Return type:
Str
- GetExistingSystems()[source]
Get existing GNU/Linux installations.
- Returns:
a list of data about found installations
- Return type:
List[Structure]
- GetMountPointConstraints(disk_ids)[source]
Get list of constraints on mountpoints for the current platform
Also provides hints if the partition is required or recommended.
This includes mount points required to boot (e.g. /boot/efi, /boot) and the / partition which is always considered to be required.
- Parameters:
disk_ids (List[Str]) – a list of disk IDs
- Returns:
a list of mount points with its constraints
- Return type:
List[Structure]