Revision a18ab868 lib/backend.py
b/lib/backend.py | ||
---|---|---|
646 | 646 |
def _GetLvmPvSpaceInfo(name, params): |
647 | 647 |
"""Wrapper around C{_GetVgSpindlesInfo} with sanity checks. |
648 | 648 |
|
649 |
@see C{_GetLvmVgSpaceInfo} |
|
649 |
@see: C{_GetLvmVgSpaceInfo}
|
|
650 | 650 |
|
651 | 651 |
""" |
652 | 652 |
excl_stor = _CheckLvmStorageParams(params) |
653 | 653 |
return _GetVgSpindlesInfo(name, excl_stor) |
654 | 654 |
|
655 | 655 |
|
656 |
def _GetVgSpindlesInfo(name, excl_stor): |
|
656 |
def _GetVgSpindlesInfo( |
|
657 |
name, excl_stor, info_fn=bdev.LogicalVolume.GetVgSpindlesInfo): |
|
657 | 658 |
"""Retrieves information about spindles in an LVM volume group. |
658 | 659 |
|
659 | 660 |
@type name: string |
... | ... | |
666 | 667 |
|
667 | 668 |
""" |
668 | 669 |
if excl_stor: |
669 |
(vg_free, vg_size) = bdev.LogicalVolume.GetVgSpindlesInfo(name)
|
|
670 |
(vg_free, vg_size) = info_fn(name)
|
|
670 | 671 |
else: |
671 | 672 |
vg_free = 0 |
672 | 673 |
vg_size = 0 |
Also available in: Unified diff