Change the internal hypervisor API for GetShellCommandForConsole, we
now call it with the instance instead of just the instance name.
This is a prep patch for HVM, since HVM needs more than just the instance
name to determine a way of console access.
(this is a resend due to mail adress tyop)
Reviewed-by: iustinp
logger.Debug("connecting to console of %s on %s" % (instance.name, node))
hyper = hypervisor.GetHypervisor()
- console_cmd = hyper.GetShellCommandForConsole(instance.name)
+ console_cmd = hyper.GetShellCommandForConsole(instance)
# build ssh cmdline
argv = ["ssh", "-q", "-t"]
argv.extend(ssh.KNOWN_HOSTS_OPTS)
raise NotImplementedError
@staticmethod
- def GetShellCommandForConsole(instance_name):
+ def GetShellCommandForConsole(instance):
"""Return a command for connecting to the console of an instance.
"""
return result
@staticmethod
- def GetShellCommandForConsole(instance_name):
+ def GetShellCommandForConsole(instance):
"""Return a command for connecting to the console of an instance.
"""
- return "xm console %s" % instance_name
+ return "xm console %s" % instance.name
def Verify(self):
return result
@staticmethod
- def GetShellCommandForConsole(instance_name):
+ def GetShellCommandForConsole(instance):
"""Return a command for connecting to the console of an instance.
"""