From 99ccf02d0b2c1c5cb28f58223637be8df5823163 Mon Sep 17 00:00:00 2001 From: Goutham Pacha Ravi Date: Tue, 25 May 2021 16:25:53 -0700 Subject: [PATCH] [TrivialFix] Follow up per-share-gigabytes quota changes - Add max-version in the version decorators for readability - Move "per-share-gigabytes" command option to be alongside valid quotas. Related-Bug: #1918961 Change-Id: I02817963b9c0c29add2db70256cdc61912d014a2 Depends-On: I9a0491a985fb6c36948e41419f94333ddf5d35a3 Signed-off-by: Goutham Pacha Ravi --- manilaclient/v2/quota_classes.py | 2 +- manilaclient/v2/quotas.py | 2 +- manilaclient/v2/shell.py | 14 +++++++------- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/manilaclient/v2/quota_classes.py b/manilaclient/v2/quota_classes.py index b7ef539eb..a3d33d1c1 100644 --- a/manilaclient/v2/quota_classes.py +++ b/manilaclient/v2/quota_classes.py @@ -96,7 +96,7 @@ class QuotaClassSetManager(base.ManagerWithFind): snapshots=snapshots, snapshot_gigabytes=snapshot_gigabytes, share_networks=share_networks, resource_path=RESOURCE_PATH) - @api_versions.wraps(REPLICA_QUOTAS_MICROVERSION) # noqa + @api_versions.wraps(REPLICA_QUOTAS_MICROVERSION, "2.61") # noqa def update(self, class_name, shares=None, gigabytes=None, # noqa snapshots=None, snapshot_gigabytes=None, share_networks=None, share_replicas=None, replica_gigabytes=None): diff --git a/manilaclient/v2/quotas.py b/manilaclient/v2/quotas.py index d04f45b3e..6a655287b 100644 --- a/manilaclient/v2/quotas.py +++ b/manilaclient/v2/quotas.py @@ -185,7 +185,7 @@ class QuotaSetManager(base.ManagerWithFind): resource_path=RESOURCE_PATH, ) - @api_versions.wraps(REPLICA_QUOTAS_MICROVERSION) # noqa + @api_versions.wraps(REPLICA_QUOTAS_MICROVERSION, "2.61") # noqa def update(self, tenant_id, user_id=None, share_type=None, # noqa shares=None, snapshots=None, gigabytes=None, snapshot_gigabytes=None, share_networks=None, diff --git a/manilaclient/v2/shell.py b/manilaclient/v2/shell.py index 0d4b20d3e..435f8c91d 100644 --- a/manilaclient/v2/shell.py +++ b/manilaclient/v2/shell.py @@ -608,13 +608,6 @@ def do_quota_defaults(cs, args): default=None, help='New value for the "replica_gigabytes" quota. Available only for ' 'microversion >= 2.53') -@cliutils.arg( - '--force', - dest='force', - action="store_true", - default=None, - help='Whether force update the quota even if the already used ' - 'and reserved exceeds the new quota.') @cliutils.arg( '--per-share-gigabytes', '--per_share_gigabytes', @@ -623,6 +616,13 @@ def do_quota_defaults(cs, args): default=None, help='New value for the "per_share_gigabytes" quota. Available only for ' 'microversion >= 2.62') +@cliutils.arg( + '--force', + dest='force', + action="store_true", + default=None, + help='Whether force update the quota even if the already used ' + 'and reserved exceeds the new quota.') @api_versions.wraps("1.0") def do_quota_update(cs, args): """Update the quotas for a project/user and/or share type (Admin only)."""