summaryrefslogtreecommitdiff
path: root/nova/api
diff options
context:
space:
mode:
authorZuul <zuul@review.opendev.org>2022-08-18 12:31:45 +0000
committerGerrit Code Review <review@openstack.org>2022-08-18 12:31:45 +0000
commit3af84811c8b181a49195f640c9c971d16d6d3477 (patch)
tree8acdf009f71e6d7b74f71b1f77337e2bbbedcb8a /nova/api
parent625d62acd4a2d5f057ca86ea7b9e9a0da09b1187 (diff)
parent2f97ca2cdc6e804ac848ce152d36978c0e296394 (diff)
downloadnova-3af84811c8b181a49195f640c9c971d16d6d3477.tar.gz
Merge "compute: Update bdms with ephemeral encryption details when requested"
Diffstat (limited to 'nova/api')
-rw-r--r--nova/api/validation/extra_specs/hw.py29
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
)