From 997a42438f2253aa9fe640c1cbdd8ea461901948 Mon Sep 17 00:00:00 2001 From: Cédric Ollivier Date: Sun, 18 Jun 2017 23:43:51 +0200 Subject: Remove all references to /home/opnfv/repos/functest MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It also removes relative (and incomplete) references which could be defined in modules instead of this global configuration. Change-Id: Ie20dc3547e49b6224aa8100cd380d37b87ece5a9 Signed-off-by: Cédric Ollivier --- functest/opnfv_tests/openstack/rally/rally.py | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'functest/opnfv_tests/openstack/rally') diff --git a/functest/opnfv_tests/openstack/rally/rally.py b/functest/opnfv_tests/openstack/rally/rally.py index 2ae6817d0..8970a5c04 100644 --- a/functest/opnfv_tests/openstack/rally/rally.py +++ b/functest/opnfv_tests/openstack/rally/rally.py @@ -13,6 +13,7 @@ from __future__ import division import json import logging import os +import pkg_resources import re import subprocess import time @@ -38,12 +39,14 @@ class RallyBase(testcase.OSGCTestCase): GLANCE_IMAGE_FORMAT = CONST.__getattribute__('openstack_image_disk_format') FLAVOR_NAME = "m1.tiny" - RALLY_DIR = os.path.join( - CONST.__getattribute__('dir_repo_functest'), - CONST.__getattribute__('dir_rally')) - RALLY_SCENARIO_DIR = os.path.join(RALLY_DIR, "scenario") - TEMPLATE_DIR = os.path.join(RALLY_SCENARIO_DIR, "templates") - SUPPORT_DIR = os.path.join(RALLY_SCENARIO_DIR, "support") + RALLY_DIR = pkg_resources.resource_filename( + 'functest', 'opnfv_tests/openstack/rally') + RALLY_SCENARIO_DIR = pkg_resources.resource_filename( + 'functest', 'opnfv_tests/openstack/rally/scenario') + TEMPLATE_DIR = pkg_resources.resource_filename( + 'functest', 'opnfv_tests/openstack/rally/scenario/templates') + SUPPORT_DIR = pkg_resources.resource_filename( + 'functest', 'opnfv_tests/openstack/rally/scenario/support') USERS_AMOUNT = 2 TENANTS_AMOUNT = 3 ITERATIONS_AMOUNT = 10 -- cgit 1.2.3-korg