From 1422a9ac6c40df71978412cddce90870d578989c Mon Sep 17 00:00:00 2001 From: Salvatore Date: Wed, 8 Oct 2014 15:53:25 +0200 Subject: [PATCH] Log identifiers of resources being cleaned up On teardown compute API tests clean up resources such as servers and images. This patch simply logs the identifiers of these resources in order to help debugging failures which might originate from problems during cleanup. Change-Id: Ied2924bba78ec8f4a3b51df1be69273b28362475 Related-Bug: #1357055 --- tempest/api/compute/base.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tempest/api/compute/base.py b/tempest/api/compute/base.py index 6c93d33926..d9916edcb3 100644 --- a/tempest/api/compute/base.py +++ b/tempest/api/compute/base.py @@ -142,6 +142,8 @@ class BaseComputeTest(tempest.test.BaseTestCase): @classmethod def clear_servers(cls): + LOG.debug('Clearing servers: %s', ','.join( + server['id'] for server in cls.servers)) for server in cls.servers: try: cls.servers_client.delete_server(server['id']) @@ -181,6 +183,7 @@ class BaseComputeTest(tempest.test.BaseTestCase): @classmethod def clear_images(cls): + LOG.debug('Clearing images: %s', ','.join(cls.images)) for image_id in cls.images: try: cls.images_client.delete_image(image_id) @@ -192,6 +195,8 @@ class BaseComputeTest(tempest.test.BaseTestCase): @classmethod def clear_security_groups(cls): + LOG.debug('Clearing security groups: %s', ','.join( + str(sg['id']) for sg in cls.security_groups)) for sg in cls.security_groups: try: resp, body =\ @@ -206,6 +211,7 @@ class BaseComputeTest(tempest.test.BaseTestCase): @classmethod def clear_server_groups(cls): + LOG.debug('Clearing server groups: %s', ','.join(cls.server_groups)) for server_group_id in cls.server_groups: try: cls.client.delete_server_group(server_group_id)