The ironic_lib.disk_partitioner
Module¶
-
class
ironic_lib.disk_partitioner.
DiskPartitioner
(device, disk_label='msdos', alignment='optimal')[source]¶ Bases:
object
-
add_partition
(size, part_type='primary', fs_type='', boot_flag=None, extra_flags=None)[source]¶ Add a partition.
- Parameters
size – The size of the partition in MiB.
part_type – The type of the partition. Valid values are: primary, logical, or extended.
fs_type – The filesystem type. Valid types are: ext2, fat32, fat16, HFS, linux-swap, NTFS, reiserfs, ufs. If blank (‘’), it will create a Linux native partition (83).
boot_flag – Boot flag that needs to be configured on the partition. Ignored if None. It can take values ‘bios_grub’, ‘boot’.
extra_flags – List of flags to set on the partition. Ignored if None.
- Returns
The partition number.
-