Revision 5431b2e4

b/lib/cmdlib.py
4701 4701
    logging.debug("Connecting to console of %s on %s", instance.name, node)
4702 4702

  
4703 4703
    hyper = hypervisor.GetHypervisor(instance.hypervisor)
4704
    console_cmd = hyper.GetShellCommandForConsole(instance)
4704
    cluster = self.cfg.GetClusterInfo()
4705
    # beparams and hvparams are passed separately, to avoid editing the
4706
    # instance and then saving the defaults in the instance itself.
4707
    hvparams = cluster.FillHV(instance)
4708
    beparams = cluster.FillBE(instance)
4709
    console_cmd = hyper.GetShellCommandForConsole(instance, hvparams, beparams)
4705 4710

  
4706 4711
    # build ssh cmdline
4707 4712
    return self.ssh.BuildCmd(node, "root", console_cmd, batch=True, tty=True)
b/lib/hypervisor/hv_base.py
85 85
    raise NotImplementedError
86 86

  
87 87
  @classmethod
88
  def GetShellCommandForConsole(cls, instance):
88
  def GetShellCommandForConsole(cls, instance, hvparams, beparams):
89 89
    """Return a command for connecting to the console of an instance.
90 90

  
91 91
    """
b/lib/hypervisor/hv_fake.py
204 204
    return result
205 205

  
206 206
  @classmethod
207
  def GetShellCommandForConsole(cls, instance):
207
  def GetShellCommandForConsole(cls, instance, hvparams, beparams):
208 208
    """Return a command for connecting to the console of an instance.
209 209

  
210 210
    """
b/lib/hypervisor/hv_kvm.py
582 582
    return result
583 583

  
584 584
  @classmethod
585
  def GetShellCommandForConsole(cls, instance):
585
  def GetShellCommandForConsole(cls, instance, hvparams, beparams):
586 586
    """Return a command for connecting to the console of an instance.
587 587

  
588 588
    """
b/lib/hypervisor/hv_xen.py
233 233
    return result
234 234

  
235 235
  @classmethod
236
  def GetShellCommandForConsole(cls, instance):
236
  def GetShellCommandForConsole(cls, instance, hvparams, beparams):
237 237
    """Return a command for connecting to the console of an instance.
238 238

  
239 239
    """

Also available in: Unified diff