diff options
author | Cédric Ollivier <cedric.ollivier@orange.com> | 2017-06-18 23:43:51 +0200 |
---|---|---|
committer | jose.lausuch <jose.lausuch@ericsson.com> | 2017-06-20 15:12:04 +0200 |
commit | 997a42438f2253aa9fe640c1cbdd8ea461901948 (patch) | |
tree | 2c72fe095e3770282547635b4ce387b9a2dae571 /functest/opnfv_tests/openstack/vping | |
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/vping')
-rw-r--r-- | functest/opnfv_tests/openstack/vping/vping_base.py | 6 | ||||
-rwxr-xr-x | functest/opnfv_tests/openstack/vping/vping_ssh.py | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/functest/opnfv_tests/openstack/vping/vping_base.py b/functest/opnfv_tests/openstack/vping/vping_base.py index 856d5f22..71460676 100644 --- a/functest/opnfv_tests/openstack/vping/vping_base.py +++ b/functest/opnfv_tests/openstack/vping/vping_base.py @@ -10,6 +10,7 @@ from datetime import datetime import logging import os +import pkg_resources import time import uuid @@ -37,7 +38,8 @@ class VPingBase(testcase.OSGCTestCase): self.logger = logging.getLogger(self.__class__.__name__) - self.functest_repo = CONST.__getattribute__('dir_repo_functest') + self.functest_repo = pkg_resources.resource_filename( + 'functest', '..') self.guid = '' if CONST.__getattribute__('vping_unique_names'): self.guid = '-' + str(uuid.uuid4()) @@ -45,8 +47,6 @@ class VPingBase(testcase.OSGCTestCase): self.os_creds = openstack_tests.get_credentials( os_env_file=CONST.__getattribute__('openstack_creds')) - self.repo = CONST.__getattribute__('dir_vping') - self.creators = list() self.image_creator = None self.network_creator = None diff --git a/functest/opnfv_tests/openstack/vping/vping_ssh.py b/functest/opnfv_tests/openstack/vping/vping_ssh.py index 6ac0d676..1f663307 100755 --- a/functest/opnfv_tests/openstack/vping/vping_ssh.py +++ b/functest/opnfv_tests/openstack/vping/vping_ssh.py @@ -8,7 +8,7 @@ # http://www.apache.org/licenses/LICENSE-2.0 import argparse -import os +import pkg_resources from scp import SCPClient import sys import time @@ -156,8 +156,8 @@ class VPingSSH(vping_base.VPingBase): """ self.logger.info("Trying to transfer ping.sh") scp = SCPClient(ssh.get_transport()) - local_path = self.functest_repo + "/" + self.repo - ping_script = os.path.join(local_path, "ping.sh") + ping_script = pkg_resources.resource_filename( + 'functest', 'opnfv_tests/openstack/vping/ping.sh') try: scp.put(ping_script, "~/") except: |