Add 'docker' to the list of known hypervisor types

nova-docker is out of tree, but it's starting to be used by people, and
being able to use a docker-specific hypervisor type can be quite useful
(in mixed-hypervisor environments, for instance).

Change-Id: I5a50de6bf73372f1ab999fd977aa58b33ffacfb9
This commit is contained in:
Vincent Untz
2015-04-03 16:32:10 +02:00
parent 277ea04467
commit 2a21fcd073
2 changed files with 5 additions and 0 deletions

View File

@@ -29,6 +29,7 @@ from nova import exception
# even if not currently supported by OpenStack. # even if not currently supported by OpenStack.
BAREMETAL = "baremetal" BAREMETAL = "baremetal"
BHYVE = "bhyve" BHYVE = "bhyve"
DOCKER = "docker"
FAKE = "fake" FAKE = "fake"
HYPERV = "hyperv" HYPERV = "hyperv"
KQEMU = "kqemu" KQEMU = "kqemu"
@@ -48,6 +49,7 @@ ZVM = "zvm"
ALL = ( ALL = (
BAREMETAL, BAREMETAL,
BHYVE, BHYVE,
DOCKER,
FAKE, FAKE,
HYPERV, HYPERV,
KQEMU, KQEMU,

View File

@@ -25,6 +25,9 @@ class HvTypeTest(test.NoDBTestCase):
def test_valid_constant(self): def test_valid_constant(self):
self.assertTrue(hv_type.is_valid(hv_type.QEMU)) self.assertTrue(hv_type.is_valid(hv_type.QEMU))
def test_valid_docker(self):
self.assertTrue(hv_type.is_valid("docker"))
def test_valid_bogus(self): def test_valid_bogus(self):
self.assertFalse(hv_type.is_valid("acmehypervisor")) self.assertFalse(hv_type.is_valid("acmehypervisor"))