Merge "Fix dns problem on E/// pod"
authorboucherv <valentin.boucher@orange.com>
Wed, 13 Jan 2016 14:41:23 +0000 (14:41 +0000)
committerGerrit Code Review <gerrit@172.30.200.206>
Wed, 13 Jan 2016 14:41:23 +0000 (14:41 +0000)
12 files changed:
docker/Dockerfile
docker/common.sh
docker/prepare_env.sh
testcases/Controllers/ONOS/Teston/CI/adapters/foundation.py
testcases/VIM/OpenStack/CI/libraries/run_rally-cert.py
testcases/VIM/OpenStack/CI/libraries/run_rally.py
testcases/VIM/OpenStack/CI/libraries/run_tempest.py
testcases/config_functest.py
testcases/functest_utils.py
testcases/tests/TestFunctestUtils.py
testcases/vIMS/CI/vIMS.py
testcases/vPing/CI/libraries/vPing.py

index 6ae06e2..a39775c 100644 (file)
@@ -10,7 +10,7 @@
 #
 # Execution:
 #    $ docker run -t -i \
-#      -e "INSTALLER_TYPE=fuel/foreman" \
+#      -e "INSTALLER_TYPE=fuel|apex|compass|joid \
 #      -e "INSTALLER_IP=10.20.0.2/172.30.10.73" \
 #      -v $(pwd)/config_functest.yaml:/home/opnfv/functest/conf/config_functest.yaml
 #      opnfv/functest /bin/bash
index aabc32c..f21263c 100755 (executable)
 #
 # If it is not provided, take the existing one in the functest repo
 #
+mkdir -p /home/opnfv/functest/conf
 config_file=/home/opnfv/functest/conf/config_functest.yaml
 if [ ! -f ${config_file} ]; then
-    config_file=$(find / -name config_functest.yaml)
+    default_config_file=$(find /home/opnfv/repos -name config_functest.yaml)
+    cp $default_config_file $config_file
+    echo "config_functest.yaml not provided. Using default one"
 fi
 
+
 # Parse config_functest.yaml file
 # TODO: this is not the best way to parse a yaml file in bash...
 
index 1db7be3..cf40749 100755 (executable)
@@ -57,7 +57,7 @@ else
 fi
 
 # definition of available installer names
-INSTALLERS=(fuel foreman compass apex joid)
+INSTALLERS=(fuel compass apex joid)
 
 if [ ! -f ${FUNCTEST_CONF_DIR}/openstack.creds ]; then
     # If credentials file is not given, check if environment variables are set
@@ -179,19 +179,6 @@ if [ ${RALLY_COMMIT} != "latest" ]; then
     git reset --hard ${RALLY_COMMIT}
 fi
 
-# Ugly hack:
-# After the 'git functest pull', we move the given yaml file to the repo directory,
-# since some of the scripts will use that one, and not the one in
-# /home/opnfv/functest/conf/
-given_config_file=/home/opnfv/functest/conf/config_functest.yaml
-default_config_file=$(find /home/opnfv/repos -name config_functest.yaml)
-if [ -f ${given_config_file} ]; then
-    info "Copying given config_functest.yaml to the repository directory"
-    cp ${given_config_file} ${default_config_file}
-else
-    info "config_functest.yaml not provided. Using default one: ${default_config_file}"
-fi
-
 
 # Create directories
 mkdir -p ${FUNCTEST_CONF_DIR}
index c909d36..9d0c634 100644 (file)
@@ -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()
 
index d44100e..082c0cf 100755 (executable)
@@ -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()
 
index 52ca591..ba74a72 100644 (file)
@@ -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()
 
index f056e5e..e24697c 100644 (file)
@@ -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")
index b4e29bf..8ae0d16 100755 (executable)
@@ -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()
 
index fd4e303..401078b 100644 (file)
@@ -609,7 +609,7 @@ def get_git_branch(repo_path):
 
 def get_installer_type(logger=None):
     """
-    Get installer type (fuel, foreman, apex, joid, compass)
+    Get installer type (fuel, apex, joid, compass)
     """
     try:
         installer = os.environ['INSTALLER_TYPE']
index 337e4ee..46da50c 100644 (file)
@@ -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()
 
index 465b8e2..d2b6567 100644 (file)
@@ -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()
 
index d9ceb2f..e8e01bf 100644 (file)
@@ -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()