Revision 18bf85b1

b/lib/hypervisor/hv_xen.py
37 37
XEND_CONFIG_FILE = "/etc/xen/xend-config.sxp"
38 38
XL_CONFIG_FILE = "/etc/xen/xl.conf"
39 39
VIF_BRIDGE_SCRIPT = "/etc/xen/scripts/vif-bridge"
40
_DOM0_NAME = "Domain-0"
40 41

  
41 42

  
42 43
class XenHypervisor(hv_base.BaseHypervisor):
......
196 197
                                     " line: %s, error: %s" % (line, err))
197 198

  
198 199
      # skip the Domain-0 (optional)
199
      if include_node or data[0] != "Domain-0":
200
      if include_node or data[0] != _DOM0_NAME:
200 201
        result.append(data)
201 202

  
202 203
    return result
......
217 218
    @return: tuple (name, id, memory, vcpus, stat, times)
218 219

  
219 220
    """
220
    xm_list = self._GetXMList(instance_name == "Domain-0")
221
    xm_list = self._GetXMList(instance_name == _DOM0_NAME)
221 222
    result = None
222 223
    for data in xm_list:
223 224
      if data[0] == instance_name:
......
352 353
        threads_per_core is not None and nr_cpus is not None):
353 354
      result["cpu_sockets"] = nr_cpus / (cores_per_socket * threads_per_core)
354 355

  
355
    dom0_info = self.GetInstanceInfo("Domain-0")
356
    dom0_info = self.GetInstanceInfo(_DOM0_NAME)
356 357
    if dom0_info is not None:
357 358
      result["memory_dom0"] = dom0_info[2]
358 359

  

Also available in: Unified diff