summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCédric Ollivier <cedric.ollivier@orange.com>2018-09-22 16:07:47 +0200
committerCédric Ollivier <cedric.ollivier@orange.com>2018-09-22 16:59:24 +0200
commit0ce2ee2bdaf079c42db708f84e9e39d3e35fa613 (patch)
treee9b1be2736c1576d4844b68b5e76c3217726d6de
parent4fc011e75748a16d280e419dd0df4cdb648c7203 (diff)
Clean the default security group
It's not removed when deleting the users and the projects. Change-Id: Ib5de0885dcbfb558a48cdd20ae3ccc47b7f23748 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com> (cherry picked from commit d4e60af2b8f544d774223b16c193dc40bd5dce38)
-rw-r--r--functest/core/tenantnetwork.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/functest/core/tenantnetwork.py b/functest/core/tenantnetwork.py
index 80087d07a..476849e5e 100644
--- a/functest/core/tenantnetwork.py
+++ b/functest/core/tenantnetwork.py
@@ -106,6 +106,10 @@ class NewProject(object):
self.orig_cloud.delete_project(self.project.id)
if self.role:
self.orig_cloud.delete_role(self.role.id)
+ sec_id = self.cloud.list_security_groups(
+ filters={'name': 'default',
+ 'project_id': self.project.id})[0].id
+ self.orig_cloud.delete_security_group(sec_id)
except Exception: # pylint: disable=broad-except
self.__logger.exception("Cannot clean all resources")