summaryrefslogtreecommitdiffstats
path: root/functest/opnfv_tests/openstack/tempest
diff options
context:
space:
mode:
authorCédric Ollivier <cedric.ollivier@orange.com>2018-06-24 11:37:10 +0200
committerCédric Ollivier <cedric.ollivier@orange.com>2018-07-03 19:35:52 +0200
commit5247619cec8fc37fcf5b44d7d2d02c31db8c5d42 (patch)
tree2b53566f63d55e946dabbb1c3c443f3eb0671e52 /functest/opnfv_tests/openstack/tempest
parent6d346ac0d71be04d171045d93513e88ce315886c (diff)
Improve scenarios to reduce duplicate codes
Change-Id: I71f79b9ac8314ac979d4b1009f662baa7c93a4fd Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com> (cherry picked from commit d2bf2e00eaedb5113f4baee3a707aa026dd1c18d)
Diffstat (limited to 'functest/opnfv_tests/openstack/tempest')
-rw-r--r--functest/opnfv_tests/openstack/tempest/tempest.py27
1 files changed, 4 insertions, 23 deletions
diff --git a/functest/opnfv_tests/openstack/tempest/tempest.py b/functest/opnfv_tests/openstack/tempest/tempest.py
index a7ba8e026..a46a629de 100644
--- a/functest/opnfv_tests/openstack/tempest/tempest.py
+++ b/functest/opnfv_tests/openstack/tempest/tempest.py
@@ -267,31 +267,12 @@ class TempestCommon(singlevm.VmReady1):
compute_cnt = len(self.cloud.list_hypervisors())
LOGGER.info("Creating two images for Tempest suite")
-
- self.image_alt = self.cloud.create_image(
- '{}-img_alt_{}'.format(self.case_name, self.guid),
- filename=getattr(
- config.CONF, '{}_image'.format(self.case_name),
- self.filename),
- meta=getattr(
- config.CONF, '{}_extra_properties'.format(self.case_name),
- self.extra_properties),
- visibility=getattr(
- config.CONF, '{}_visibility'.format(self.case_name),
- self.visibility))
+ self.image_alt = self.publish_image(
+ '{}-img_alt_{}'.format(self.case_name, self.guid))
LOGGER.debug("image_alt: %s", self.image_alt)
-
- self.flavor_alt = self.orig_cloud.create_flavor(
- '{}-flavor_alt_{}'.format(self.case_name, self.guid),
- getattr(config.CONF, '{}_flavor_ram'.format(self.case_name),
- self.flavor_ram),
- getattr(config.CONF, '{}_flavor_vcpus'.format(self.case_name),
- self.flavor_vcpus),
- getattr(config.CONF, '{}_flavor_disk'.format(self.case_name),
- self.flavor_disk))
+ self.flavor_alt = self.create_flavor(
+ '{}-flavor_alt_{}'.format(self.case_name, self.guid))
LOGGER.debug("flavor: %s", self.flavor_alt)
- self.orig_cloud.set_flavor_specs(
- self.flavor_alt.id, getattr(config.CONF, 'flavor_extra_specs', {}))
self.conf_file = conf_utils.configure_verifier(self.deployment_dir)
conf_utils.configure_tempest_update_params(