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

Class LvmVgStorage

source code


LVM Volume Group storage unit.

Instance Methods [hide private]
 
_RemoveMissing(self, name, _runcmd_fn=utils.RunCmd)
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

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 = "vgs"
  VGREDUCE_COMMAND = "vgreduce"
  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

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

_RemoveMissing(self, name, _runcmd_fn=utils.RunCmd)

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),]