bugfix: Don't try to run a tier if it doesn't contain any enabled test
[functest.git] / ci / prepare_env.py
old mode 100644 (file)
new mode 100755 (executable)
index 61740cd..ed6a4ed
 # http://www.apache.org/licenses/LICENSE-2.0
 #
 
+
 import argparse
 import os
 import re
 import subprocess
 import sys
-import yaml
 
 import functest.utils.functest_logger as ft_logger
 import functest.utils.functest_utils as ft_utils
-import functest.utils.generate_defaults as gen_def
 import functest.utils.openstack_utils as os_utils
+import yaml
 
 
-""" arguments """
 actions = ['start', 'check']
 parser = argparse.ArgumentParser()
 parser.add_argument("action", help="Possible actions are: "
@@ -134,13 +133,6 @@ def create_directories():
     else:
         logger.debug("   %s already exists." % FUNCTEST_DATA_DIR)
 
-    ODL_RESULTS_DIR = FUNCTEST_RESULTS_DIR + "/ODL/"
-    if not os.path.exists(ODL_RESULTS_DIR):
-        os.makedirs(ODL_RESULTS_DIR)
-        logger.info("    %s created." % ODL_RESULTS_DIR)
-    else:
-        logger.debug("   %s already exists." % ODL_RESULTS_DIR)
-
 
 def source_rc_file():
     print_separator()
@@ -150,7 +142,7 @@ def source_rc_file():
         logger.warning("The environment variable 'creds' must be set and"
                        "pointing to the local RC file. Using default: "
                        "/home/opnfv/functest/conf/openstack.creds ...")
-        rc_file = "/home/opnfv/functest/conf/openstack.creds ..."
+        rc_file = "/home/opnfv/functest/conf/openstack.creds"
 
     if not os.path.isfile(rc_file):
         logger.info("RC file not provided. "
@@ -241,12 +233,6 @@ def install_rally():
                                         "OpenStack flavors."))
 
 
-def generate_os_defaults():
-    print_separator()
-    logger.info("Generating OpenStack defaults...")
-    gen_def.main()
-
-
 def check_environment():
     msg_not_active = "The Functest environment is not installed."
     if not os.path.isfile(ENV_FILE):
@@ -274,7 +260,6 @@ def main():
         source_rc_file()
         verify_deployment()
         install_rally()
-        generate_os_defaults()
 
         with open(ENV_FILE, "w") as env_file:
             env_file.write("1")