aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuha Kosonen <juha.kosonen@nokia.com>2017-09-18 13:39:31 +0300
committerJuha Kosonen <juha.kosonen@nokia.com>2017-09-18 13:39:31 +0300
commita9cb468fae75d4e95689fa9ea02a94a73df95648 (patch)
treec078bafefc79eef5d2af23bda8b8704c084f6f9a
parent3e22a3e6d5b4df227f2ca96d214a7c78edd56163 (diff)
Fix image name in rally scenarios
Change-Id: I0a78a16d44c1e0e0b2edec2e43954c1f08e8bb09 Signed-off-by: Juha Kosonen <juha.kosonen@nokia.com>
-rw-r--r--functest/opnfv_tests/openstack/rally/rally.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/functest/opnfv_tests/openstack/rally/rally.py b/functest/opnfv_tests/openstack/rally/rally.py
index 5aba3882..44c7f2ba 100644
--- a/functest/opnfv_tests/openstack/rally/rally.py
+++ b/functest/opnfv_tests/openstack/rally/rally.py
@@ -102,6 +102,7 @@ class RallyBase(testcase.TestCase):
self.mode = ''
self.summary = []
self.scenario_dir = ''
+ self.image_name = None
self.ext_net_name = None
self.priv_net_id = None
self.smoke = None
@@ -112,7 +113,7 @@ class RallyBase(testcase.TestCase):
def _build_task_args(self, test_file_name):
task_args = {'service_list': [test_file_name]}
- task_args['image_name'] = self.GLANCE_IMAGE_NAME
+ task_args['image_name'] = self.image_name
task_args['flavor_name'] = self.FLAVOR_NAME
task_args['glance_image_location'] = self.GLANCE_IMAGE_PATH
task_args['glance_image_format'] = self.GLANCE_IMAGE_FORMAT
@@ -467,24 +468,23 @@ class RallyBase(testcase.TestCase):
if self.test_name not in self.TESTS:
raise Exception("Test name '%s' is invalid" % self.test_name)
- image_name = self.GLANCE_IMAGE_NAME + self.guid
network_name = self.RALLY_PRIVATE_NET_NAME + self.guid
subnet_name = self.RALLY_PRIVATE_SUBNET_NAME + self.guid
router_name = self.RALLY_ROUTER_NAME + self.guid
+ self.image_name = self.GLANCE_IMAGE_NAME + self.guid
self.ext_net_name = snaps_utils.get_ext_net_name(self.os_creds)
- LOGGER.debug('Getting or creating image...')
+ LOGGER.debug("Creating image '%s'...", self.image_name)
image_creator = deploy_utils.create_image(
self.os_creds, ImageSettings(
- name=image_name,
+ name=self.image_name,
image_file=self.GLANCE_IMAGE_PATH,
img_format=self.GLANCE_IMAGE_FORMAT,
image_user=self.GLANCE_IMAGE_USERNAME,
public=True,
extra_properties=self.GLANCE_IMAGE_EXTRA_PROPERTIES))
if image_creator is None:
- raise Exception("Failed to get or create image '%s'" %
- image_name)
+ raise Exception("Failed to create image")
self.creators.append(image_creator)
LOGGER.debug("Creating network '%s'...", network_name)