Delete all NS-Groups when call unstack.sh
Besides typical NSGroups which backes Neutron security-group, the plugin also creates nested NSGroups, these should be deleted as well when calling unstack.sh. Change-Id: Id2e803dd29f1cd019eeaf0df7ca6309054fda600
This commit is contained in:
parent
b973e406f9
commit
a46f433429
@ -285,18 +285,11 @@ class NSXClient(object):
|
||||
response = self.get(endpoint="/ns-groups")
|
||||
return response.json()['results']
|
||||
|
||||
def get_os_ns_groups(self):
|
||||
"""
|
||||
Retrieve all NSGroups created from OpenStack
|
||||
"""
|
||||
ns_groups = self.get_ns_groups()
|
||||
return self.get_os_resources(ns_groups)
|
||||
|
||||
def cleanup_os_ns_groups(self):
|
||||
"""
|
||||
Cleanup all NSGroups created from OpenStack plugin
|
||||
"""
|
||||
ns_groups = self.get_os_ns_groups()
|
||||
ns_groups = self.get_ns_groups()
|
||||
print("Number of OS NSGroups to be deleted: %s" % len(ns_groups))
|
||||
for nsg in ns_groups:
|
||||
endpoint = "/ns-groups/%s" % nsg['id']
|
||||
|
Loading…
x
Reference in New Issue
Block a user