diff options
author | Zuul <zuul@review.opendev.org> | 2022-08-26 15:22:08 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2022-08-26 15:22:08 +0000 |
commit | e4328ed7cdf0315fb42a67bbfad08979698705e8 (patch) | |
tree | af9f806e73483d9bf54ba974270c87e201a488a5 /nova/objects | |
parent | 1dd1342d8306e932925bac272d0d20f377e0cc38 (diff) | |
parent | 572c2b18e27f6fcbbd4a1f416b0ec21098b3ba74 (diff) | |
download | nova-e4328ed7cdf0315fb42a67bbfad08979698705e8.tar.gz |
Merge "Add locked_memory extra spec and image property"
Diffstat (limited to 'nova/objects')
-rw-r--r-- | nova/objects/image_meta.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/nova/objects/image_meta.py b/nova/objects/image_meta.py index f17f145daf..0ca8ed571f 100644 --- a/nova/objects/image_meta.py +++ b/nova/objects/image_meta.py @@ -190,14 +190,17 @@ class ImageMetaProps(base.NovaObject): # Version 1.31: Added 'hw_emulation_architecture' field # Version 1.32: Added 'hw_ephemeral_encryption' and # 'hw_ephemeral_encryption_format' fields + # Version 1.33: Added 'hw_locked_memory' field # NOTE(efried): When bumping this version, the version of # ImageMetaPropsPayload must also be bumped. See its docstring for details. - VERSION = '1.32' + VERSION = '1.33' def obj_make_compatible(self, primitive, target_version): super(ImageMetaProps, self).obj_make_compatible(primitive, target_version) target_version = versionutils.convert_version_to_tuple(target_version) + if target_version < (1, 33): + primitive.pop('hw_locked_memory', None) if target_version < (1, 32): primitive.pop('hw_ephemeral_encryption', None) primitive.pop('hw_ephemeral_encryption_format', None) @@ -368,6 +371,10 @@ class ImageMetaProps(base.NovaObject): # image with a network boot image 'hw_ipxe_boot': fields.FlexibleBooleanField(), + # string - make sure ``locked`` element is present in the + # ``memoryBacking``. + 'hw_locked_memory': fields.FlexibleBooleanField(), + # There are sooooooooooo many possible machine types in # QEMU - several new ones with each new release - that it # is not practical to enumerate them all. So we use a free |