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:
@@ -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,
|
||||||
|
|||||||
@@ -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"))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user