Package ganeti :: Package storage :: Module container :: Class LvmPvStorage
[hide private]
[frames] | no frames]

Class LvmPvStorage

source code


LVM Physical Volume storage unit.

Instance Methods [hide private]
 
_SetAllocatable(self, name, allocatable)
Sets the "allocatable" flag on a physical volume.
source code
 
Modify(self, name, changes)
Modifies flags on a physical volume.
source code

Inherited from _LvmBase: List

Inherited from _Base: Execute

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

Class Methods [hide private]

Inherited from _LvmBase (private): _BuildList

Static Methods [hide private]
Class Variables [hide private]
  LIST_COMMAND = "pvs"
hash(x)
  LIST_FIELDS = [(constants.SF_NAME, ["pv_name"], None), (consta...
list of tuples consisting of three elements: SF_* constants, lvm command output fields (list), and conversion function or static value (for static value, the lvm output field can be an empty list)

Inherited from _LvmBase: LIST_SEP

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

_SetAllocatable(self, name, allocatable)

source code 

Sets the "allocatable" flag on a physical volume.

Parameters:
  • name (string) - Physical volume name
  • allocatable (bool) - Whether to set the "allocatable" flag

Modify(self, name, changes)

source code 

Modifies flags on a physical volume.

See _Base.Modify.

Parameters:
  • name - Entity name
  • changes - New field values
Overrides: _Base.Modify

Class Variable Details [hide private]

LIST_FIELDS

list of tuples consisting of three elements: SF_* constants, lvm command output fields (list), and conversion function or static value (for static value, the lvm output field can be an empty list)
Value:
[(constants.SF_NAME, ["pv_name"], None), (constants.SF_SIZE, ["pv_size\
"], _ParseSize), (constants.SF_USED, ["pv_used"], _ParseSize), (consta\
nts.SF_FREE, ["pv_free"], _ParseSize), (constants.SF_ALLOCATABLE, ["pv\
_attr"], _LvmPvGetAllocatable),]