Revision 65107a2f

b/lib/hypervisor/hv_kvm.py
139 139
  """QEMU Messaging Protocol (QMP) message.
140 140

  
141 141
  """
142

  
143 142
  def __init__(self, data):
144 143
    """Creates a new QMP message based on the passed data.
145 144

  
......
400 399

  
401 400

  
402 401
class KVMHypervisor(hv_base.BaseHypervisor):
403
  """KVM hypervisor interface"""
402
  """KVM hypervisor interface
403

  
404
  """
404 405
  CAN_MIGRATE = True
405 406

  
406 407
  _ROOT_DIR = constants.RUN_GANETI_DIR + "/kvm-hypervisor"
......
496 497

  
497 498
  _MIGRATION_STATUS_RE = re.compile("Migration\s+status:\s+(\w+)",
498 499
                                    re.M | re.I)
499
  _MIGRATION_PROGRESS_RE = re.compile(
500
      "\s*transferred\s+ram:\s+(?P<transferred>\d+)\s+kbytes\s*\n"
501
      "\s*remaining\s+ram:\s+(?P<remaining>\d+)\s+kbytes\s*\n"
502
      "\s*total\s+ram:\s+(?P<total>\d+)\s+kbytes\s*\n", re.I)
500
  _MIGRATION_PROGRESS_RE = \
501
    re.compile("\s*transferred\s+ram:\s+(?P<transferred>\d+)\s+kbytes\s*\n"
502
               "\s*remaining\s+ram:\s+(?P<remaining>\d+)\s+kbytes\s*\n"
503
               "\s*total\s+ram:\s+(?P<total>\d+)\s+kbytes\s*\n", re.I)
503 504

  
504 505
  _MIGRATION_INFO_MAX_BAD_ANSWERS = 5
505 506
  _MIGRATION_INFO_RETRY_DELAY = 2
......
751 752
    @type tap: str
752 753

  
753 754
    """
754

  
755 755
    if instance.tags:
756 756
      tags = " ".join(instance.tags)
757 757
    else:
......
820 820
    @type thread_dict: dict int:int
821 821

  
822 822
    """
823

  
824 823
    # Convert the string CPU mask to a list of list of int's
825 824
    cpu_list = utils.ParseMultiCpuMask(cpu_mask)
826 825

  
......
1168 1167
          # we have both ipv4 and ipv6, let's use the cluster default IP
1169 1168
          # version
1170 1169
          cluster_family = ssconf.SimpleStore().GetPrimaryIPFamily()
1171
          spice_ip_version = netutils.IPAddress.GetVersionFromAddressFamily(
1172
              cluster_family)
1170
          spice_ip_version = \
1171
            netutils.IPAddress.GetVersionFromAddressFamily(cluster_family)
1173 1172
        elif addresses[constants.IP4_VERSION]:
1174 1173
          spice_ip_version = constants.IP4_VERSION
1175 1174
        elif addresses[constants.IP6_VERSION]:

Also available in: Unified diff