cleanup NovaObjectDictCompat from virt_cpu_topology
cleanup subclassing on NovaObjectDictCompat and fix subsequent tests and code associated with nova/objects/virt_cpu_topology.py Due to the exhaustive nature of changes, the cleanup is done one object at a time. This is the fourth patch of the series. There shall be more patches to follow for other objects. Related to blueprint liberty-objects Change-Id: I6c4ed28faf0bccf169faec295b410e764f70db5c
This commit is contained in:
parent
1d32e8d45d
commit
b54e20d473
|
@ -14,10 +14,8 @@ from nova.objects import base
|
|||
from nova.objects import fields
|
||||
|
||||
|
||||
# TODO(berrange): Remove NovaObjectDictCompat
|
||||
@base.NovaObjectRegistry.register
|
||||
class VirtCPUTopology(base.NovaObject,
|
||||
base.NovaObjectDictCompat):
|
||||
class VirtCPUTopology(base.NovaObject):
|
||||
# Version 1.0: Initial version
|
||||
VERSION = '1.0'
|
||||
|
||||
|
|
|
@ -55,7 +55,7 @@ class _TestVirtCPUModel(object):
|
|||
def test_create(self):
|
||||
model = objects.VirtCPUModel(**fake_vcpumodel_dict)
|
||||
self.assertEqual(fake_vcpumodel_dict['model'], model.model)
|
||||
self.assertEqual(fake_vcpumodel_dict['topology']['sockets'],
|
||||
self.assertEqual(fake_vcpumodel_dict['topology'].sockets,
|
||||
model.topology.sockets)
|
||||
feature = model.features[0]
|
||||
self.assertEqual(fake_cpu_model_feature['policy'],
|
||||
|
|
Loading…
Reference in New Issue