Remove extra volume_type DB fetch on volume manage

Call _is_encrypted() instead of volume_types.is_encrypted()
since we already have the volume type object.

Change-Id: Id82a5bc251a8cea4febdc429329cd136c805487d
This commit is contained in:
Eric Harney 2022-03-23 11:47:13 -04:00
parent 41e315d63a
commit 74ce9c6045
1 changed files with 1 additions and 2 deletions

View File

@ -2002,8 +2002,7 @@ class API(base.Base):
raise
is_encrypted = False
if volume_type:
is_encrypted = volume_types.is_encrypted(context,
volume_type['id'])
is_encrypted = self._is_encrypted(volume_type)
if is_encrypted:
msg = _("Managing to an encrypted volume type is not supported.")
LOG.error(msg)