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

Class LvmVgStorage

source code


LVM Volume Group storage unit.

Instance Methods [hide private]
 
_RemoveMissing(self, name)
Runs "vgreduce --removemissing" on a volume group.
source code
 
Execute(self, name, op)
Executes an operation on a virtual volume.
source code

Inherited from _LvmBase: List

Inherited from _Base: Modify

Class Methods [hide private]

Inherited from _LvmBase (private): _BuildList

Static Methods [hide private]
Class Variables [hide private]
  LIST_COMMAND = "vgs"
  LIST_FIELDS = [(constants.SF_NAME, ["vg_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

Method Details [hide private]

_RemoveMissing(self, name)

source code 

Runs "vgreduce --removemissing" on a volume group.

Parameters:
  • name (string) - Volume group name

Execute(self, name, op)

source code 

Executes an operation on a virtual volume.

See _Base.Execute.

Parameters:
  • name - Entity name
  • op - Operation name
Overrides: _Base.Execute

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, ["vg_name"], None), (constants.SF_SIZE, ["vg_size\
"], _ParseSize), (constants.SF_FREE, ["vg_free"], _ParseSize), (consta\
nts.SF_USED, ["vg_size", "vg_free"], lambda x, y: _ParseSize(x)-_Parse\
Size(y)), (constants.SF_ALLOCATABLE, [], True),]