Revision 843094ad lib/cmdlib/common.py

b/lib/cmdlib/common.py
907 907
  return op
908 908

  
909 909

  
910
def MapInstanceDisksToNodes(instances):
910
def MapInstanceLvsToNodes(instances):
911 911
  """Creates a map from (node, volume) to instance name.
912 912

  
913 913
  @type instances: list of L{objects.Instance}
914
  @rtype: dict; tuple of (node uuid, volume name) as key, instance name as value
914
  @rtype: dict; tuple of (node uuid, volume name) as key, L{objects.Instance}
915
          object as value
915 916

  
916 917
  """
917
  return dict(((node_uuid, vol), inst.name)
918
  return dict(((node_uuid, vol), inst)
918 919
              for inst in instances
919 920
              for (node_uuid, vols) in inst.MapLVsByNode().items()
920 921
              for vol in vols)

Also available in: Unified diff