From c4b0e0091b16773b8180946c73f789cc429673e8 Mon Sep 17 00:00:00 2001 From: Andrea Rosa Date: Fri, 1 Jul 2016 14:22:38 +0100 Subject: [PATCH] Making delete_on_termination configurable In the compute.create_test_server method the delete_on_termination parameter for the block device mapping is hard coded to be True, this change allows to pass it as keyword argument, if it is not passed we keep True as default value. Change-Id: I38fea4c9e0aca0d0c2fb97fd7d323c4e808ae050 --- tempest/common/compute.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tempest/common/compute.py b/tempest/common/compute.py index 7ebc28385f..c290b57ed6 100644 --- a/tempest/common/compute.py +++ b/tempest/common/compute.py @@ -30,7 +30,8 @@ LOG = logging.getLogger(__name__) def create_test_server(clients, validatable=False, validation_resources=None, tenant_network=None, wait_until=None, volume_backed=False, name=None, flavor=None, - image_id=None, **kwargs): + image_id=None, delete_vol_on_termination=True, + **kwargs): """Common wrapper utility returning a test server. This method is a common wrapper returning a test server that can be @@ -106,7 +107,7 @@ def create_test_server(clients, validatable=False, validation_resources=None, 'source_type': 'volume', 'destination_type': 'volume', 'boot_index': 0, - 'delete_on_termination': True}] + 'delete_on_termination': delete_vol_on_termination}] kwargs['block_device_mapping_v2'] = bd_map_v2 # Since this is boot from volume an image does not need