NSX|V3 Validate rate-limit value in admin utilitiy
Change-Id: Id516e068cec06973fe670a2956d762b26ace7e6a
This commit is contained in:
parent
494356cb1c
commit
ec9c7465bc
@ -55,7 +55,7 @@ def nsx_rate_limit_update(resource, event, trigger, **kwargs):
|
|||||||
if kwargs.get('property'):
|
if kwargs.get('property'):
|
||||||
properties = admin_utils.parse_multi_keyval_opt(kwargs['property'])
|
properties = admin_utils.parse_multi_keyval_opt(kwargs['property'])
|
||||||
rate_limit = properties.get('value', None)
|
rate_limit = properties.get('value', None)
|
||||||
if rate_limit is None:
|
if rate_limit is None or not rate_limit.isdigit():
|
||||||
usage = ("nsxadmin -r rate-limit -o nsx-update "
|
usage = ("nsxadmin -r rate-limit -o nsx-update "
|
||||||
"--property value=<new limit>")
|
"--property value=<new limit>")
|
||||||
LOG.error("Missing parameters. Usage: %s", usage)
|
LOG.error("Missing parameters. Usage: %s", usage)
|
||||||
|
Loading…
Reference in New Issue
Block a user