Revision 3f73b3ae lib/backend.py

b/lib/backend.py
622 622
  return _GetVgInfo(name, excl_stor)
623 623

  
624 624

  
625
def _GetVgInfo(name, excl_stor):
625
def _GetVgInfo(
626
    name, excl_stor, info_fn=bdev.LogicalVolume.GetVGInfo):
626 627
  """Retrieves information about a LVM volume group.
627 628

  
628 629
  """
629 630
  # TODO: GetVGInfo supports returning information for multiple VGs at once
630
  vginfo = bdev.LogicalVolume.GetVGInfo([name], excl_stor)
631
  vginfo = info_fn([name], excl_stor)
631 632
  if vginfo:
632 633
    vg_free = int(round(vginfo[0][0], 0))
633 634
    vg_size = int(round(vginfo[0][1], 0))
......
651 652
  """
652 653
  excl_stor = _CheckLvmStorageParams(params)
653 654
  return _GetVgSpindlesInfo(name, excl_stor)
654
 
655

  
655 656

  
656 657
def _GetVgSpindlesInfo(
657 658
    name, excl_stor, info_fn=bdev.LogicalVolume.GetVgSpindlesInfo):

Also available in: Unified diff