Revision 1a3c5d4e lib/backend.py

b/lib/backend.py
541 541
  raise errors.QuitGanetiException(True, "Shutdown scheduled")
542 542

  
543 543

  
544
def _GetVgInfo(name):
544
def _GetVgInfo(name, excl_stor):
545 545
  """Retrieves information about a LVM volume group.
546 546

  
547 547
  """
548 548
  # TODO: GetVGInfo supports returning information for multiple VGs at once
549
  vginfo = bdev.LogicalVolume.GetVGInfo([name])
549
  vginfo = bdev.LogicalVolume.GetVGInfo([name], excl_stor)
550 550
  if vginfo:
551 551
    vg_free = int(round(vginfo[0][0], 0))
552 552
    vg_size = int(round(vginfo[0][1], 0))
......
589 589
    return map(fn, names)
590 590

  
591 591

  
592
def GetNodeInfo(vg_names, hv_names):
592
def GetNodeInfo(vg_names, hv_names, excl_stor):
593 593
  """Gives back a hash with different information about the node.
594 594

  
595 595
  @type vg_names: list of string
596 596
  @param vg_names: Names of the volume groups to ask for disk space information
597 597
  @type hv_names: list of string
598 598
  @param hv_names: Names of the hypervisors to ask for node information
599
  @type excl_stor: boolean
600
  @param excl_stor: Whether exclusive_storage is active
599 601
  @rtype: tuple; (string, None/dict, None/dict)
600 602
  @return: Tuple containing boot ID, volume group information and hypervisor
601 603
    information
602 604

  
603 605
  """
604 606
  bootid = utils.ReadFile(_BOOT_ID_PATH, size=128).rstrip("\n")
605
  vg_info = _GetNamedNodeInfo(vg_names, _GetVgInfo)
607
  vg_info = _GetNamedNodeInfo(vg_names, (lambda vg: _GetVgInfo(vg, excl_stor)))
606 608
  hv_info = _GetNamedNodeInfo(hv_names, _GetHvInfo)
607 609

  
608 610
  return (bootid, vg_info, hv_info)

Also available in: Unified diff