[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 <gouthampravi@gmail.com>
This commit is contained in:
parent
1f31818d2f
commit
99ccf02d0b
|
@ -96,7 +96,7 @@ class QuotaClassSetManager(base.ManagerWithFind):
|
||||||
snapshots=snapshots, snapshot_gigabytes=snapshot_gigabytes,
|
snapshots=snapshots, snapshot_gigabytes=snapshot_gigabytes,
|
||||||
share_networks=share_networks, resource_path=RESOURCE_PATH)
|
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
|
def update(self, class_name, shares=None, gigabytes=None, # noqa
|
||||||
snapshots=None, snapshot_gigabytes=None, share_networks=None,
|
snapshots=None, snapshot_gigabytes=None, share_networks=None,
|
||||||
share_replicas=None, replica_gigabytes=None):
|
share_replicas=None, replica_gigabytes=None):
|
||||||
|
|
|
@ -185,7 +185,7 @@ class QuotaSetManager(base.ManagerWithFind):
|
||||||
resource_path=RESOURCE_PATH,
|
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
|
def update(self, tenant_id, user_id=None, share_type=None, # noqa
|
||||||
shares=None, snapshots=None, gigabytes=None,
|
shares=None, snapshots=None, gigabytes=None,
|
||||||
snapshot_gigabytes=None, share_networks=None,
|
snapshot_gigabytes=None, share_networks=None,
|
||||||
|
|
|
@ -608,13 +608,6 @@ def do_quota_defaults(cs, args):
|
||||||
default=None,
|
default=None,
|
||||||
help='New value for the "replica_gigabytes" quota. Available only for '
|
help='New value for the "replica_gigabytes" quota. Available only for '
|
||||||
'microversion >= 2.53')
|
'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(
|
@cliutils.arg(
|
||||||
'--per-share-gigabytes',
|
'--per-share-gigabytes',
|
||||||
'--per_share_gigabytes',
|
'--per_share_gigabytes',
|
||||||
|
@ -623,6 +616,13 @@ def do_quota_defaults(cs, args):
|
||||||
default=None,
|
default=None,
|
||||||
help='New value for the "per_share_gigabytes" quota. Available only for '
|
help='New value for the "per_share_gigabytes" quota. Available only for '
|
||||||
'microversion >= 2.62')
|
'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")
|
@api_versions.wraps("1.0")
|
||||||
def do_quota_update(cs, args):
|
def do_quota_update(cs, args):
|
||||||
"""Update the quotas for a project/user and/or share type (Admin only)."""
|
"""Update the quotas for a project/user and/or share type (Admin only)."""
|
||||||
|
|
Loading…
Reference in New Issue