libvirt: rename parallels driver to virtuozzo

As Parallels Cloud Server product was renamed within Parallels company rebranding
we need to change its reference in feature support matrix and documents accordingly.
A parameter 'virt_type' in libvirt section of nova.conf will remain 'parallels'.

Since libvirt version that supports 'vz' starts to report it as a hypervisor type,
we add a new hv_type 'vz' in the list of known hypervisors.

DocImpact.

Change-Id: I536e4284927508a813edd05f185f7ba0ed76d38c
implements: blueprint rename-pcs-to-virtuozzo
This commit is contained in:
Maxim Nestratov 2015-06-04 18:13:29 +03:00
parent f79e8cf09d
commit bc3b6cca47
10 changed files with 170 additions and 102 deletions

View File

@ -264,6 +264,7 @@ class SupportMatrixDirective(rst.Directive):
content = []
self._build_summary(matrix, content)
self._build_details(matrix, content)
self._build_notes(content)
return content
def _build_summary(self, matrix, content):
@ -435,6 +436,26 @@ class SupportMatrixDirective(rst.Directive):
item.append(para_divers)
details.append(item)
def _build_notes(self, content):
"""Constructs a list of notes content for the support matrix.
This is generated as a bullet list.
"""
notestitle = nodes.subtitle(text="Notes")
notes = nodes.bullet_list()
content.append(notestitle)
content.append(notes)
NOTES = [
"Virtuozzo was formely named Parallels in this document"
]
for note in NOTES:
item = nodes.list_item()
item.append(nodes.strong(text=note))
notes.append(item)
def _create_cli_paragraph(self, feature):
''' Create a paragraph which represents the CLI commands of the feature

View File

@ -78,8 +78,8 @@ driver-impl-libvirt-kvm-s390x=Libvirt KVM (s390x)
driver-impl-libvirt-qemu-x86=Libvirt QEMU (x86)
driver-impl-libvirt-lxc=Libvirt LXC
driver-impl-libvirt-xen=Libvirt Xen
driver-impl-libvirt-parallels-vm=Libvirt Parallels VM
driver-impl-libvirt-parallels-ct=Libvirt Parallels CT
driver-impl-libvirt-vz-vm=Libvirt Virtuozzo VM
driver-impl-libvirt-vz-ct=Libvirt Virtuozzo CT
driver-impl-vmware=VMware vCenter
driver-impl-hyperv=Hyper-V
driver-impl-ironic=Ironic
@ -106,8 +106,8 @@ driver-impl-libvirt-xen=complete
driver-impl-vmware=complete
driver-impl-hyperv=complete
driver-impl-ironic=missing
driver-impl-libvirt-parallels-vm=complete
driver-impl-libvirt-parallels-ct=missing
driver-impl-libvirt-vz-vm=complete
driver-impl-libvirt-vz-ct=missing
[operation.detach-volume]
title=Detach block volume from instance
@ -124,8 +124,8 @@ driver-impl-libvirt-xen=complete
driver-impl-vmware=complete
driver-impl-hyperv=complete
driver-impl-ironic=missing
driver-impl-libvirt-parallels-vm=complete
driver-impl-libvirt-parallels-ct=missing
driver-impl-libvirt-vz-vm=complete
driver-impl-libvirt-vz-ct=missing
[operation.maintenance-mode]
title=Set the host in a maintenance mode
@ -149,8 +149,8 @@ driver-impl-libvirt-xen=missing
driver-impl-vmware=missing
driver-impl-hyperv=missing
driver-impl-ironic=missing
driver-impl-libvirt-parallels-vm=missing
driver-impl-libvirt-parallels-ct=missing
driver-impl-libvirt-vz-vm=missing
driver-impl-libvirt-vz-ct=missing
[operation.evacuate]
title=Evacuate instances from a host
@ -174,8 +174,8 @@ driver-impl-libvirt-xen=unknown
driver-impl-vmware=unknown
driver-impl-hyperv=unknown
driver-impl-ironic=unknown
driver-impl-libvirt-parallels-vm=unknown
driver-impl-libvirt-parallels-ct=unknown
driver-impl-libvirt-vz-vm=missing
driver-impl-libvirt-vz-ct=missing
[operation.get-guest-info]
title=Guest instance status
@ -197,8 +197,8 @@ driver-impl-libvirt-xen=complete
driver-impl-vmware=complete
driver-impl-hyperv=complete
driver-impl-ironic=complete
driver-impl-libvirt-parallels-vm=complete
driver-impl-libvirt-parallels-ct=complete
driver-impl-libvirt-vz-vm=complete
driver-impl-libvirt-vz-ct=complete
[operation.get-host-info]
title=Guest host status
@ -215,8 +215,8 @@ driver-impl-libvirt-xen=complete
driver-impl-vmware=complete
driver-impl-hyperv=complete
driver-impl-ironic=missing
driver-impl-libvirt-parallels-vm=complete
driver-impl-libvirt-parallels-ct=complete
driver-impl-libvirt-vz-vm=complete
driver-impl-libvirt-vz-ct=complete
[operation.live-migrate]
title=Live migrate instance across hosts
@ -244,8 +244,8 @@ driver-impl-vmware=missing
driver-notes-vmware=https://bugs.launchpad.net/nova/+bug/1192192
driver-impl-hyperv=complete
driver-impl-ironic=missing
driver-impl-libvirt-parallels-vm=missing
driver-impl-libvirt-parallels-ct=missing
driver-impl-libvirt-vz-vm=missing
driver-impl-libvirt-vz-ct=missing
[operation.launch]
title=Launch instance
@ -264,8 +264,8 @@ driver-impl-libvirt-xen=complete
driver-impl-vmware=complete
driver-impl-hyperv=complete
driver-impl-ironic=complete
driver-impl-libvirt-parallels-vm=complete
driver-impl-libvirt-parallels-ct=complete
driver-impl-libvirt-vz-vm=complete
driver-impl-libvirt-vz-ct=complete
[operation.pause]
title=Stop instance CPUs
@ -290,8 +290,8 @@ driver-impl-libvirt-xen=complete
driver-impl-vmware=missing
driver-impl-hyperv=complete
driver-impl-ironic=missing
driver-impl-libvirt-parallels-vm=complete
driver-impl-libvirt-parallels-ct=missing
driver-impl-libvirt-vz-vm=complete
driver-impl-libvirt-vz-ct=missing
[operation.reboot]
title=Reboot instance
@ -312,8 +312,8 @@ driver-impl-libvirt-xen=complete
driver-impl-vmware=complete
driver-impl-hyperv=complete
driver-impl-ironic=complete
driver-impl-libvirt-parallels-vm=complete
driver-impl-libvirt-parallels-ct=complete
driver-impl-libvirt-vz-vm=complete
driver-impl-libvirt-vz-ct=complete
[operation.rescue]
title=Rescue instance
@ -337,8 +337,8 @@ driver-impl-libvirt-xen=complete
driver-impl-vmware=complete
driver-impl-hyperv=missing
driver-impl-ironic=missing
driver-impl-libvirt-parallels-vm=missing
driver-impl-libvirt-parallels-ct=missing
driver-impl-libvirt-vz-vm=missing
driver-impl-libvirt-vz-ct=missing
[operation.resize]
title=Resize instance
@ -363,8 +363,8 @@ driver-impl-vmware=complete
driver-impl-hyperv=complete
driver-impl-ironic=partial
driver-notes-ironic=Only certain ironic drivers support this
driver-impl-libvirt-parallels-vm=missing
driver-impl-libvirt-parallels-ct=missing
driver-impl-libvirt-vz-vm=missing
driver-impl-libvirt-vz-ct=missing
[operation.resume]
title=Restore instance
@ -381,8 +381,8 @@ driver-impl-libvirt-xen=complete
driver-impl-vmware=complete
driver-impl-hyperv=complete
driver-impl-ironic=missing
driver-impl-libvirt-parallels-vm=complete
driver-impl-libvirt-parallels-ct=complete
driver-impl-libvirt-vz-vm=complete
driver-impl-libvirt-vz-ct=complete
[operation.service-control.wtf.com]
title=Service control
@ -402,8 +402,8 @@ driver-impl-libvirt-xen=missing
driver-impl-vmware=complete
driver-impl-hyperv=missing
driver-impl-ironic=missing
driver-impl-libvirt-parallels-vm=missing
driver-impl-libvirt-parallels-ct=missing
driver-impl-libvirt-vz-vm=missing
driver-impl-libvirt-vz-ct=missing
[operation.set-admin-password]
title=Set instance admin password
@ -430,8 +430,8 @@ driver-impl-libvirt-xen=missing
driver-impl-vmware=missing
driver-impl-hyperv=missing
driver-impl-ironic=missing
driver-impl-libvirt-parallels-vm=missing
driver-impl-libvirt-parallels-ct=missing
driver-impl-libvirt-vz-vm=missing
driver-impl-libvirt-vz-ct=missing
[operation.snapshot]
title=Save snapshot of instance disk
@ -457,8 +457,8 @@ driver-impl-libvirt-xen=missing
driver-impl-vmware=complete
driver-impl-hyperv=complete
driver-impl-ironic=missing
driver-impl-libvirt-parallels-vm=missing
driver-impl-libvirt-parallels-ct=missing
driver-impl-libvirt-vz-vm=missing
driver-impl-libvirt-vz-ct=missing
[operation.suspend]
title=Suspend instance
@ -489,8 +489,8 @@ driver-impl-libvirt-xen=complete
driver-impl-vmware=complete
driver-impl-hyperv=complete
driver-impl-ironic=missing
driver-impl-libvirt-parallels-vm=complete
driver-impl-libvirt-parallels-ct=complete
driver-impl-libvirt-vz-vm=complete
driver-impl-libvirt-vz-ct=complete
[operation.swap-volume]
title=Swap block volumes
@ -513,8 +513,8 @@ driver-impl-libvirt-xen=complete
driver-impl-vmware=missing
driver-impl-hyperv=missing
driver-impl-ironic=missing
driver-impl-libvirt-parallels-vm=complete
driver-impl-libvirt-parallels-ct=missing
driver-impl-libvirt-vz-vm=complete
driver-impl-libvirt-vz-ct=missing
[operation.terminate]
title=Shutdown instance
@ -534,8 +534,8 @@ driver-impl-libvirt-xen=complete
driver-impl-vmware=complete
driver-impl-hyperv=complete
driver-impl-ironic=complete
driver-impl-libvirt-parallels-vm=complete
driver-impl-libvirt-parallels-ct=complete
driver-impl-libvirt-vz-vm=complete
driver-impl-libvirt-vz-ct=complete
[operation.unpause]
title=Resume instance CPUs
@ -552,8 +552,8 @@ driver-impl-libvirt-xen=complete
driver-impl-vmware=missing
driver-impl-hyperv=complete
driver-impl-ironic=missing
driver-impl-libvirt-parallels-vm=complete
driver-impl-libvirt-parallels-ct=complete
driver-impl-libvirt-vz-vm=complete
driver-impl-libvirt-vz-ct=complete
[guest.disk.autoconfigure.wtf.com]
title=Auto configure disk
@ -571,8 +571,8 @@ driver-impl-libvirt-xen=missing
driver-impl-vmware=missing
driver-impl-hyperv=complete
driver-impl-ironic=missing
driver-impl-libvirt-parallels-vm=missing
driver-impl-libvirt-parallels-ct=missing
driver-impl-libvirt-vz-vm=missing
driver-impl-libvirt-vz-ct=missing
[guest.disk.rate-limit]
title=Instance disk I/O limits
@ -594,8 +594,8 @@ driver-impl-libvirt-xen=missing
driver-impl-vmware=missing
driver-impl-hyperv=missing
driver-impl-ironic=missing
driver-impl-libvirt-parallels-vm=missing
driver-impl-libvirt-parallels-ct=missing
driver-impl-libvirt-vz-vm=missing
driver-impl-libvirt-vz-ct=missing
[guest.setup.configdrive]
title=Config drive support
@ -620,8 +620,8 @@ driver-impl-libvirt-xen=complete
driver-impl-vmware=complete
driver-impl-hyperv=complete
driver-impl-ironic=missing
driver-impl-libvirt-parallels-vm=complete
driver-impl-libvirt-parallels-ct=missing
driver-impl-libvirt-vz-vm=complete
driver-impl-libvirt-vz-ct=missing
[guest.setup.inject.file]
title=Inject files into disk image
@ -646,8 +646,8 @@ driver-impl-libvirt-xen=missing
driver-impl-vmware=missing
driver-impl-hyperv=missing
driver-impl-ironic=missing
driver-impl-libvirt-parallels-vm=missing
driver-impl-libvirt-parallels-ct=missing
driver-impl-libvirt-vz-vm=missing
driver-impl-libvirt-vz-ct=missing
[guest.setup.inject.networking]
title=Inject guest networking config
@ -677,8 +677,8 @@ driver-impl-vmware=partial
driver-notes-vmware=requires vmware tools installed
driver-impl-hyperv=missing
driver-impl-ironic=missing
driver-impl-libvirt-parallels-vm=missing
driver-impl-libvirt-parallels-ct=missing
driver-impl-libvirt-vz-vm=missing
driver-impl-libvirt-vz-ct=missing
[console.rdp]
title=Remote desktop over RDP
@ -702,8 +702,8 @@ driver-impl-libvirt-xen=missing
driver-impl-vmware=missing
driver-impl-hyperv=complete
driver-impl-ironic=missing
driver-impl-libvirt-parallels-vm=missing
driver-impl-libvirt-parallels-ct=missing
driver-impl-libvirt-vz-vm=missing
driver-impl-libvirt-vz-ct=missing
[console.serial.log]
title=View serial console logs
@ -728,8 +728,8 @@ driver-impl-libvirt-xen=complete
driver-impl-vmware=complete
driver-impl-hyperv=complete
driver-impl-ironic=missing
driver-impl-libvirt-parallels-vm=missing
driver-impl-libvirt-parallels-ct=missing
driver-impl-libvirt-vz-vm=missing
driver-impl-libvirt-vz-ct=missing
[console.serial.interactive]
title=Remote interactive serial console
@ -757,8 +757,8 @@ driver-impl-hyperv=missing
driver-notes-hyperv=Will be complete when this review is merged:
https://review.openstack.org/#/c/145004/
driver-impl-ironic=unknown
driver-impl-libvirt-parallels-vm=unknown
driver-impl-libvirt-parallels-ct=unknown
driver-impl-libvirt-vz-vm=missing
driver-impl-libvirt-vz-ct=missing
[console.spice]
title=Remote desktop over SPICE
@ -782,8 +782,8 @@ driver-impl-libvirt-xen=missing
driver-impl-vmware=missing
driver-impl-hyperv=missing
driver-impl-ironic=missing
driver-impl-libvirt-parallels-vm=missing
driver-impl-libvirt-parallels-ct=missing
driver-impl-libvirt-vz-vm=missing
driver-impl-libvirt-vz-ct=missing
[console.vnc]
title=Remote desktop over VNC
@ -807,8 +807,8 @@ driver-impl-libvirt-xen=complete
driver-impl-vmware=complete
driver-impl-hyperv=missing
driver-impl-ironic=missing
driver-impl-libvirt-parallels-vm=complete
driver-impl-libvirt-parallels-ct=complete
driver-impl-libvirt-vz-vm=complete
driver-impl-libvirt-vz-ct=complete
[storage.block]
title=Block storage support
@ -834,8 +834,8 @@ driver-impl-libvirt-xen=complete
driver-impl-vmware=complete
driver-impl-hyperv=complete
driver-impl-ironic=missing
driver-impl-libvirt-parallels-vm=partial
driver-impl-libvirt-parallels-ct=missing
driver-impl-libvirt-vz-vm=partial
driver-impl-libvirt-vz-ct=missing
[storage.block.backend.fibrechannel]
title=Block storage over fibre channel
@ -855,8 +855,8 @@ driver-impl-libvirt-xen=complete
driver-impl-vmware=missing
driver-impl-hyperv=missing
driver-impl-ironic=missing
driver-impl-libvirt-parallels-vm=complete
driver-impl-libvirt-parallels-ct=missing
driver-impl-libvirt-vz-vm=complete
driver-impl-libvirt-vz-ct=missing
[storage.block.backend.iscsi]
title=Block storage over iSCSI
@ -879,8 +879,8 @@ driver-impl-libvirt-xen=complete
driver-impl-vmware=complete
driver-impl-hyperv=complete
driver-impl-ironic=missing
driver-impl-libvirt-parallels-vm=complete
driver-impl-libvirt-parallels-ct=missing
driver-impl-libvirt-vz-vm=complete
driver-impl-libvirt-vz-ct=missing
[storage.block.backend.iscsi.auth.chap]
title=CHAP authentication for iSCSI
@ -900,8 +900,8 @@ driver-impl-libvirt-xen=complete
driver-impl-vmware=complete
driver-impl-hyperv=complete
driver-impl-ironic=missing
driver-impl-libvirt-parallels-vm=complete
driver-impl-libvirt-parallels-ct=missing
driver-impl-libvirt-vz-vm=complete
driver-impl-libvirt-vz-ct=missing
[storage.image]
title=Image storage support
@ -923,8 +923,8 @@ driver-impl-libvirt-xen=complete
driver-impl-vmware=complete
driver-impl-hyperv=complete
driver-impl-ironic=complete
driver-impl-libvirt-parallels-vm=complete
driver-impl-libvirt-parallels-ct=complete
driver-impl-libvirt-vz-vm=complete
driver-impl-libvirt-vz-ct=complete
[networking.firewallrules]
title=Network firewall rules
@ -941,8 +941,8 @@ driver-impl-libvirt-xen=complete
driver-impl-vmware=missing
driver-impl-hyperv=missing
driver-impl-ironic=missing
driver-impl-libvirt-parallels-vm=complete
driver-impl-libvirt-parallels-ct=complete
driver-impl-libvirt-vz-vm=complete
driver-impl-libvirt-vz-ct=complete
[networking.routing]
title=Network routing
@ -959,8 +959,8 @@ driver-impl-libvirt-xen=complete
driver-impl-vmware=complete
driver-impl-hyperv=missing
driver-impl-ironic=complete
driver-impl-libvirt-parallels-vm=complete
driver-impl-libvirt-parallels-ct=complete
driver-impl-libvirt-vz-vm=complete
driver-impl-libvirt-vz-ct=complete
[networking.securitygroups]
title=Network security groups
@ -984,8 +984,8 @@ driver-impl-vmware=partial
driver-notes-vmware=This is supported by the Neutron NSX plugins
driver-impl-hyperv=missing
driver-impl-ironic=missing
driver-impl-libvirt-parallels-vm=complete
driver-impl-libvirt-parallels-ct=complete
driver-impl-libvirt-vz-vm=complete
driver-impl-libvirt-vz-ct=complete
[networking.topology.flat]
title=Flat networking
@ -1005,8 +1005,8 @@ driver-impl-libvirt-xen=complete
driver-impl-vmware=complete
driver-impl-hyperv=complete
driver-impl-ironic=complete
driver-impl-libvirt-parallels-vm=complete
driver-impl-libvirt-parallels-ct=complete
driver-impl-libvirt-vz-vm=complete
driver-impl-libvirt-vz-ct=complete
[networking.topology.vlan]
title=VLAN networking
@ -1025,5 +1025,5 @@ driver-impl-libvirt-xen=complete
driver-impl-vmware=complete
driver-impl-hyperv=missing
driver-impl-ironic=missing
driver-impl-libvirt-parallels-vm=complete
driver-impl-libvirt-parallels-ct=complete
driver-impl-libvirt-vz-vm=complete
driver-impl-libvirt-vz-ct=complete

View File

@ -38,6 +38,7 @@ KVM = "kvm"
LXC = "lxc"
OPENVZ = "openvz"
PARALLELS = "parallels"
VIRTUOZZO = "vz"
PHYP = "phyp"
QEMU = "qemu"
TEST = "test"
@ -64,6 +65,7 @@ ALL = (
TEST,
UML,
VBOX,
VIRTUOZZO,
VMWARE,
XEN,
ZVM,

View File

@ -40,7 +40,8 @@ class ComputeNode(base.NovaPersistentObject, base.NovaObject,
# Version 1.9: Added pci_device_pools
# Version 1.10: Added get_first_node_by_host_for_old_compat()
# Version 1.11: PciDevicePoolList version 1.1
VERSION = '1.11'
# Version 1.12: HVSpec version 1.1
VERSION = '1.12'
fields = {
'id': fields.IntegerField(read_only=True),
@ -76,7 +77,7 @@ class ComputeNode(base.NovaPersistentObject, base.NovaObject,
obj_relationships = {
'pci_device_pools': [('1.9', '1.0'), ('1.11', '1.1')],
'supported_hv_specs': [('1.6', '1.0')],
'supported_hv_specs': [('1.6', '1.0'), ('1.12', '1.1')],
}
def obj_make_compatible(self, primitive, target_version):
@ -311,7 +312,8 @@ class ComputeNodeList(base.ObjectListBase, base.NovaObject):
# Version 1.9 ComputeNode version 1.9
# Version 1.10 ComputeNode version 1.10
# Version 1.11 ComputeNode version 1.11
VERSION = '1.11'
# Version 1.12 ComputeNode version 1.12
VERSION = '1.12'
fields = {
'objects': fields.ListOfObjectsField('ComputeNode'),
}
@ -329,6 +331,7 @@ class ComputeNodeList(base.ObjectListBase, base.NovaObject):
'1.9': '1.9',
'1.10': '1.10',
'1.11': '1.11',
'1.12': '1.12',
}
@base.remotable_classmethod

View File

@ -13,8 +13,10 @@
# License for the specific language governing permissions and limitations
# under the License.
from nova.compute import hv_type
from nova.objects import base
from nova.objects import fields
from nova import utils
# TODO(berrange): Remove NovaObjectDictCompat
@ -22,7 +24,8 @@ from nova.objects import fields
class HVSpec(base.NovaObject,
base.NovaObjectDictCompat):
# Version 1.0: Initial version
VERSION = '1.0'
# Version 1.1: Added 'vz' hypervisor
VERSION = '1.1'
fields = {
'arch': fields.ArchitectureField(),
@ -40,3 +43,10 @@ class HVSpec(base.NovaObject,
def to_list(self):
return [self.arch, self.hv_type, self.vm_mode]
def obj_make_compatible(self, primitive, target_version):
super(HVSpec, self).obj_make_compatible(primitive, target_version)
target_version = utils.convert_version_to_tuple(target_version)
if (target_version < (1, 1) and 'hv_type' in primitive and
hv_type.VIRTUOZZO == primitive['hv_type']):
primitive['hv_type'] = hv_type.PARALLELS

View File

@ -26,7 +26,8 @@ class ImageMeta(base.NovaObject):
# Version 1.0: Initial version
# Version 1.1: updated ImageMetaProps
# Version 1.2: ImageMetaProps version 1.2
VERSION = '1.2'
# Version 1.3: ImageMetaProps version 1.3
VERSION = '1.3'
# These are driven by what the image client API returns
# to Nova from Glance. This is defined in the glance
@ -62,6 +63,7 @@ class ImageMeta(base.NovaObject):
'properties': [('1.0', '1.0'),
('1.1', '1.1'),
('1.2', '1.2'),
('1.3', '1.3'),
],
}
@ -110,6 +112,7 @@ class ImageMetaProps(base.NovaObject):
# Version 1.0: Initial version
# Version 1.1: added os_require_quiesce field
# Version 1.2: added img_hv_type and img_hv_requested_version fields
# Version 1.3: HVSpec version 1.1
VERSION = ImageMeta.VERSION
# Maximum number of NUMA nodes permitted for the guest topology

View File

@ -45,7 +45,8 @@ class Service(base.NovaPersistentObject, base.NovaObject,
# Version 1.12: ComputeNode version 1.11
# Version 1.13: Added last_seen_up
# Version 1.14: Added forced_down
VERSION = '1.14'
# Version 1.15: ComputeNode version 1.12
VERSION = '1.15'
fields = {
'id': fields.IntegerField(read_only=True),
@ -64,7 +65,7 @@ class Service(base.NovaPersistentObject, base.NovaObject,
obj_relationships = {
'compute_node': [('1.1', '1.4'), ('1.3', '1.5'), ('1.5', '1.6'),
('1.7', '1.8'), ('1.8', '1.9'), ('1.9', '1.10'),
('1.12', '1.11')],
('1.12', '1.11'), ('1.15', '1.12')],
}
def obj_make_compatible(self, primitive, target_version):
@ -204,7 +205,8 @@ class ServiceList(base.ObjectListBase, base.NovaObject):
# Version 1.10: Service version 1.12
# Version 1.11: Service version 1.13
# Version 1.12: Service version 1.14
VERSION = '1.12'
# Version 1.13: Service version 1.15
VERSION = '1.13'
fields = {
'objects': fields.ListOfObjectsField('Service'),
@ -224,6 +226,7 @@ class ServiceList(base.ObjectListBase, base.NovaObject):
'1.10': '1.12',
'1.11': '1.13',
'1.12': '1.14',
'1.13': '1.15',
}
@base.remotable_classmethod

View File

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

View File

@ -32,6 +32,18 @@ spec_list = [
vm_mode.HVM
]
spec_dict_vz = {
'arch': arch.I686,
'hv_type': hv_type.VIRTUOZZO,
'vm_mode': vm_mode.HVM
}
spec_dict_parallels = {
'arch': arch.I686,
'hv_type': hv_type.PARALLELS,
'vm_mode': vm_mode.HVM
}
class _TestHVSpecObject(object):
@ -47,6 +59,17 @@ class _TestHVSpecObject(object):
spec = spec_obj.to_list()
self.assertEqual(spec_list, spec)
def test_hv_spec_obj_make_compatible(self):
spec_dict_vz_copy = spec_dict_vz.copy()
# check 1.1->1.0 compatibility
objects.HVSpec().obj_make_compatible(spec_dict_vz_copy, '1.0')
self.assertEqual(spec_dict_parallels, spec_dict_vz_copy)
# check that nothing changed
objects.HVSpec().obj_make_compatible(spec_dict_vz_copy, '1.1')
self.assertEqual(spec_dict_parallels, spec_dict_vz_copy)
class TestHVSpecObject(test_objects._LocalTest,
_TestHVSpecObject):

View File

@ -1092,8 +1092,8 @@ object_data = {
'BlockDeviceMapping': '1.13-d44d8d694619e79c172a99b3c1d6261d',
'BlockDeviceMappingList': '1.14-ff39c726181b66dfdf54d7c73abf5ffb',
'CellMapping': '1.0-7f1a7e85a22bbb7559fc730ab658b9bd',
'ComputeNode': '1.11-71784d2e6f2814ab467d4e0f69286843',
'ComputeNodeList': '1.11-8d269636229e8a39fef1c3514f77d0c0',
'ComputeNode': '1.12-71784d2e6f2814ab467d4e0f69286843',
'ComputeNodeList': '1.12-e903b1f471dc161292df49150c6e5c57',
'DNSDomain': '1.0-7b0b2dab778454b6a7b6c66afe163a1a',
'DNSDomainList': '1.0-f876961b1a6afe400b49cf940671db86',
'EC2Ids': '1.0-474ee1094c7ec16f8ce657595d8c49d9',
@ -1107,9 +1107,9 @@ object_data = {
'FloatingIP': '1.7-52a67d52d85eb8b3f324a5b7935a335b',
'FloatingIPList': '1.8-9a9fe191dc694ea4ff08946be9460718',
'HostMapping': '1.0-1a3390a696792a552ab7bd31a77ba9ac',
'HVSpec': '1.0-3999ff70698fc472c2d4d60359949f6b',
'ImageMeta': '1.2-642d1b2eb3e880a367f37d72dd76162d',
'ImageMetaProps': '1.2-204fe877eecc83ffc68feeea7d1ea481',
'HVSpec': '1.1-6b4f7c0f688cbd03e24142a44eb9010d',
'ImageMeta': '1.3-642d1b2eb3e880a367f37d72dd76162d',
'ImageMetaProps': '1.3-bcd6a0c4324319982eac3147e10bcf6f',
'Instance': '1.21-260d385315d4868b6397c61a13109841',
'InstanceAction': '1.1-f9f293e526b66fca0d05c3b3a2d13914',
'InstanceActionEvent': '1.1-e56a64fa4710e43ef7af2ad9d6028b33',
@ -1153,8 +1153,8 @@ object_data = {
'SecurityGroupList': '1.0-a3bb51998e7d2a95b3e613111e853817',
'SecurityGroupRule': '1.1-ae1da17b79970012e8536f88cb3c6b29',
'SecurityGroupRuleList': '1.1-521f1aeb7b0cc00d026175509289d020',
'Service': '1.14-1d5c9a16f47da93e82082c4fce31588a',
'ServiceList': '1.12-02c9aec8f075cfa8d6cb4da0507a60e7',
'Service': '1.15-1d5c9a16f47da93e82082c4fce31588a',
'ServiceList': '1.13-4ed12034c1bf47b3ea02155b4e601f99',
'TaskLog': '1.0-78b0534366f29aa3eebb01860fbe18fe',
'TaskLogList': '1.0-2378c0e2afdbbfaf392f31c1dffa4d25',
'Tag': '1.1-8b8d7d5b48887651a0e01241672e2963',
@ -1173,8 +1173,8 @@ object_relationships = {
'BandwidthUsageList': {'BandwidthUsage': '1.2'},
'BlockDeviceMapping': {'Instance': '1.21'},
'BlockDeviceMappingList': {'BlockDeviceMapping': '1.13'},
'ComputeNode': {'HVSpec': '1.0', 'PciDevicePoolList': '1.1'},
'ComputeNodeList': {'ComputeNode': '1.11'},
'ComputeNode': {'HVSpec': '1.1', 'PciDevicePoolList': '1.1'},
'ComputeNodeList': {'ComputeNode': '1.12'},
'DNSDomainList': {'DNSDomain': '1.0'},
'FixedIP': {'Instance': '1.21', 'Network': '1.2',
'VirtualInterface': '1.0',
@ -1184,7 +1184,7 @@ object_relationships = {
'FloatingIP': {'FixedIP': '1.11'},
'FloatingIPList': {'FloatingIP': '1.7'},
'HostMapping': {'CellMapping': '1.0'},
'ImageMeta': {'ImageMetaProps': '1.2'},
'ImageMeta': {'ImageMetaProps': '1.3'},
'Instance': {'InstanceFault': '1.2',
'InstanceInfoCache': '1.5',
'InstanceNUMATopology': '1.1',
@ -1217,8 +1217,8 @@ object_relationships = {
'SecurityGroupList': {'SecurityGroup': '1.1'},
'SecurityGroupRule': {'SecurityGroup': '1.1'},
'SecurityGroupRuleList': {'SecurityGroupRule': '1.1'},
'Service': {'ComputeNode': '1.11'},
'ServiceList': {'Service': '1.14'},
'Service': {'ComputeNode': '1.12'},
'ServiceList': {'Service': '1.15'},
'TagList': {'Tag': '1.1'},
'TaskLogList': {'TaskLog': '1.0'},
'VirtCPUModel': {'VirtCPUFeature': '1.0', 'VirtCPUTopology': '1.0'},