Merge "Add 'lxd' to the list of recognized hypervisors"
This commit is contained in:
@@ -36,6 +36,7 @@ IRONIC = "ironic"
|
|||||||
KQEMU = "kqemu"
|
KQEMU = "kqemu"
|
||||||
KVM = "kvm"
|
KVM = "kvm"
|
||||||
LXC = "lxc"
|
LXC = "lxc"
|
||||||
|
LXD = "lxd"
|
||||||
OPENVZ = "openvz"
|
OPENVZ = "openvz"
|
||||||
PARALLELS = "parallels"
|
PARALLELS = "parallels"
|
||||||
VIRTUOZZO = "vz"
|
VIRTUOZZO = "vz"
|
||||||
@@ -58,6 +59,7 @@ ALL = (
|
|||||||
KQEMU,
|
KQEMU,
|
||||||
KVM,
|
KVM,
|
||||||
LXC,
|
LXC,
|
||||||
|
LXD,
|
||||||
OPENVZ,
|
OPENVZ,
|
||||||
PARALLELS,
|
PARALLELS,
|
||||||
PHYP,
|
PHYP,
|
||||||
|
@@ -23,7 +23,8 @@ from nova import utils
|
|||||||
class HVSpec(base.NovaObject):
|
class HVSpec(base.NovaObject):
|
||||||
# Version 1.0: Initial version
|
# Version 1.0: Initial version
|
||||||
# Version 1.1: Added 'vz' hypervisor
|
# Version 1.1: Added 'vz' hypervisor
|
||||||
VERSION = '1.1'
|
# Version 1.2: Added 'lxd' hypervisor
|
||||||
|
VERSION = '1.2'
|
||||||
|
|
||||||
fields = {
|
fields = {
|
||||||
'arch': fields.ArchitectureField(),
|
'arch': fields.ArchitectureField(),
|
||||||
|
@@ -37,7 +37,8 @@ class ImageMeta(base.NovaObject):
|
|||||||
# Version 1.5: ImageMetaProps version 1.5
|
# Version 1.5: ImageMetaProps version 1.5
|
||||||
# Version 1.6: ImageMetaProps version 1.6
|
# Version 1.6: ImageMetaProps version 1.6
|
||||||
# Version 1.7: ImageMetaProps version 1.7
|
# Version 1.7: ImageMetaProps version 1.7
|
||||||
VERSION = '1.7'
|
# Version 1.8: ImageMetaProps version 1.8
|
||||||
|
VERSION = '1.8'
|
||||||
|
|
||||||
# These are driven by what the image client API returns
|
# These are driven by what the image client API returns
|
||||||
# to Nova from Glance. This is defined in the glance
|
# to Nova from Glance. This is defined in the glance
|
||||||
@@ -134,7 +135,8 @@ class ImageMetaProps(base.NovaObject):
|
|||||||
# Version 1.5: added os_admin_user field
|
# Version 1.5: added os_admin_user field
|
||||||
# Version 1.6: Added 'lxc' and 'uml' enum types to DiskBusField
|
# Version 1.6: Added 'lxc' and 'uml' enum types to DiskBusField
|
||||||
# Version 1.7: added img_config_drive field
|
# Version 1.7: added img_config_drive field
|
||||||
VERSION = '1.7'
|
# Version 1.8: Added 'lxd' to hypervisor types
|
||||||
|
VERSION = '1.8'
|
||||||
|
|
||||||
def obj_make_compatible(self, primitive, target_version):
|
def obj_make_compatible(self, primitive, target_version):
|
||||||
super(ImageMetaProps, self).obj_make_compatible(primitive,
|
super(ImageMetaProps, self).obj_make_compatible(primitive,
|
||||||
|
@@ -28,6 +28,9 @@ class HvTypeTest(test.NoDBTestCase):
|
|||||||
def test_valid_docker(self):
|
def test_valid_docker(self):
|
||||||
self.assertTrue(hv_type.is_valid("docker"))
|
self.assertTrue(hv_type.is_valid("docker"))
|
||||||
|
|
||||||
|
def test_valid_lxd(self):
|
||||||
|
self.assertTrue(hv_type.is_valid("lxd"))
|
||||||
|
|
||||||
def test_valid_vz(self):
|
def test_valid_vz(self):
|
||||||
self.assertTrue(hv_type.is_valid(hv_type.VIRTUOZZO))
|
self.assertTrue(hv_type.is_valid(hv_type.VIRTUOZZO))
|
||||||
|
|
||||||
|
@@ -1211,9 +1211,9 @@ object_data = {
|
|||||||
'FloatingIP': '1.10-52a67d52d85eb8b3f324a5b7935a335b',
|
'FloatingIP': '1.10-52a67d52d85eb8b3f324a5b7935a335b',
|
||||||
'FloatingIPList': '1.11-7f2ba670714e1b7bab462ab3290f7159',
|
'FloatingIPList': '1.11-7f2ba670714e1b7bab462ab3290f7159',
|
||||||
'HostMapping': '1.0-1a3390a696792a552ab7bd31a77ba9ac',
|
'HostMapping': '1.0-1a3390a696792a552ab7bd31a77ba9ac',
|
||||||
'HVSpec': '1.1-6b4f7c0f688cbd03e24142a44eb9010d',
|
'HVSpec': '1.2-db672e73304da86139086d003f3977e7',
|
||||||
'ImageMeta': '1.7-642d1b2eb3e880a367f37d72dd76162d',
|
'ImageMeta': '1.8-642d1b2eb3e880a367f37d72dd76162d',
|
||||||
'ImageMetaProps': '1.7-f12fc4cf3e25d616f69a66fb9d2a7aa6',
|
'ImageMetaProps': '1.8-a07a00bb829668f3bdccf8de03c128bb',
|
||||||
'Instance': '2.0-ff56804dce87d81d9a04834d4bd1e3d2',
|
'Instance': '2.0-ff56804dce87d81d9a04834d4bd1e3d2',
|
||||||
'InstanceAction': '1.1-f9f293e526b66fca0d05c3b3a2d13914',
|
'InstanceAction': '1.1-f9f293e526b66fca0d05c3b3a2d13914',
|
||||||
'InstanceActionEvent': '1.1-e56a64fa4710e43ef7af2ad9d6028b33',
|
'InstanceActionEvent': '1.1-e56a64fa4710e43ef7af2ad9d6028b33',
|
||||||
|
Reference in New Issue
Block a user