devstack: fixed backend cleanup during unstack

unstack should only delete ns-group created by openstack

Change-Id: I0b35fb52909fa18d5f3b9d14fa5f368ef5990880
Closes-bug: #1740678
This commit is contained in:
vmware 2016-10-05 16:38:50 +05:30
parent 6d6eb4aea8
commit 701af81a92
1 changed files with 3 additions and 2 deletions

View File

@ -184,7 +184,7 @@ class NSXClient(object):
"""
os_resources = [r for r in resources if 'tags' in r
for tag in r['tags']
if 'os-project-id' in tag.values()]
if 'os-api-version' in tag.values()]
return os_resources
def get_logical_switches(self):
@ -286,7 +286,8 @@ class NSXClient(object):
Retrieve all NSGroups on NSX backend
"""
response = self.get(endpoint="/ns-groups")
return response.json()['results']
ns_groups = response.json()['results']
return self.get_os_resources(ns_groups)
def cleanup_os_ns_groups(self):
"""