models.device_tree_details module¶
-
class
models.device_tree_details.
DeviceTreeDetails
(combine_method=None, device_length=None, device_nodes=None, stripe_size=None)[source]¶ Bases:
object
Implementation of the ‘DeviceTreeDetails’ model.
Specifies a logical volume stored as a tree where the leaves are the blocks of partitions and intermediate nodes are assembled by combining nodes using one of the following modes: linear layout, striped, mirrored, RAID etc. A deviceTree is a block device formed by combining one or more Devices using a combining strategy.
- Attributes:
- combine_method (CombineMethodEnum): Specifies how to combine the
children of this node. The combining strategy for child devices. Some of these strategies imply constraint on the number of child devices. e.g. RAID5 will have 5 children. ‘LINEAR’ indicates children are juxtaposed to form this device. ‘STRIPE’ indicates children are striped. ‘MIRROR’ indicates children are mirrored. ‘RAID5’ ‘RAID6’ ‘ZERO’ ‘THIN’ ‘THINPOOL’ ‘SNAPSHOT’ ‘CACHE’ ‘CACHEPOOL’
- device_length (long|int): Specifies the length of this device. This
number should match the length that is calculated from the children and combining method.
- device_nodes (list of DeviceNode): Specifies the children of this node
in the device tree.
- stripe_size (int): Specifies the size of the striped data if the data
is striped.
-
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.