Fix: Quota update successfully executes with no params

Since all params of quota update command are optional (except
project_id), when no quota field is supplied the command shouldn't
execute successfully.
This patch shows an error in this case.

Change-Id: I22e5ef7900631d1394e0ab5b57c4e4444f0d5a50
Closes-Bug: #1778975
This commit is contained in:
Rajat Dhasmana 2019-06-24 19:36:38 +05:30
parent ba85b79dd6
commit 57301ecb74

@ -247,6 +247,9 @@ def quota_update(manager, identifier, args):
if not skip_validation:
updates['skip_validation'] = skip_validation
quota_show(manager.update(identifier, **updates))
else:
msg = 'Must supply at least one quota field to update.'
raise exceptions.ClientException(code=1, message=msg)
def find_volume_type(cs, vtype):