From ec9c7465bc2aa3400cd52db854be26daf9ee5a76 Mon Sep 17 00:00:00 2001 From: Adit Sarfaty Date: Thu, 30 Aug 2018 09:14:12 +0300 Subject: [PATCH] NSX|V3 Validate rate-limit value in admin utilitiy Change-Id: Id516e068cec06973fe670a2956d762b26ace7e6a --- vmware_nsx/shell/admin/plugins/nsxv3/resources/http_service.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vmware_nsx/shell/admin/plugins/nsxv3/resources/http_service.py b/vmware_nsx/shell/admin/plugins/nsxv3/resources/http_service.py index 2bf6824f21..383d8acd75 100644 --- a/vmware_nsx/shell/admin/plugins/nsxv3/resources/http_service.py +++ b/vmware_nsx/shell/admin/plugins/nsxv3/resources/http_service.py @@ -55,7 +55,7 @@ def nsx_rate_limit_update(resource, event, trigger, **kwargs): if kwargs.get('property'): properties = admin_utils.parse_multi_keyval_opt(kwargs['property']) 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 " "--property value=") LOG.error("Missing parameters. Usage: %s", usage)