add checking for new image metadata property 'hw_cpu_realtime_mask'
This patch adds 'target_version' checking for image metadata property 'hw_cpu_realtime_mask' and completes test_obj_make_compatible for this. Change-Id: Ifbbe7797035eacbabb67384e165843a191a483cc Closes-Bug: #1533071
This commit is contained in:
@@ -169,6 +169,8 @@ class ImageMetaProps(base.NovaObject):
|
||||
target_version = versionutils.convert_version_to_tuple(target_version)
|
||||
if target_version < (1, 11):
|
||||
primitive.pop('hw_firmware_type', None)
|
||||
if target_version < (1, 10):
|
||||
primitive.pop('hw_cpu_realtime_mask', None)
|
||||
if target_version < (1, 9):
|
||||
primitive.pop('hw_cpu_thread_policy', None)
|
||||
if target_version < (1, 7):
|
||||
|
||||
@@ -282,6 +282,9 @@ class TestImageMetaProps(test.NoDBTestCase):
|
||||
|
||||
def test_obj_make_compatible(self):
|
||||
props = {
|
||||
'hw_firmware_type': 'uefi',
|
||||
'hw_cpu_realtime_mask': '^0-1',
|
||||
'hw_cpu_thread_policy': 'prefer',
|
||||
'img_config_drive': 'mandatory',
|
||||
'os_admin_user': 'root',
|
||||
'hw_vif_multiqueue_enabled': True,
|
||||
|
||||
Reference in New Issue
Block a user