Package VMBuilder :: Module disk :: Class Disk :: Class Partition
[frames] | no frames]

Class Partition

source code

object --+
         |
        Disk.Partition

Instance Methods
 
__init__(self, disk, begin, end, type, mntpnt)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
set_filename(self, filename) source code
string
parted_fstype(self)
Returns: the filesystem type of the partition suitable for passing to parted
source code
 
create(self, disk)
Adds partition to the disk image (does not mkfs or anything like that)
source code
 
mkfs(self)
Adds Filesystem object
source code
 
get_grub_id(self)
The name of the partition as known by grub
source code
 
get_suffix(self)
Returns 'a4' for a device that would be called /dev/sda4 in the guest.
source code
 
get_index(self)
Index of the disk (starting from 0)
source code
 
set_type(self, type) source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Instance Variables
  disk
The disk on which this Partition resides.
  begin
The start of the partition
  end
The end of the partition
  type
The partition type
  mntpnt
The destined mount point
  filename
The filename of this partition (the map device)
  fs
The enclosed filesystem
Properties

Inherited from object: __class__

Method Details

__init__(self, disk, begin, end, type, mntpnt)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

parted_fstype(self)

source code 
Returns: string
the filesystem type of the partition suitable for passing to parted

get_suffix(self)

source code 

Returns 'a4' for a device that would be called /dev/sda4 in the guest. This allows other parts of VMBuilder to set the prefix to something suitable.