Revision 30989e69

b/lib/cmdlib.py
3143 3143
    logger.Debug("connecting to console of %s on %s" % (instance.name, node))
3144 3144

  
3145 3145
    hyper = hypervisor.GetHypervisor()
3146
    console_cmd = hyper.GetShellCommandForConsole(instance.name)
3146
    console_cmd = hyper.GetShellCommandForConsole(instance)
3147 3147
    # build ssh cmdline
3148 3148
    argv = ["ssh", "-q", "-t"]
3149 3149
    argv.extend(ssh.KNOWN_HOSTS_OPTS)
b/lib/hypervisor.py
110 110
    raise NotImplementedError
111 111

  
112 112
  @staticmethod
113
  def GetShellCommandForConsole(instance_name):
113
  def GetShellCommandForConsole(instance):
114 114
    """Return a command for connecting to the console of an instance.
115 115

  
116 116
    """
......
320 320
    return result
321 321

  
322 322
  @staticmethod
323
  def GetShellCommandForConsole(instance_name):
323
  def GetShellCommandForConsole(instance):
324 324
    """Return a command for connecting to the console of an instance.
325 325

  
326 326
    """
327
    return "xm console %s" % instance_name
327
    return "xm console %s" % instance.name
328 328

  
329 329

  
330 330
  def Verify(self):
......
496 496
    return result
497 497

  
498 498
  @staticmethod
499
  def GetShellCommandForConsole(instance_name):
499
  def GetShellCommandForConsole(instance):
500 500
    """Return a command for connecting to the console of an instance.
501 501

  
502 502
    """

Also available in: Unified diff