class documentation

class LvmVgStorage(_LvmBase):

View In Hierarchy

LVM Volume Group storage unit.

Method Execute Executes an operation on a virtual volume.
Constant LIST_COMMAND Undocumented
Constant LIST_FIELDS Undocumented
Constant VGREDUCE_COMMAND Undocumented
Method _RemoveMissing Runs "vgreduce --removemissing" on a volume group.

Inherited from _LvmBase:

Method List Returns a list of all entities within the storage unit.
Constant LIST_SEP Undocumented
Class Method _BuildList Builds the final result list.
Static Method _BuildListCommand Builds LVM command line.
Static Method _GetLvmFields Returns unique list of fields wanted from LVM command.
Static Method _RunListCommand Run LVM command.
Static Method _SplitList Splits LVM command output into rows and fields.

Inherited from _Base (via _LvmBase):

Method Modify Modifies an entity within the storage unit.
def Execute(self, name, op):

Executes an operation on a virtual volume.

See _Base.Execute.

LIST_COMMAND: str =

Undocumented

Value
'vgs'
LIST_FIELDS =

Undocumented

Value
[(constants.SF_NAME, ['vg_name'], None),
 (constants.SF_SIZE, ['vg_size'], _ParseSize),
 (constants.SF_FREE, ['vg_free'], _ParseSize),
 (constants.SF_USED,
  ['vg_size', 'vg_free'],
  (lambda x, y: _ParseSize(x) - _ParseSize(y))),
 (constants.SF_ALLOCATABLE, [], True)]
VGREDUCE_COMMAND: str =

Undocumented

Value
'vgreduce'
def _RemoveMissing(self, name, _runcmd_fn=utils.RunCmd):

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

Parameters
name:stringVolume group name
_runcmd_fnUndocumented