From 00b51ffe114702ce207aa7ba2e40f01984c0c57c Mon Sep 17 00:00:00 2001 From: "jose.lausuch" Date: Wed, 13 Jan 2016 11:35:59 +0100 Subject: Place config_functest.yaml outside the functest repo If config_functest.yaml is given it will be placed in: /home/opnfv/functest/conf/config_functest.yaml If not given: copy default from repo to that location Change-Id: I816bf5ccf8e0a5b8ebde2a0ab924657533f49127 Signed-off-by: jose.lausuch --- testcases/Controllers/ONOS/Teston/CI/adapters/foundation.py | 2 +- testcases/VIM/OpenStack/CI/libraries/run_rally-cert.py | 2 +- testcases/VIM/OpenStack/CI/libraries/run_rally.py | 2 +- testcases/VIM/OpenStack/CI/libraries/run_tempest.py | 2 +- testcases/config_functest.py | 2 +- testcases/tests/TestFunctestUtils.py | 2 +- testcases/vIMS/CI/vIMS.py | 2 +- testcases/vPing/CI/libraries/vPing.py | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) (limited to 'testcases') diff --git a/testcases/Controllers/ONOS/Teston/CI/adapters/foundation.py b/testcases/Controllers/ONOS/Teston/CI/adapters/foundation.py index c909d36be..9d0c63451 100644 --- a/testcases/Controllers/ONOS/Teston/CI/adapters/foundation.py +++ b/testcases/Controllers/ONOS/Teston/CI/adapters/foundation.py @@ -40,7 +40,7 @@ class foundation: """ Get Default Parameters value """ - with open(self.workhome + "testcases/config_functest.yaml") as f: + with open("/home/opnfv/functest/conf/config_functest.yaml") as f: functest_yaml = yaml.safe_load(f) f.close() diff --git a/testcases/VIM/OpenStack/CI/libraries/run_rally-cert.py b/testcases/VIM/OpenStack/CI/libraries/run_rally-cert.py index d44100ef3..082c0cf41 100755 --- a/testcases/VIM/OpenStack/CI/libraries/run_rally-cert.py +++ b/testcases/VIM/OpenStack/CI/libraries/run_rally-cert.py @@ -72,7 +72,7 @@ formatter = logging.Formatter("%(asctime)s - %(name)s - " ch.setFormatter(formatter) logger.addHandler(ch) -with open(args.repo_path+"testcases/config_functest.yaml") as f: +with open("/home/opnfv/functest/conf/config_functest.yaml") as f: functest_yaml = yaml.safe_load(f) f.close() diff --git a/testcases/VIM/OpenStack/CI/libraries/run_rally.py b/testcases/VIM/OpenStack/CI/libraries/run_rally.py index 52ca59102..ba74a720d 100644 --- a/testcases/VIM/OpenStack/CI/libraries/run_rally.py +++ b/testcases/VIM/OpenStack/CI/libraries/run_rally.py @@ -70,7 +70,7 @@ if not os.path.exists(REPO_PATH): sys.path.append(REPO_PATH + "testcases/") import functest_utils -with open(REPO_PATH+"testcases/config_functest.yaml") as f: +with open("/home/opnfv/functest/conf/config_functest.yaml") as f: functest_yaml = yaml.safe_load(f) f.close() diff --git a/testcases/VIM/OpenStack/CI/libraries/run_tempest.py b/testcases/VIM/OpenStack/CI/libraries/run_tempest.py index f056e5e9e..e24697c76 100644 --- a/testcases/VIM/OpenStack/CI/libraries/run_tempest.py +++ b/testcases/VIM/OpenStack/CI/libraries/run_tempest.py @@ -56,7 +56,7 @@ if not os.path.exists(REPO_PATH): sys.path.append(REPO_PATH + "testcases/") import functest_utils -with open(REPO_PATH+"testcases/config_functest.yaml") as f: +with open("/home/opnfv/functest/conf/config_functest.yaml") as f: functest_yaml = yaml.safe_load(f) f.close() TEST_DB = functest_yaml.get("results").get("test_db_url") diff --git a/testcases/config_functest.py b/testcases/config_functest.py index b4e29bf69..8ae0d1639 100755 --- a/testcases/config_functest.py +++ b/testcases/config_functest.py @@ -43,7 +43,7 @@ if not os.path.exists(REPO_PATH): exit(-1) sys.path.append(REPO_PATH + "testcases/") -with open(REPO_PATH+"testcases/config_functest.yaml") as f: +with open("/home/opnfv/functest/conf/config_functest.yaml") as f: functest_yaml = yaml.safe_load(f) f.close() diff --git a/testcases/tests/TestFunctestUtils.py b/testcases/tests/TestFunctestUtils.py index 337e4ee8a..46da50cb8 100644 --- a/testcases/tests/TestFunctestUtils.py +++ b/testcases/tests/TestFunctestUtils.py @@ -16,7 +16,7 @@ class TestFunctestUtils(unittest.TestCase): global functest_yaml - with open("../config_functest.yaml") as f: + with open("/home/opnfv/functest/conf/config_functest.yaml") as f: functest_yaml = yaml.safe_load(f) f.close() diff --git a/testcases/vIMS/CI/vIMS.py b/testcases/vIMS/CI/vIMS.py index 98cc009cf..74cce9793 100644 --- a/testcases/vIMS/CI/vIMS.py +++ b/testcases/vIMS/CI/vIMS.py @@ -63,7 +63,7 @@ if not os.path.exists(REPO_PATH): sys.path.append(REPO_PATH + "testcases/") import functest_utils -with open(REPO_PATH + "testcases/config_functest.yaml") as f: +with open("/home/opnfv/functest/conf/config_functest.yaml") as f: functest_yaml = yaml.safe_load(f) f.close() diff --git a/testcases/vPing/CI/libraries/vPing.py b/testcases/vPing/CI/libraries/vPing.py index d9ceb2f6d..e8e01bf1a 100644 --- a/testcases/vPing/CI/libraries/vPing.py +++ b/testcases/vPing/CI/libraries/vPing.py @@ -63,7 +63,7 @@ if not os.path.exists(REPO_PATH): sys.path.append(REPO_PATH + "testcases/") import functest_utils -with open(REPO_PATH + "testcases/config_functest.yaml") as f: +with open("/home/opnfv/functest/conf/config_functest.yaml") as f: functest_yaml = yaml.safe_load(f) f.close() -- cgit 1.2.3-korg