Revision 8ef418bb lib/hypervisor/hv_xen.py

b/lib/hypervisor/hv_xen.py
628 628
    instance_list = self._GetInstanceList(True, hvparams)
629 629
    return _GetNodeInfo(result.stdout, instance_list)
630 630

  
631
  @classmethod
632
  def GetInstanceConsole(cls, instance, hvparams, beparams):
631
  def GetInstanceConsole(self, instance, hvparams, beparams):
633 632
    """Return a command for connecting to the console of an instance.
634 633

  
635 634
    """
635
    xen_cmd = self._GetCommand(hvparams)
636 636
    return objects.InstanceConsole(instance=instance.name,
637 637
                                   kind=constants.CONS_SSH,
638 638
                                   host=instance.primary_node,
639 639
                                   user=constants.SSH_CONSOLE_USER,
640 640
                                   command=[pathutils.XEN_CONSOLE_WRAPPER,
641
                                            constants.XEN_CMD, instance.name])
641
                                            xen_cmd, instance.name])
642 642

  
643 643
  def Verify(self, hvparams=None):
644 644
    """Verify the hypervisor.
......
812 812
    """
813 813
    return objects.MigrationStatus(status=constants.HV_MIGRATION_COMPLETED)
814 814

  
815
  @classmethod
816
  def PowercycleNode(cls):
815
  def PowercycleNode(self, hvparams=None):
817 816
    """Xen-specific powercycle.
818 817

  
819 818
    This first does a Linux reboot (which triggers automatically a Xen
......
823 822
    won't work in case the root filesystem is broken and/or the xend
824 823
    daemon is not working.
825 824

  
825
    @type hvparams: dict of strings
826
    @param hvparams: hypervisor params to be used on this node
827

  
826 828
    """
827 829
    try:
828
      cls.LinuxPowercycle()
830
      self.LinuxPowercycle()
829 831
    finally:
830
      utils.RunCmd([constants.XEN_CMD, "debug", "R"])
832
      xen_cmd = self._GetCommand(hvparams)
833
      utils.RunCmd([xen_cmd, "debug", "R"])
831 834

  
832 835
  def _CheckToolstack(self, xen_cmd):
833 836
    """Check whether the given toolstack is available on the node.

Also available in: Unified diff