summaryrefslogtreecommitdiffstats
path: root/functest/opnfv_tests/openstack/tempest/tempest.py
diff options
context:
space:
mode:
authorLinda Wang <wangwulin@huawei.com>2017-12-04 06:36:06 +0000
committerLinda Wang <wangwulin@huawei.com>2017-12-06 01:47:21 +0000
commitfa0a614c8ea3e757440c82380707e0221079e32a (patch)
treeb45c7913cc2391fa811620b51152792e8ba8302d /functest/opnfv_tests/openstack/tempest/tempest.py
parent0273da05f68727835b5fc778f54eb70ccae209d8 (diff)
Fix the yamllint errors in functest/ci
And also, remove the params "tempest_use_custom_images" and "unique_names" of vping, rally and tempest. Change-Id: Ic4243ef2f5e965910e5befa87db8d585cad34fa2 Signed-off-by: Linda Wang <wangwulin@huawei.com>
Diffstat (limited to 'functest/opnfv_tests/openstack/tempest/tempest.py')
-rw-r--r--functest/opnfv_tests/openstack/tempest/tempest.py34
1 files changed, 15 insertions, 19 deletions
diff --git a/functest/opnfv_tests/openstack/tempest/tempest.py b/functest/opnfv_tests/openstack/tempest/tempest.py
index bede02fb..979e992f 100644
--- a/functest/opnfv_tests/openstack/tempest/tempest.py
+++ b/functest/opnfv_tests/openstack/tempest/tempest.py
@@ -318,9 +318,7 @@ class TempestResourcesManager(object):
self.os_creds = openstack_tests.get_credentials(
os_env_file=CONST.__getattribute__('openstack_creds'))
- self.guid = ''
- if CONST.__getattribute__('tempest_unique_names'):
- self.guid = '-' + str(uuid.uuid4())
+ self.guid = '-' + str(uuid.uuid4())
self.creators = list()
@@ -384,21 +382,19 @@ class TempestResourcesManager(object):
flavor_id = None
flavor_id_alt = None
- if (CONST.__getattribute__('tempest_use_custom_images') or
- use_custom_images):
- logger.debug("Creating image for Tempest suite")
- image_base_name = CONST.__getattribute__(
- 'openstack_image_name') + self.guid
- os_image_settings = openstack_tests.cirros_image_settings(
- image_base_name, public=True,
- image_metadata=self.cirros_image_config)
- logger.debug("Creating image for Tempest suite")
- image_creator = deploy_utils.create_image(
- self.os_creds, os_image_settings)
- if image_creator is None:
- raise Exception('Failed to create image')
- self.creators.append(image_creator)
- image_id = image_creator.get_image().id
+ logger.debug("Creating image for Tempest suite")
+ image_base_name = CONST.__getattribute__(
+ 'openstack_image_name') + self.guid
+ os_image_settings = openstack_tests.cirros_image_settings(
+ image_base_name, public=True,
+ image_metadata=self.cirros_image_config)
+ logger.debug("Creating image for Tempest suite")
+ image_creator = deploy_utils.create_image(
+ self.os_creds, os_image_settings)
+ if image_creator is None:
+ raise Exception('Failed to create image')
+ self.creators.append(image_creator)
+ image_id = image_creator.get_image().id
if use_custom_images:
logger.debug("Creating 2nd image for Tempest suite")
@@ -415,7 +411,7 @@ class TempestResourcesManager(object):
self.creators.append(image_creator_alt)
image_id_alt = image_creator_alt.get_image().id
- if (CONST.__getattribute__('tempest_use_custom_flavors') or
+ if (CONST.__getattribute__('tempest_use_custom_flavors') == 'True' or
use_custom_flavors):
logger.info("Creating flavor for Tempest suite")
scenario = CONST.__getattribute__('DEPLOY_SCENARIO')