From 2d060793cddf42242b6dd9f4165306d7e980c052 Mon Sep 17 00:00:00 2001 From: Akash Gangil Date: Wed, 20 Apr 2016 06:54:17 -0700 Subject: [PATCH] [Admin-util][NSXv3] Fix help message for secgroups The security-groups resource for the nsxv3 plugin listed the wrong list of supported operations in the help message, which included some ops like list-mismatches etc which were not supported. This patch fixes that and only lists the ops that are implemented in the help message. $ nsxadmin -r security-groups NSX Plugin in use: nsxv3 Supported list of operations for the NSX-V3 resource ['clean', 'list', 'nsx-list', 'nsx-clean', 'neutron-list', 'neutron-clean'] Change-Id: I7a259bf770e5a21d29ce9749ae2c236a1302b177 --- vmware_nsx/shell/nsxadmin.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/vmware_nsx/shell/nsxadmin.py b/vmware_nsx/shell/nsxadmin.py index 68d311c286..d9f90b1f5d 100644 --- a/vmware_nsx/shell/nsxadmin.py +++ b/vmware_nsx/shell/nsxadmin.py @@ -76,7 +76,13 @@ class Resource(object): # Add supported NSX-V3 resources in this dictionary nsxv3_resources = { - constants.SECURITY_GROUPS: Resource(constants.SECURITY_GROUPS, ops) + constants.SECURITY_GROUPS: Resource(constants.SECURITY_GROUPS, + [Operations.CLEAN.value, + Operations.LIST.value, + Operations.NSX_LIST.value, + Operations.NSX_CLEAN.value, + Operations.NEUTRON_LIST.value, + Operations.NEUTRON_CLEAN.value]) } # Add supported NSX-V resources in this dictionary