kiwi.partitioner Package

Submodules

kiwi.partitioner.base Module

class kiwi.partitioner.base.PartitionerBase(disk_provider)[source]

Bases: object

Base class for partitioners

Attributes

  • disk_device
    disk device node
  • partition_id
    current partition number
  • flag_map
    initial partition type/flag map
create(name, mbsize, type_name, flags=None)[source]

Create partition

Implementation in specialized partitioner class

Parameters:
  • name (string) – unused
  • mbsize (int) – unused
  • type_name (string) – unused
  • flags (list) – unused
get_id()[source]

Current partition number

Zero indicates no partition has been created so far

Returns:partition number
Return type:int
post_init()[source]

Post initialization method

Implementation in specialized partitioner class

set_flag(partition_id, flag_name)[source]

Set partition flag

Implementation in specialized partitioner class

Parameters:
  • partition_id (int) – unused
  • flag_name (string) – unused
set_hybrid_mbr()[source]

Turn partition table into hybrid table if supported

Implementation in specialized partitioner class

set_mbr()[source]

Turn partition table into MBR (msdos table)

Implementation in specialized partitioner class

kiwi.partitioner.dasd Module

class kiwi.partitioner.dasd.PartitionerDasd(disk_provider)[source]

Bases: kiwi.partitioner.base.PartitionerBase

Implements DASD partition setup

create(name, mbsize, type_name, flags=None)[source]

Create DASD partition

Parameters:
  • name (string) – partition name
  • mbsize (int) – partition size
  • type_name (string) – unused
  • flags (list) – unused
post_init()[source]

Post initialization method

Setup fdasd partition type/flag map

kiwi.partitioner.gpt Module

class kiwi.partitioner.gpt.PartitionerGpt(disk_provider)[source]

Bases: kiwi.partitioner.base.PartitionerBase

Implements GPT partition setup

create(name, mbsize, type_name, flags=None)[source]

Create GPT partition

Parameters:
  • name (string) – partition name
  • mbsize (int) – partition size
  • type_name (string) – partition type
  • flags (list) – additional flags
post_init()[source]

Post initialization method

Setup gdisk partition type/flag map

set_flag(partition_id, flag_name)[source]

Set GPT partition flag

Parameters:
  • partition_id (int) – partition number
  • flag_name (string) – name from flag map
set_hybrid_mbr()[source]

Turn partition table into hybrid GPT/MBR table

set_mbr()[source]

Turn partition table into MBR (msdos table)

kiwi.partitioner.msdos Module

class kiwi.partitioner.msdos.PartitionerMsDos(disk_provider)[source]

Bases: kiwi.partitioner.base.PartitionerBase

Implement old style msdos partition setup

create(name, mbsize, type_name, flags=None)[source]

Create msdos partition

Parameters:
  • name (string) – partition name
  • mbsize (int) – partition size
  • type_name (string) – partition type
  • flags (list) – additional flags
post_init()[source]

Post initialization method

Setup sfdisk partition type/flag map

set_flag(partition_id, flag_name)[source]

Set msdos partition flag

Parameters:
  • partition_id (int) – partition number
  • flag_name (string) – name from flag map

Module Contents

class kiwi.partitioner.Partitioner[source]

Bases: object

Partitioner factory

Attributes

  • table_type
    Table type name
  • storage_provider
    Instance of class based on DeviceProvider