aboutsummaryrefslogtreecommitdiffstats
path: root/functest/opnfv_tests/openstack/rally/rally.py
diff options
context:
space:
mode:
authorJose Lausuch <jose.lausuch@ericsson.com>2017-06-21 08:33:02 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-06-21 08:33:02 +0000
commit51899de7927bbf6be76639508ae2970046add625 (patch)
treea2cc98e1a98b012e81d82ac8653932c00ea8ba3e /functest/opnfv_tests/openstack/rally/rally.py
parente7ab53553d719b0fb35b4a74cd0bbc9572c7a48d (diff)
parent997a42438f2253aa9fe640c1cbdd8ea461901948 (diff)
Merge "Remove all references to /home/opnfv/repos/functest"
Diffstat (limited to 'functest/opnfv_tests/openstack/rally/rally.py')
-rw-r--r--functest/opnfv_tests/openstack/rally/rally.py15
1 files changed, 9 insertions, 6 deletions
diff --git a/functest/opnfv_tests/openstack/rally/rally.py b/functest/opnfv_tests/openstack/rally/rally.py
index 2ae6817d..8970a5c0 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