Browse Source

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
changes/08/126908/3
Salvatore 7 years ago
committed by taturiello
parent
commit
1422a9ac6c
1 changed files with 6 additions and 0 deletions
  1. +6
    -0
      tempest/api/compute/base.py

+ 6
- 0
tempest/api/compute/base.py View File

@ -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)


Loading…
Cancel
Save