diff options
author | Linda Wang <wangwulin@huawei.com> | 2017-06-30 04:16:27 +0000 |
---|---|---|
committer | Linda Wang <wangwulin@huawei.com> | 2017-06-30 06:18:13 +0000 |
commit | 74db571092ab8650d8059430ea4e4033d2269527 (patch) | |
tree | 7a7d157fd9265ecbc0f39293c4b69eaf271f9faa | |
parent | bea2edf545006f76385a6f597aef999871011b26 (diff) |
Fix the wrong path of sdnvpn
The new path should be /usr/local/lib/python2.7/dist-packages/sdnvpn,
rather than /home/opnfv/repos/sdnvpn
Change-Id: I22e019226e7bffe233b52c1a3ec6171b835e4bd3
Signed-off-by: Linda Wang <wangwulin@huawei.com>
-rw-r--r-- | sdnvpn/lib/config.py | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/sdnvpn/lib/config.py b/sdnvpn/lib/config.py index f845f72..c3f6b22 100644 --- a/sdnvpn/lib/config.py +++ b/sdnvpn/lib/config.py @@ -9,7 +9,7 @@ import yaml import logging -import os +import pkg_resources from functest.utils.constants import CONST import functest.utils.functest_utils as ft_utils @@ -22,15 +22,13 @@ class CommonConfig(object): Common configuration parameters across testcases """ def __init__(self): - self.repo_path = CONST.dir_repo_sdnvpn - self.config_file = os.path.join(self.repo_path, - 'sdnvpn/test/functest/config.yaml') - self.keyfile_path = os.path.join(self.repo_path, - 'sdnvpn/artifacts/id_rsa') + self.config_file = pkg_resources.resource_filename( + 'sdnvpn', 'test/functest/config.yaml') + self.keyfile_path = pkg_resources.resource_filename( + 'sdnvpn', 'artifacts/id_rsa') self.test_db = CONST.results_test_db_url - self.quagga_setup_script_path = os.path.join( - self.repo_path, - "sdnvpn/artifacts/quagga_setup.sh") + self.quagga_setup_script_path = pkg_resources.resource_filename( + 'sdnvpn', 'artifacts/quagga_setup.sh') self.line_length = 90 # length for the summary table self.vm_boot_timeout = 180 self.default_flavor = ft_utils.get_parameter_from_yaml( |