From 0cda1f539e2e465f013c1a7f492701e6eadebc72 Mon Sep 17 00:00:00 2001 From: =?utf8?q?C=C3=A9dric=20Ollivier?= Date: Sat, 22 Sep 2018 16:07:47 +0200 Subject: [PATCH] Clean the default security group MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit It's not removed when deleting the users and the projects. Change-Id: Ib5de0885dcbfb558a48cdd20ae3ccc47b7f23748 Signed-off-by: Cédric Ollivier (cherry picked from commit d4e60af2b8f544d774223b16c193dc40bd5dce38) --- functest/core/tenantnetwork.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/functest/core/tenantnetwork.py b/functest/core/tenantnetwork.py index 9f5913c70..ec64a52e5 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") -- 2.16.6