diff options
author | 2017-06-18 23:43:51 +0200 | |
---|---|---|
committer | 2017-06-20 15:12:04 +0200 | |
commit | 997a42438f2253aa9fe640c1cbdd8ea461901948 (patch) | |
tree | 2c72fe095e3770282547635b4ce387b9a2dae571 /functest/ci | |
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/ci')
-rw-r--r-- | functest/ci/config_functest.yaml | 19 | ||||
-rwxr-xr-x | functest/ci/prepare_env.py | 31 | ||||
-rwxr-xr-x | functest/ci/run_tests.py | 7 |
3 files changed, 20 insertions, 37 deletions
diff --git a/functest/ci/config_functest.yaml b/functest/ci/config_functest.yaml index 1b2c8380..60270b6c 100644 --- a/functest/ci/config_functest.yaml +++ b/functest/ci/config_functest.yaml @@ -1,17 +1,7 @@ general: dir: - # Relative to the path where the repo is cloned: - vping: functest/opnfv_tests/openstack/vping - dir_odl: functest/opnfv_tests/sdn/odl - rally: functest/opnfv_tests/openstack/rally - tempest_cases: functest/opnfv_tests/openstack/tempest/custom_tests - onos: functest/opnfv_tests/sdn/onos/teston - onos_sfc: functest/opnfv_tests/sdn/onos/sfc - - # Absolute path home: /home/opnfv repos: /home/opnfv/repos - repo_functest: /home/opnfv/repos/functest dir_repo_rally: /home/opnfv/repos/rally repo_tempest: /home/opnfv/repos/tempest dir_repo_releng: /home/opnfv/repos/releng @@ -32,9 +22,7 @@ general: repo_securityscan: /home/opnfv/repos/securityscanning repo_vrouter: /home/opnfv/repos/vnfs/vrouter functest: /home/opnfv/functest - functest_test: /home/opnfv/repos/functest/functest/opnfv_tests results: /home/opnfv/functest/results - functest_logging_cfg: /home/opnfv/repos/functest/functest/ci/logging.ini functest_conf: /home/opnfv/functest/conf functest_data: /home/opnfv/functest/data ims_data: /home/opnfv/functest/data/ims/ @@ -71,9 +59,6 @@ general: neutron_private_subnet_gateway: 192.168.120.254 neutron_router_name: functest-router - functest: - testcases_yaml: /home/opnfv/repos/functest/functest/ci/testcases.yaml - snaps: use_keystone: True use_floating_ips: True @@ -150,10 +135,6 @@ rally: subnet_cidr: 192.168.140.0/24 router_name: rally-router -refstack: - tempest_conf_path: openstack/refstack_client/refstack_tempest.conf - defcore_list: openstack/refstack_client/defcore.txt - vnf: aaa: tenant_name: aaa diff --git a/functest/ci/prepare_env.py b/functest/ci/prepare_env.py index 9e53e30b..fd1f5dbf 100755 --- a/functest/ci/prepare_env.py +++ b/functest/ci/prepare_env.py @@ -11,6 +11,7 @@ import json import logging import logging.config import os +import pkg_resources import re import subprocess import sys @@ -34,14 +35,15 @@ handler = None pod_arch = None arch_filter = ['aarch64'] -CONFIG_FUNCTEST_PATH = CONST.__getattribute__('CONFIG_FUNCTEST_YAML') -CONFIG_PATCH_PATH = os.path.join(os.path.dirname( - CONFIG_FUNCTEST_PATH), "config_patch.yaml") -CONFIG_AARCH64_PATCH_PATH = os.path.join(os.path.dirname( - CONFIG_FUNCTEST_PATH), "config_aarch64_patch.yaml") -RALLY_CONF_PATH = os.path.join("/etc/rally/rally.conf") -RALLY_AARCH64_PATCH_PATH = os.path.join(os.path.dirname( - CONFIG_FUNCTEST_PATH), "rally_aarch64_patch.conf") +CONFIG_FUNCTEST_PATH = pkg_resources.resource_filename( + 'functest', 'ci/config_functest.yaml') +CONFIG_PATCH_PATH = pkg_resources.resource_filename( + 'functest', 'ci/config_patch.yaml') +CONFIG_AARCH64_PATCH_PATH = pkg_resources.resource_filename( + 'functest', 'ci/config_aarch64_patch.yaml') +RALLY_CONF_PATH = "/etc/rally/rally.conf" +RALLY_AARCH64_PATCH_PATH = pkg_resources.resource_filename( + 'functest', 'ci/rally_aarch64_patch.conf') class PrepareEnvParser(object): @@ -114,9 +116,8 @@ def get_deployment_handler(): global handler global pod_arch - installer_params_yaml = os.path.join( - CONST.__getattribute__('dir_repo_functest'), - 'functest/ci/installer_params.yaml') + installer_params_yaml = pkg_resources.resource_filename( + 'functest', 'ci/installer_params.yaml') if (CONST.__getattribute__('INSTALLER_IP') and CONST.__getattribute__('INSTALLER_TYPE') and CONST.__getattribute__('INSTALLER_TYPE') in @@ -250,8 +251,8 @@ def update_db_url(): def verify_deployment(): print_separator() logger.info("Verifying OpenStack services...") - cmd = ("%s/functest/ci/check_os.sh" % - CONST.__getattribute__('dir_repo_functest')) + cmd = ("sh %s" % pkg_resources.resource_filename( + 'functest', 'ci/check_os.sh')) logger.debug("Executing command: %s" % cmd) p = subprocess.Popen(cmd, stdout=subprocess.PIPE, shell=True) @@ -386,8 +387,8 @@ def main(**kwargs): if __name__ == '__main__': - logging.config.fileConfig( - CONST.__getattribute__('dir_functest_logging_cfg')) + logging.config.fileConfig(pkg_resources.resource_filename( + 'functest', 'ci/logging.ini')) parser = PrepareEnvParser() args = parser.parse_args(sys.argv[1:]) sys.exit(main(**args)) diff --git a/functest/ci/run_tests.py b/functest/ci/run_tests.py index af45c321..430f0ca8 100755 --- a/functest/ci/run_tests.py +++ b/functest/ci/run_tests.py @@ -14,6 +14,7 @@ import importlib import logging import logging.config import os +import pkg_resources import re import sys @@ -201,7 +202,7 @@ class Runner(object): _tiers = tb.TierBuilder( CONST.__getattribute__('INSTALLER_TYPE'), CONST.__getattribute__('DEPLOY_SCENARIO'), - CONST.__getattribute__("functest_testcases_yaml")) + pkg_resources.resource_filename('functest', 'ci/testcases.yaml')) if kwargs['noclean']: self.clean_flag = False @@ -267,8 +268,8 @@ class Runner(object): if __name__ == '__main__': - logging.config.fileConfig( - CONST.__getattribute__('dir_functest_logging_cfg')) + logging.config.fileConfig(pkg_resources.resource_filename( + 'functest', 'ci/logging.ini')) parser = RunTestsParser() args = parser.parse_args(sys.argv[1:]) runner = Runner() |