Revision 55cc0a44 lib/hypervisor/hv_xen.py

b/lib/hypervisor/hv_xen.py
31 31
from ganeti import utils
32 32
from ganeti.hypervisor import hv_base
33 33
from ganeti import netutils
34
from ganeti import objects
34 35

  
35 36

  
36 37
class XenHypervisor(hv_base.BaseHypervisor):
......
294 295
    return result
295 296

  
296 297
  @classmethod
297
  def GetShellCommandForConsole(cls, instance, hvparams, beparams):
298
  def GetInstanceConsole(cls, instance, hvparams, beparams):
298 299
    """Return a command for connecting to the console of an instance.
299 300

  
300 301
    """
301
    return "xm console %s" % instance.name
302

  
302
    return objects.InstanceConsole(instance=instance.name,
303
                                   kind=constants.CONS_SSH,
304
                                   host=instance.primary_node,
305
                                   user=constants.GANETI_RUNAS,
306
                                   command=["xm", "console", instance.name])
303 307

  
304 308
  def Verify(self):
305 309
    """Verify the hypervisor.

Also available in: Unified diff