Update encryption-type-create

Creating an encryption-type without key_size or cipher results in
a useless volume type that cannot be built, but this only becomes
evident later when the volume type is used.  The Block Storage API
is adding validation to make sure these fields are specified at the
time of encryption-type creation to avoid this situation.

The current test_volume_type_encryption_create_get_update_delete
creates a not-fully-specified volume type, which should not be
allowed, so update the test.

Change-Id: I3c8c5a5261e135bcf56cfa5624ee1a504f31bdf3
Related-bug: Bug #1926630
This commit is contained in:
Brian Rosmaita 2021-05-17 19:43:18 -04:00
parent 393e94a604
commit 41a7ae9edd
1 changed files with 2 additions and 0 deletions

View File

@ -121,6 +121,8 @@ class VolumeTypesTest(base.BaseVolumeAdminTest):
def test_volume_type_encryption_create_get_update_delete(self):
"""Test create/get/update/delete volume encryption type"""
create_kwargs = {'provider': 'LuksEncryptor',
'key_size': 256,
'cipher': 'aes-xts-plain64',
'control_location': 'front-end'}
volume_type_id = self.create_volume_type()['id']