Add hw_firmware_stateless image property

Add the new image property to request stateless firmware. The property
will be used by the libvirt driver once the actual logic to enable
the feature is implemented.

Partially-Implements: blueprint libvirt-stateless-firmware
Change-Id: I05d4ff89d2b713b217b6c690e40fd4a16a397b63
This commit is contained in:
Takashi Kajinami
2024-08-20 09:25:58 +09:00
parent b475f0f99b
commit 5890c257be
7 changed files with 31 additions and 7 deletions

View File

@@ -385,7 +385,7 @@ notification_object_data = {
# ImageMetaProps, so when you see a fail here for that reason, you must
# *also* bump the version of ImageMetaPropsPayload. See its docstring for
# more information.
'ImageMetaPropsPayload': '1.13-682cfe847d16301734e1fba924063e6d',
'ImageMetaPropsPayload': '1.14-af9efd17cd034596be792fa25f24e83d',
'InstanceActionNotification': '1.0-a73147b93b520ff0061865849d3dfa56',
'InstanceActionPayload': '1.8-b948818df6ec562e4eb4b23e515e451b',
'InstanceActionRebuildNotification':

View File

@@ -591,3 +591,20 @@ class TestImageMetaProps(test.NoDBTestCase):
self.assertNotIn(
'hw_ephemeral_encryption_secret_uuid',
primitive['nova_object.data'])
def test_obj_make_compatible_stateless_firmware(self):
"""Check 'hw_firmware_stateless' compatibility."""
obj = objects.ImageMetaProps(
hw_firmware_stateless=True)
primitive = obj.obj_to_primitive('1.38')
self.assertIn(
'hw_firmware_stateless',
primitive['nova_object.data'])
self.assertTrue(
primitive['nova_object.data']['hw_firmware_stateless'])
primitive = obj.obj_to_primitive('1.37')
self.assertNotIn(
'hw_firmware_stateless',
primitive['nova_object.data'])

View File

@@ -1105,7 +1105,7 @@ object_data = {
'HyperVLiveMigrateData': '1.4-e265780e6acfa631476c8170e8d6fce0',
'IDEDeviceBus': '1.0-29d4c9f27ac44197f01b6ac1b7e16502',
'ImageMeta': '1.8-642d1b2eb3e880a367f37d72dd76162d',
'ImageMetaProps': '1.37-1e0d70fb51041c0446b00695c5ef0e21',
'ImageMetaProps': '1.38-1f4f4f1b60413aa543e446d716cfbc20',
'Instance': '2.8-2727dba5e4a078e6cc848c1f94f7eb24',
'InstanceAction': '1.2-9a5abc87fdd3af46f45731960651efb5',
'InstanceActionEvent': '1.4-5b1f361bd81989f8bb2c20bb7e8a4cb4',