diff options
author | Rajat Dhasmana <rajatdhasmana@gmail.com> | 2019-06-24 19:36:38 +0530 |
---|---|---|
committer | Rajat Dhasmana <rajatdhasmana@gmail.com> | 2019-06-24 19:41:42 +0530 |
commit | 57301ecb744efcebb2e6b279a1bb1ac64a6e3dfb (patch) | |
tree | 3204b76398ad1cc83333cdc2183ee587f48ce384 /cinderclient/shell_utils.py | |
parent | ba85b79dd6208cbb3d1e502d3356df3dc6a9262e (diff) | |
download | python-cinderclient-57301ecb744efcebb2e6b279a1bb1ac64a6e3dfb.tar.gz |
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
Diffstat (limited to 'cinderclient/shell_utils.py')
-rw-r--r-- | cinderclient/shell_utils.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/cinderclient/shell_utils.py b/cinderclient/shell_utils.py index e05d907..411dd17 100644 --- a/cinderclient/shell_utils.py +++ b/cinderclient/shell_utils.py @@ -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): |