models.disk module¶
-
class
models.disk.
Disk
(disk_blocks=None, disk_format=None, disk_partitions=None, partition_table_format=None, sector_size_bytes=None, uuid=None, vmdk_file_name=None, vmdk_size_bytes=None)[source]¶ Bases:
object
Implementation of the ‘Disk’ model.
Specifies information about a disk and partitions in a volume.
- Attributes:
- disk_blocks (list of DiskBlock): Array of Disk Blocks. Specifies a
set of disk blocks by defining the location and offset of disk blocks in a disk.
- disk_format (DiskFormatEnum): Specifies the format of the virtual
disk. ‘kVMDK’ indicates VMware’s Virtual Disk format. ‘kVHD’ indicates Microsoft’s Virtual Hard Drive format. ‘kVHDx’ indicates Microsoft’s Hyper-V Virtual Hard Drive format. ‘kRaw’ indicates Raw disk format used by KVM, Acropolis. ‘kUnknow’ indicates Unknown disk format.
- disk_partitions (list of DiskPartition): Array of Partitions.
Specifies information about all the partitions in this disk.
- partition_table_format (PartitionTableFormatEnum): Specifies partition
table format on a disk. ‘kNoPartition’ indicates missing partition table. ‘kMBRPartition’ indicates partition table is in Master Boot Record format. ‘kGPTPartition’ indicates partition table is in Guid Partition Table format. ‘kSGIPartition’ indicates partition table uses SGI scheme. ‘kSUNPartition’ indicates partition table uses SUN scheme.
- sector_size_bytes (long|int): Specifies the sector size of hard disk.
It is used for mapping the disk blocks of the disk file into a linear list of sectors.
uuid (string): Specifies the disk uuid. vmdk_file_name (string): Specifies the disk file name. This is the
VMDK name and not the flat file name.
vmdk_size_bytes (long|int): Specifies the disk size in bytes.
-
classmethod
from_dictionary
(dictionary)[source]¶ Creates an instance of this model from a dictionary
- Args:
dictionary (dictionary): A dictionary representation of the object as obtained from the deserialization of the server’s response. The keys MUST match property names in the API description.
- Returns:
object: An instance of this structure class.