Merge "Error in verification of persistent_size value type"

This commit is contained in:
Zuul
2022-02-25 15:17:43 +00:00
committed by Gerrit Code Review
3 changed files with 74 additions and 1 deletions

View File

@@ -575,7 +575,7 @@ class SubcloudsController(object):
pecan.abort(400, _("Mandatory install value software_version not present"))
if 'persistent_size' in install_values:
persistent_size = install_values.get('persistent_size')
if not str(persistent_size).isnumeric():
if not isinstance(persistent_size, int):
pecan.abort(400, _("The install value persistent_size (in MB) must be a"
" whole number greater than or equal to %s") %
consts.DEFAULT_PERSISTENT_SIZE)