Revision 9d9bded1

b/lib/hypervisor/hv_chroot.py
32 32
from ganeti import errors # pylint: disable=W0611
33 33
from ganeti import utils
34 34
from ganeti import objects
35
from ganeti import pathutils
35 36
from ganeti.hypervisor import hv_base
36 37
from ganeti.errors import HypervisorError
37 38

  
......
58 59
    - instance alive check is based on whether any process is using the chroot
59 60

  
60 61
  """
61
  _ROOT_DIR = constants.RUN_DIR + "/chroot-hypervisor"
62
  _ROOT_DIR = pathutils.RUN_DIR + "/chroot-hypervisor"
62 63

  
63 64
  PARAMETERS = {
64 65
    constants.HV_INIT_SCRIPT: (True, utils.IsNormAbsPath,
b/lib/hypervisor/hv_fake.py
31 31
from ganeti import constants
32 32
from ganeti import errors
33 33
from ganeti import objects
34
from ganeti import pathutils
34 35
from ganeti.hypervisor import hv_base
35 36

  
36 37

  
......
43 44
  """
44 45
  CAN_MIGRATE = True
45 46

  
46
  _ROOT_DIR = constants.RUN_DIR + "/fake-hypervisor"
47
  _ROOT_DIR = pathutils.RUN_DIR + "/fake-hypervisor"
47 48

  
48 49
  def __init__(self):
49 50
    hv_base.BaseHypervisor.__init__(self)
b/lib/hypervisor/hv_kvm.py
49 49
from ganeti import objects
50 50
from ganeti import uidpool
51 51
from ganeti import ssconf
52
from ganeti.hypervisor import hv_base
53 52
from ganeti import netutils
53
from ganeti import pathutils
54
from ganeti.hypervisor import hv_base
54 55
from ganeti.utils import wrapper as utils_wrapper
55 56

  
56 57

  
57
_KVM_NETWORK_SCRIPT = constants.SYSCONFDIR + "/ganeti/kvm-vif-bridge"
58
_KVM_NETWORK_SCRIPT = pathutils.SYSCONFDIR + "/ganeti/kvm-vif-bridge"
58 59
_KVM_START_PAUSED_FLAG = "-S"
59 60

  
60 61
# TUN/TAP driver constants, taken from <linux/if_tun.h>
......
404 405
  """
405 406
  CAN_MIGRATE = True
406 407

  
407
  _ROOT_DIR = constants.RUN_DIR + "/kvm-hypervisor"
408
  _ROOT_DIR = pathutils.RUN_DIR + "/kvm-hypervisor"
408 409
  _PIDS_DIR = _ROOT_DIR + "/pid" # contains live instances pids
409 410
  _UIDS_DIR = _ROOT_DIR + "/uid" # contains instances reserved uids
410 411
  _CTRL_DIR = _ROOT_DIR + "/ctrl" # contains instances control sockets
......
777 778
    if nic.nicparams[constants.NIC_MODE] == constants.NIC_MODE_BRIDGED:
778 779
      env["BRIDGE"] = nic.nicparams[constants.NIC_LINK]
779 780

  
780
    result = utils.RunCmd([constants.KVM_IFUP, tap], env=env)
781
    result = utils.RunCmd([pathutils.KVM_IFUP, tap], env=env)
781 782
    if result.failed:
782 783
      raise errors.HypervisorError("Failed to configure interface %s: %s."
783 784
                                   " Network configuration script output: %s" %
......
1195 1196
      if hvp[constants.HV_KVM_SPICE_USE_TLS]:
1196 1197
        spice_arg = ("%s,tls-port=%s,x509-cacert-file=%s" %
1197 1198
                     (spice_arg, instance.network_port,
1198
                      constants.SPICE_CACERT_FILE))
1199
                      pathutils.SPICE_CACERT_FILE))
1199 1200
        spice_arg = ("%s,x509-key-file=%s,x509-cert-file=%s" %
1200
                     (spice_arg, constants.SPICE_CERT_FILE,
1201
                      constants.SPICE_CERT_FILE))
1201
                     (spice_arg, pathutils.SPICE_CERT_FILE,
1202
                      pathutils.SPICE_CERT_FILE))
1202 1203
        tls_ciphers = hvp[constants.HV_KVM_SPICE_TLS_CIPHERS]
1203 1204
        if tls_ciphers:
1204 1205
          spice_arg = "%s,tls-ciphers=%s" % (spice_arg, tls_ciphers)
......
1824 1825

  
1825 1826
    """
1826 1827
    if hvparams[constants.HV_SERIAL_CONSOLE]:
1827
      cmd = [constants.KVM_CONSOLE_WRAPPER,
1828
      cmd = [pathutils.KVM_CONSOLE_WRAPPER,
1828 1829
             constants.SOCAT_PATH, utils.ShellQuote(instance.name),
1829 1830
             utils.ShellQuote(cls._InstanceMonitor(instance.name)),
1830 1831
             "STDIO,%s" % cls._SocatUnixConsoleParams(),
b/lib/hypervisor/hv_lxc.py
32 32
from ganeti import errors # pylint: disable=W0611
33 33
from ganeti import utils
34 34
from ganeti import objects
35
from ganeti import pathutils
35 36
from ganeti.hypervisor import hv_base
36 37
from ganeti.errors import HypervisorError
37 38

  
......
65 66
      notify_on_release and release_agent feature of cgroups
66 67

  
67 68
  """
68
  _ROOT_DIR = constants.RUN_DIR + "/lxc"
69
  _ROOT_DIR = pathutils.RUN_DIR + "/lxc"
69 70
  _DEVS = [
70 71
    "c 1:3",   # /dev/null
71 72
    "c 1:5",   # /dev/zero
b/lib/hypervisor/hv_xen.py
32 32
from ganeti.hypervisor import hv_base
33 33
from ganeti import netutils
34 34
from ganeti import objects
35
from ganeti import pathutils
35 36

  
36 37

  
37 38
XEND_CONFIG_FILE = "/etc/xen/xend-config.sxp"
......
420 421
                                   kind=constants.CONS_SSH,
421 422
                                   host=instance.primary_node,
422 423
                                   user=constants.GANETI_RUNAS,
423
                                   command=[constants.XM_CONSOLE_WRAPPER,
424
                                   command=[pathutils.XM_CONSOLE_WRAPPER,
424 425
                                            instance.name])
425 426

  
426 427
  def Verify(self):
......
707 708
  """Xen HVM hypervisor interface"""
708 709

  
709 710
  ANCILLARY_FILES = XenHypervisor.ANCILLARY_FILES + [
710
    constants.VNC_PASSWORD_FILE,
711
    pathutils.VNC_PASSWORD_FILE,
711 712
    ]
712 713
  ANCILLARY_FILES_OPT = XenHypervisor.ANCILLARY_FILES_OPT + [
713
    constants.VNC_PASSWORD_FILE,
714
    pathutils.VNC_PASSWORD_FILE,
714 715
    ]
715 716

  
716 717
  PARAMETERS = {

Also available in: Unified diff