diff options
author | 2017-06-18 23:43:51 +0200 | |
---|---|---|
committer | 2017-06-20 15:12:04 +0200 | |
commit | 997a42438f2253aa9fe640c1cbdd8ea461901948 (patch) | |
tree | 2c72fe095e3770282547635b4ce387b9a2dae571 /functest/opnfv_tests/openstack/refstack_client/refstack_client.py | |
parent | 0914c7e7011b7ba3ed9eeae7f6c3605afb711640 (diff) |
Remove all references to /home/opnfv/repos/functest
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 <cedric.ollivier@orange.com>
Diffstat (limited to 'functest/opnfv_tests/openstack/refstack_client/refstack_client.py')
-rwxr-xr-x | functest/opnfv_tests/openstack/refstack_client/refstack_client.py | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/functest/opnfv_tests/openstack/refstack_client/refstack_client.py b/functest/opnfv_tests/openstack/refstack_client/refstack_client.py index b2a21533..30d1cf08 100755 --- a/functest/opnfv_tests/openstack/refstack_client/refstack_client.py +++ b/functest/opnfv_tests/openstack/refstack_client/refstack_client.py @@ -12,6 +12,7 @@ from __future__ import division import argparse import logging import os +import pkg_resources import re import sys import subprocess @@ -33,13 +34,16 @@ class RefstackClient(testcase.OSGCTestCase): if "case_name" not in kwargs: kwargs["case_name"] = "refstack_defcore" super(RefstackClient, self).__init__(**kwargs) - self.FUNCTEST_TEST = CONST.__getattribute__('dir_functest_test') - self.CONF_PATH = CONST.__getattribute__('refstack_tempest_conf_path') - self.DEFCORE_LIST = CONST.__getattribute__('refstack_defcore_list') + self.CONF_PATH = pkg_resources.resource_filename( + 'functest', + 'opnfv_tests/openstack/refstack_client/refstack_tempest.conf') + self.FUNCTEST_TEST = pkg_resources.resource_filename( + 'functest', 'opnfv_tests') + self.DEFCORE_LIST = 'openstack/refstack_client/defcore.txt' self.confpath = os.path.join(self.FUNCTEST_TEST, self.CONF_PATH) - self.defcorelist = os.path.join(self.FUNCTEST_TEST, - self.DEFCORE_LIST) + self.defcorelist = pkg_resources.resource_filename( + 'functest', 'opnfv_tests/openstack/refstack_client/defcore.txt') def source_venv(self): @@ -202,9 +206,13 @@ class RefstackClient(testcase.OSGCTestCase): class RefstackClientParser(object): def __init__(self): - self.FUNCTEST_TEST = CONST.__getattribute__('dir_functest_test') - self.CONF_PATH = CONST.__getattribute__('refstack_tempest_conf_path') - self.DEFCORE_LIST = CONST.__getattribute__('refstack_defcore_list') + self.FUNCTEST_TEST = pkg_resources.resource_filename( + 'functest', 'opnfv_tests') + self.CONF_PATH = pkg_resources.resource_filename( + 'functest', + 'opnfv_tests/openstack/refstack_client/refstack_tempest.conf') + self.DEFCORE_LIST = pkg_resources.resource_filename( + 'functest', 'opnfv_tests/openstack/refstack_client/defcore.txt') self.confpath = os.path.join(self.FUNCTEST_TEST, self.CONF_PATH) self.defcorelist = os.path.join(self.FUNCTEST_TEST, |