Home | Trees | Indices | Help |
---|
|
object --+ | Device --+ | StorageDevice --+ | PartitionDevice
A disk partition.
On types and flags...
We don't need to deal with numerical partition types at all. The only type we are concerned with is primary/logical/extended. Usage specification is accomplished through the use of flags, which we will set according to the partition's format.
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
Inherited from Inherited from Inherited from Inherited from |
|
|||
_type = "partition"
|
|||
_resizable = True
|
|||
defaultSize = 500
|
|||
partedPartition = property(lambda d: d._getPartedPartition(),
|
|||
weight = property(lambda d: d._getWeight(), lambda d, w: d._se
|
|||
bootable = property(_getBootable, _setBootable)
|
|||
disk = property(lambda p: p._getDisk(), lambda p, d: p._setDis
|
|||
Inherited from Inherited from |
|
|||
Inherited from |
|
Create a PartitionDevice instance. Arguments: name -- the device name (generally a device node's basename) Keyword Arguments: exists -- indicates whether this is an existing device format -- the device's format (DeviceFormat instance) For existing partitions: parents -- the disk that contains this partition major -- the device major minor -- the device minor sysfsPath -- sysfs device path For new partitions: partType -- primary,extended,&c (as parted constant) grow -- whether or not to grow the partition maxsize -- max size for growable partitions (in MB) size -- the device's size (in MB) bootable -- whether the partition is bootable parents -- a list of potential containing disks weight -- an initial sorting weight to assign
|
repr(x)
|
|
|
|
Device node representing this device.
|
Get the partition's type (as parted constant).
|
|
|
|
|
|
Re-get self.partedPartition from the original disklabel.
|
Update this device's sysfs path.
|
Return True if this device depends on dep.
|
Set the Device's format.
|
Probe for any missing information about this device. size, partition type, flags |
Create the device.
|
Perform post-create operations.
|
Resize the device. self.targetSize must be set to the new size.
|
Preparation and precondition checking for device destruction.
|
Destroy the device.
|
This is never called. For instructional purposes only. We do not want multipath partitions disappearing upon their teardown(). |
Get the device's size.
|
Set the device's size (for resize, not creation). Arguments: newsize -- the new size (in MB)
|
Change the parent. Setting up a disk is not trivial. It has the potential to change the underlying object. If necessary we must also change this object. |
The maximum size this partition can be.
|
The device's actual size.
|
Can this type of device be resized?
|
Check to make sure the size of the device is allowed by the format used. Returns: 0 - ok 1 - Too large -1 - Too small
|
|
partedPartition
|
weight
|
disk
|
Home | Trees | Indices | Help |
---|
Generated by Epydoc 3.0.1 on Fri Mar 2 14:52:24 2012 | http://epydoc.sourceforge.net |