diff options
author | Lee Yarwood <lyarwood@redhat.com> | 2020-11-13 19:26:32 +0000 |
---|---|---|
committer | melanie witt <melwittt@gmail.com> | 2022-08-02 21:25:47 +0000 |
commit | 2f97ca2cdc6e804ac848ce152d36978c0e296394 (patch) | |
tree | 68fa38e6ad8d177a7d5472a7ba847e43ac23c39d /nova/api | |
parent | bf701eb4a0e84e86803e5423ee80531d6cbd8bef (diff) | |
download | nova-2f97ca2cdc6e804ac848ce152d36978c0e296394.tar.gz |
compute: Update bdms with ephemeral encryption details when requested
This change starts the process of wiring up the new ephemeral encryption
control mechanisims in the compute layer. This initial step being to
ensure the BlockDeviceMapping objects are correctly updated with the
required ephemeral encryption details when requested through the
instance flavor extra specs or image metadata properties.
Change-Id: Id49cb238f7bbf2b97f018ddbe090ebdc08d762dc
Diffstat (limited to 'nova/api')
-rw-r--r-- | nova/api/validation/extra_specs/hw.py | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/nova/api/validation/extra_specs/hw.py b/nova/api/validation/extra_specs/hw.py index 4aaccf639a..bb23e7ce8e 100644 --- a/nova/api/validation/extra_specs/hw.py +++ b/nova/api/validation/extra_specs/hw.py @@ -15,6 +15,7 @@ """Validators for ``hw`` namespaced extra specs.""" from nova.api.validation.extra_specs import base +from nova.objects import fields realtime_validators = [ @@ -500,6 +501,31 @@ feature_flag_validators = [ ), ] +ephemeral_encryption_validators = [ + base.ExtraSpecValidator( + name='hw:ephemeral_encryption', + description=( + 'Whether to enable ephemeral storage encryption.' + ), + value={ + 'type': bool, + 'description': 'Whether to enable ephemeral storage encryption.', + }, + ), + base.ExtraSpecValidator( + name='hw:ephemeral_encryption_format', + description=( + 'The encryption format to be used if ephemeral storage ' + 'encryption is enabled via hw:ephemeral_encryption.' + ), + value={ + 'type': str, + 'description': 'The encryption format to be used if enabled.', + 'enum': fields.BlockDeviceEncryptionFormatType.ALL, + }, + ), +] + def register(): return ( @@ -509,5 +535,6 @@ def register(): hugepage_validators + numa_validators + cpu_topology_validators + - feature_flag_validators + feature_flag_validators + + ephemeral_encryption_validators ) |