Commit a2d32034 authored by Michael Hanselmann's avatar Michael Hanselmann
Browse files

Rename hypervisor code to lowercase filenames

Reviewed-by: iustinp
parent 94f3875d
CLEANFILES = *.py[oc]
hypervisordir = $(pkgpythondir)/hypervisor
hypervisor_PYTHON = __init__.py XenHypervisor.py FakeHypervisor.py \
BaseHypervisor.py
hypervisor_PYTHON = __init__.py hv_base.py hv_fake.py hv_xen.py
python_files = $(hypervisor_PYTHON)
include $(srcdir)/../Makefile.libcommon
......@@ -27,8 +27,8 @@ from ganeti import ssconf
from ganeti import constants
from ganeti import errors
from ganeti.hypervisor import FakeHypervisor
from ganeti.hypervisor import XenHypervisor
from ganeti.hypervisor import hv_fake
from ganeti.hypervisor import hv_xen
def GetHypervisor():
......@@ -40,11 +40,11 @@ def GetHypervisor():
"""
ht_kind = ssconf.SimpleStore().GetHypervisorType()
if ht_kind == constants.HT_XEN_PVM30:
cls = XenHypervisor.XenPvmHypervisor
cls = hv_xen.XenPvmHypervisor
elif ht_kind == constants.HT_XEN_HVM31:
cls = XenHypervisor.XenHvmHypervisor
cls = hv_xen.XenHvmHypervisor
elif ht_kind == constants.HT_FAKE:
cls = FakeHypervisor.FakeHypervisor
cls = hv_fake.FakeHypervisor
else:
raise errors.HypervisorError("Unknown hypervisor type '%s'" % ht_kind)
return cls()
......@@ -30,10 +30,10 @@ import re
from ganeti import utils
from ganeti import constants
from ganeti import errors
from ganeti.hypervisor import BaseHypervisor
from ganeti.hypervisor import hv_base
class FakeHypervisor(BaseHypervisor.BaseHypervisor):
class FakeHypervisor(hv_base.BaseHypervisor):
"""Fake hypervisor interface.
This can be used for testing the ganeti code without having to have
......@@ -43,7 +43,7 @@ class FakeHypervisor(BaseHypervisor.BaseHypervisor):
_ROOT_DIR = constants.RUN_DIR + "/ganeti-fake-hypervisor"
def __init__(self):
BaseHypervisor.__init__(self)
hv_base.BaseHypervisor.__init__(self)
if not os.path.exists(self._ROOT_DIR):
os.mkdir(self._ROOT_DIR)
......
......@@ -32,10 +32,10 @@ from ganeti import constants
from ganeti import errors
from ganeti import logger
from ganeti import utils
from ganeti.hypervisor import BaseHypervisor
from ganeti.hypervisor import hv_base
class XenHypervisor(BaseHypervisor.BaseHypervisor):
class XenHypervisor(hv_base.BaseHypervisor):
"""Xen generic hypervisor interface
This is the Xen base class used for both Xen PVM and HVM. It contains
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment