models.device_tree module¶
- 
class 
models.device_tree.DeviceTree(child_vec=None, device_id=None, device_length=None, stripe_size=None, thin_pool_chunk_size=None, mtype=None)[source]¶ Bases:
objectImplementation of the ‘DeviceTree’ model.
A logical volume is built on a tree where leaves are the slices of partitions (PartitionSlice) defined below and intermediate nodes are assembled by combining nodes in some mode (linear layout, striped, mirrored, RAID etc). A DeviceTree is a block device formed by combining one or more Devices using a combining strategy.
- Attributes:
 - child_vec (list of DeviceTreeChildDevice): TODO: type description
 here.
- device_id (int): Internal device identifier of the device to be
 activated as a thin volume.
- device_length (long|int): The length of this device. This should match
 the length which is computable based on children and combining strategy. e.g. if there is only one partition slice in an LVM volume, ‘length’ in the partition slice is equal to ‘device_length’.
- stripe_size (int): In case data is striped, this represents the length
 of the stripe. The number of stripes is defined by the size of child_vec above.
- thin_pool_chunk_size (int): Chunk size. Only populated if device type is
 thin pool.
mtype (int): How to combine the children.
- 
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.