summaryrefslogtreecommitdiff
path: root/openstackclient/common
diff options
context:
space:
mode:
authorRodolfo Alonso Hernandez <ralonsoh@redhat.com>2022-02-03 15:08:35 +0000
committerRodolfo Alonso Hernandez <ralonsoh@redhat.com>2022-03-17 02:38:07 +0000
commit1c6d396ba30c1a92a417f778d7522ea43e9b2d4a (patch)
treea31895947bdcfe160b8e28b002574f5cc0518c4e /openstackclient/common
parente91e0e001c8c46f33f0a67860e78b6bc285b4ecb (diff)
downloadpython-openstackclient-1c6d396ba30c1a92a417f778d7522ea43e9b2d4a.tar.gz
Allow "--force" flag in quota network commands
This flag allows to set a new Neutron quota resource limit without checking first the current resource usage. The new limit will be set anyway. This flag was used only by the compute engine. Related-Bug: #1953170 Change-Id: I7084f8208b804236ac99e6842db7a45854ce54d7
Diffstat (limited to 'openstackclient/common')
-rw-r--r--openstackclient/common/quota.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/openstackclient/common/quota.py b/openstackclient/common/quota.py
index 677cba03..e096f186 100644
--- a/openstackclient/common/quota.py
+++ b/openstackclient/common/quota.py
@@ -533,7 +533,8 @@ class SetQuota(common.NetDetectionMixin, command.Command):
parser.add_argument(
'--force',
action='store_true',
- help=_('Force quota update (only supported by compute)')
+ help=_('Force quota update (only supported by compute and '
+ 'network)')
)
parser.add_argument(
'--check-limit',
@@ -569,6 +570,8 @@ class SetQuota(common.NetDetectionMixin, command.Command):
network_kwargs = {}
if parsed_args.check_limit:
network_kwargs['check_limit'] = True
+ if parsed_args.force:
+ network_kwargs['force'] = True
if self.app.client_manager.is_network_endpoint_enabled():
for k, v in NETWORK_QUOTAS.items():