Revision 738436bf

b/lib/cmdlib/common.py
58 58
  @raise errors.OpPrereqError: if the item is not found
59 59

  
60 60
  """
61
  full_name = expand_fn(name)
62
  if full_name is None:
61
  (uuid, full_name) = expand_fn(name)
62
  if uuid is None or full_name is None:
63 63
    raise errors.OpPrereqError("%s '%s' not known" % (kind, name),
64 64
                               errors.ECODE_NOENT)
65
  return full_name
65
  return (uuid, full_name)
66 66

  
67 67

  
68 68
def ExpandInstanceUuidAndName(cfg, expected_uuid, name):
b/lib/config.py
1617 1617
      inst = (filter(lambda n: n.name == expanded_name, all_insts)[0])
1618 1618
      return (inst.uuid, inst.name)
1619 1619
    else:
1620
      return None
1620
      return (None, None)
1621 1621

  
1622 1622
  def _UnlockedGetInstanceInfo(self, inst_uuid):
1623 1623
    """Returns information about an instance.
......
1843 1843
      node = (filter(lambda n: n.name == expanded_name, all_nodes)[0])
1844 1844
      return (node.uuid, node.name)
1845 1845
    else:
1846
      return None
1846
      return (None, None)
1847 1847

  
1848 1848
  def _UnlockedGetNodeInfo(self, node_uuid):
1849 1849
    """Get the configuration of a node, as stored in the config.

Also available in: Unified diff