Change 'testcases' directory structure 63/14263/2
authorjose.lausuch <jose.lausuch@ericsson.com>
Tue, 17 May 2016 19:36:56 +0000 (21:36 +0200)
committerjose.lausuch <jose.lausuch@ericsson.com>
Tue, 17 May 2016 20:31:32 +0000 (22:31 +0200)
JIRA: FUNCTEST-226

- Remove all 'CI' subdirs
- Remove VIM dir and have OpenStack dir within /testcases/
- Split rally and tempest in 2 different dirs

Change-Id: Icfc76d18a84f7a18d93ae1a5ec7dc7a560bb7ce9
Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
60 files changed:
ci/config_functest.yaml
ci/exec_test.sh
ci/tier_handler.py
testcases/Controllers/ODL/custom_tests/neutron/010__networks.robot [moved from testcases/Controllers/ODL/CI/custom_tests/neutron/010__networks.robot with 100% similarity]
testcases/Controllers/ODL/custom_tests/neutron/020__subnets.robot [moved from testcases/Controllers/ODL/CI/custom_tests/neutron/020__subnets.robot with 100% similarity]
testcases/Controllers/ODL/custom_tests/neutron/030__ports.robot [moved from testcases/Controllers/ODL/CI/custom_tests/neutron/030__ports.robot with 100% similarity]
testcases/Controllers/ODL/custom_tests/neutron/040__delete_ports.txt [moved from testcases/Controllers/ODL/CI/custom_tests/neutron/040__delete_ports.txt with 100% similarity]
testcases/Controllers/ODL/custom_tests/neutron/050__delete_subnets.txt [moved from testcases/Controllers/ODL/CI/custom_tests/neutron/050__delete_subnets.txt with 100% similarity]
testcases/Controllers/ODL/custom_tests/neutron/060__delete_networks.txt [moved from testcases/Controllers/ODL/CI/custom_tests/neutron/060__delete_networks.txt with 100% similarity]
testcases/Controllers/ODL/odlreport2db.py [moved from testcases/Controllers/ODL/CI/odlreport2db.py with 100% similarity]
testcases/Controllers/ODL/start_tests.sh [moved from testcases/Controllers/ODL/CI/start_tests.sh with 100% similarity]
testcases/Controllers/ODL/test_list.txt [moved from testcases/Controllers/ODL/CI/test_list.txt with 100% similarity]
testcases/Controllers/ONOS/Teston/Readme.txt [moved from testcases/Controllers/ONOS/Teston/CI/Readme.txt with 100% similarity]
testcases/Controllers/ONOS/Teston/__init__.py [moved from testcases/Controllers/ONOS/Teston/CI/__init__.py with 100% similarity]
testcases/Controllers/ONOS/Teston/adapters/__init__.py [moved from testcases/Controllers/ONOS/Teston/CI/adapters/__init__.py with 100% similarity]
testcases/Controllers/ONOS/Teston/adapters/client.py [moved from testcases/Controllers/ONOS/Teston/CI/adapters/client.py with 100% similarity]
testcases/Controllers/ONOS/Teston/adapters/connection.py [moved from testcases/Controllers/ONOS/Teston/CI/adapters/connection.py with 100% similarity]
testcases/Controllers/ONOS/Teston/adapters/environment.py [moved from testcases/Controllers/ONOS/Teston/CI/adapters/environment.py with 100% similarity]
testcases/Controllers/ONOS/Teston/adapters/foundation.py [moved from testcases/Controllers/ONOS/Teston/CI/adapters/foundation.py with 100% similarity]
testcases/Controllers/ONOS/Teston/dependencies/onos [moved from testcases/Controllers/ONOS/Teston/CI/dependencies/onos with 100% similarity]
testcases/Controllers/ONOS/Teston/log/gitignore [moved from testcases/Controllers/ONOS/Teston/CI/log/gitignore with 100% similarity]
testcases/Controllers/ONOS/Teston/onosfunctest.py [moved from testcases/Controllers/ONOS/Teston/CI/onosfunctest.py with 98% similarity]
testcases/OpenStack/healthcheck/healthcheck.sh [moved from testcases/VIM/OpenStack/CI/libraries/healthcheck.sh with 100% similarity]
testcases/OpenStack/rally/macro/macro.yaml [moved from testcases/VIM/OpenStack/CI/rally_cert/macro/macro.yaml with 100% similarity]
testcases/OpenStack/rally/run_rally-cert.py [moved from testcases/VIM/OpenStack/CI/libraries/run_rally-cert.py with 98% similarity]
testcases/OpenStack/rally/scenario/opnfv-authenticate.yaml [moved from testcases/VIM/OpenStack/CI/rally_cert/scenario/opnfv-authenticate.yaml with 100% similarity]
testcases/OpenStack/rally/scenario/opnfv-cinder.yaml [moved from testcases/VIM/OpenStack/CI/rally_cert/scenario/opnfv-cinder.yaml with 100% similarity]
testcases/OpenStack/rally/scenario/opnfv-glance.yaml [moved from testcases/VIM/OpenStack/CI/rally_cert/scenario/opnfv-glance.yaml with 100% similarity]
testcases/OpenStack/rally/scenario/opnfv-heat.yaml [moved from testcases/VIM/OpenStack/CI/rally_cert/scenario/opnfv-heat.yaml with 100% similarity]
testcases/OpenStack/rally/scenario/opnfv-keystone.yaml [moved from testcases/VIM/OpenStack/CI/rally_cert/scenario/opnfv-keystone.yaml with 100% similarity]
testcases/OpenStack/rally/scenario/opnfv-neutron.yaml [moved from testcases/VIM/OpenStack/CI/rally_cert/scenario/opnfv-neutron.yaml with 100% similarity]
testcases/OpenStack/rally/scenario/opnfv-nova.yaml [moved from testcases/VIM/OpenStack/CI/rally_cert/scenario/opnfv-nova.yaml with 100% similarity]
testcases/OpenStack/rally/scenario/opnfv-quotas.yaml [moved from testcases/VIM/OpenStack/CI/rally_cert/scenario/opnfv-quotas.yaml with 100% similarity]
testcases/OpenStack/rally/scenario/opnfv-requests.yaml [moved from testcases/VIM/OpenStack/CI/rally_cert/scenario/opnfv-requests.yaml with 100% similarity]
testcases/OpenStack/rally/scenario/opnfv-smoke.yaml [moved from testcases/VIM/OpenStack/CI/rally_cert/scenario/opnfv-smoke.yaml with 100% similarity]
testcases/OpenStack/rally/scenario/opnfv-vm.yaml [moved from testcases/VIM/OpenStack/CI/rally_cert/scenario/opnfv-vm.yaml with 100% similarity]
testcases/OpenStack/rally/scenario/support/instance_dd_test.sh [moved from testcases/VIM/OpenStack/CI/rally_cert/scenario/support/instance_dd_test.sh with 100% similarity]
testcases/OpenStack/rally/scenario/templates/autoscaling_policy.yaml.template [moved from testcases/VIM/OpenStack/CI/rally_cert/scenario/templates/autoscaling_policy.yaml.template with 100% similarity]
testcases/OpenStack/rally/scenario/templates/default.yaml.template [moved from testcases/VIM/OpenStack/CI/rally_cert/scenario/templates/default.yaml.template with 100% similarity]
testcases/OpenStack/rally/scenario/templates/random_strings.yaml.template [moved from testcases/VIM/OpenStack/CI/rally_cert/scenario/templates/random_strings.yaml.template with 100% similarity]
testcases/OpenStack/rally/scenario/templates/resource_group.yaml.template [moved from testcases/VIM/OpenStack/CI/rally_cert/scenario/templates/resource_group.yaml.template with 100% similarity]
testcases/OpenStack/rally/scenario/templates/server_with_ports.yaml.template [moved from testcases/VIM/OpenStack/CI/rally_cert/scenario/templates/server_with_ports.yaml.template with 100% similarity]
testcases/OpenStack/rally/scenario/templates/server_with_volume.yaml.template [moved from testcases/VIM/OpenStack/CI/rally_cert/scenario/templates/server_with_volume.yaml.template with 100% similarity]
testcases/OpenStack/rally/scenario/templates/updated_autoscaling_policy_inplace.yaml.template [moved from testcases/VIM/OpenStack/CI/rally_cert/scenario/templates/updated_autoscaling_policy_inplace.yaml.template with 100% similarity]
testcases/OpenStack/rally/scenario/templates/updated_random_strings_add.yaml.template [moved from testcases/VIM/OpenStack/CI/rally_cert/scenario/templates/updated_random_strings_add.yaml.template with 100% similarity]
testcases/OpenStack/rally/scenario/templates/updated_random_strings_delete.yaml.template [moved from testcases/VIM/OpenStack/CI/rally_cert/scenario/templates/updated_random_strings_delete.yaml.template with 100% similarity]
testcases/OpenStack/rally/scenario/templates/updated_random_strings_replace.yaml.template [moved from testcases/VIM/OpenStack/CI/rally_cert/scenario/templates/updated_random_strings_replace.yaml.template with 100% similarity]
testcases/OpenStack/rally/scenario/templates/updated_resource_group_increase.yaml.template [moved from testcases/VIM/OpenStack/CI/rally_cert/scenario/templates/updated_resource_group_increase.yaml.template with 100% similarity]
testcases/OpenStack/rally/scenario/templates/updated_resource_group_reduce.yaml.template [moved from testcases/VIM/OpenStack/CI/rally_cert/scenario/templates/updated_resource_group_reduce.yaml.template with 100% similarity]
testcases/OpenStack/rally/task.yaml [moved from testcases/VIM/OpenStack/CI/rally_cert/task.yaml with 100% similarity]
testcases/OpenStack/tempest/custom_tests/defcore_req.txt [moved from testcases/VIM/OpenStack/CI/custom_tests/defcore_req.txt with 100% similarity]
testcases/OpenStack/tempest/run_tempest.py [moved from testcases/VIM/OpenStack/CI/libraries/run_tempest.py with 100% similarity]
testcases/OpenStack/vPing/ping.sh [moved from testcases/vPing/CI/libraries/ping.sh with 100% similarity]
testcases/OpenStack/vPing/vPing_ssh.py [moved from testcases/vPing/CI/libraries/vPing_ssh.py with 99% similarity]
testcases/OpenStack/vPing/vPing_userdata.py [moved from testcases/vPing/CI/libraries/vPing_userdata.py with 100% similarity]
testcases/vIMS/clearwater.py [moved from testcases/vIMS/CI/clearwater.py with 100% similarity]
testcases/vIMS/create_venv.sh [moved from testcases/vIMS/CI/create_venv.sh with 100% similarity]
testcases/vIMS/orchestrator.py [moved from testcases/vIMS/CI/orchestrator.py with 100% similarity]
testcases/vIMS/requirements.pip [moved from testcases/vIMS/CI/requirements.pip with 100% similarity]
testcases/vIMS/vIMS.py [moved from testcases/vIMS/CI/vIMS.py with 100% similarity]

index 29a74af..ab620f0 100644 (file)
@@ -1,13 +1,12 @@
 general:
     directories:
         # Relative to the path where the repo is cloned:
-        dir_vping:         testcases/vPing/CI/libraries/
-        dir_odl:           testcases/Controllers/ODL/CI/
-        dir_rally:         testcases/VIM/OpenStack/CI/libraries/
-        dir_rally_scn:     testcases/VIM/OpenStack/CI/rally_cert/
-        dir_tempest_cases: testcases/VIM/OpenStack/CI/custom_tests/
-        dir_vIMS:          testcases/vIMS/CI/
-        dir_onos:          testcases/Controllers/ONOS/Teston/CI/
+        dir_vping:         testcases/OpenStack/vPing/
+        dir_odl:           testcases/Controllers/ODL/
+        dir_rally:         testcases/OpenStack/rally/
+        dir_tempest_cases: testcases/OpenStack/tempest/custom_tests/
+        dir_vIMS:          testcases/vIMS/
+        dir_onos:          testcases/Controllers/ONOS/Teston/
 
         # Absolute path
         dir_repos:          /home/opnfv/repos
index 013b98c..61d00c7 100755 (executable)
@@ -69,61 +69,57 @@ function run_test(){
 
     case $test_name in
         "healthcheck")
-            ${FUNCTEST_REPO_DIR}/testcases/VIM/OpenStack/CI/libraries/healthcheck.sh
+            ${FUNCTEST_REPO_DIR}/testcases/OpenStack/healthcheck/healthcheck.sh
         ;;
         "vping_ssh")
-            python ${FUNCTEST_REPO_DIR}/testcases/vPing/CI/libraries/vPing_ssh.py \
-                $debug $report
+            python ${FUNCTEST_REPO_DIR}/testcases/vPing/vPing_ssh.py $report
         ;;
         "vping_userdata")
-            python ${FUNCTEST_REPO_DIR}/testcases/vPing/CI/libraries/vPing_userdata.py \
-                $debug $report
+            python ${FUNCTEST_REPO_DIR}/testcases/vPing/vPing_userdata.py $report
         ;;
         "odl")
             odl_tests
             ODL_PORT=$odl_port ODL_IP=$odl_ip KEYSTONE_IP=$keystone_ip NEUTRON_IP=$neutron_ip USR_NAME=${OS_USERNAME} PASS=${OS_PASSWORD} \
-                ${FUNCTEST_REPO_DIR}/testcases/Controllers/ODL/CI/start_tests.sh
+                ${FUNCTEST_REPO_DIR}/testcases/Controllers/ODL/start_tests.sh
 
             # push results to the DB in case of CI
             if [[ -n "$DEPLOY_SCENARIO" && "$DEPLOY_SCENARIO" != "none" ]]; then
                 odl_logs="/home/opnfv/functest/results/odl/logs/2"
-                odl_path="${FUNCTEST_REPO_DIR}/testcases/Controllers/ODL/CI"
+                odl_path="${FUNCTEST_REPO_DIR}/testcases/Controllers/ODL/"
                 node_name=$(env | grep NODE_NAME | cut -f2 -d'=')
                 python ${odl_path}/odlreport2db.py -x ${odl_logs}/output.xml -i ${INSTALLER_TYPE} -p ${node_name} -s ${DEPLOY_SCENARIO}
             fi
         ;;
         "tempest_smoke_serial")
-            python ${FUNCTEST_REPO_DIR}/testcases/VIM/OpenStack/CI/libraries/run_tempest.py \
-                $debug $clean_flag -s -m smoke $report
+            python ${FUNCTEST_REPO_DIR}/testcases/OpenStack/tempest/run_tempest.py \
+                $clean_flag -s -m smoke $report
         ;;
         "tempest_full_parallel")
-            python ${FUNCTEST_REPO_DIR}/testcases/VIM/OpenStack/CI/libraries/run_tempest.py \
-                $debug $serial_flag $clean_flag -m full $report
+            python ${FUNCTEST_REPO_DIR}/testcases/OpenStack/tempest/run_tempest.py \
+                $serial_flag $clean_flag -m full $report
         ;;
         "vims")
-            python ${FUNCTEST_REPO_DIR}/testcases/vIMS/CI/vIMS.py \
-                $debug $clean_flag $report
+            python ${FUNCTEST_REPO_DIR}/testcases/vIMS/vIMS.py $clean_flag $report
         ;;
         "rally_full")
-            python ${FUNCTEST_REPO_DIR}/testcases/VIM/OpenStack/CI/libraries/run_rally-cert.py \
-                $debug $clean_flag all $report
+            python ${FUNCTEST_REPO_DIR}/testcases/OpenStack/rally/run_rally-cert.py $clean_flag all $report
         ;;
         "rally_sanity")
-            python ${FUNCTEST_REPO_DIR}/testcases/VIM/OpenStack/CI/libraries/run_rally-cert.py \
-                $debug $clean_flag --sanity all $report
+            python ${FUNCTEST_REPO_DIR}/testcases/OpenStack/rally/run_rally-cert.py \
+                $clean_flag --sanity all $report
         ;;
         "bgpvpn")
             python ${FUNCTEST_REPO_DIR}/testcases/features/bgpvpn.py
         ;;
         "onos")
             if [ "$INSTALLER_TYPE" == "joid" ]; then
-                python ${FUNCTEST_REPO_DIR}/testcases/Controllers/ONOS/Teston/CI/onosfunctest.py -i joid
+                python ${FUNCTEST_REPO_DIR}/testcases/Controllers/ONOS/Teston/onosfunctest.py -i joid
             else
-                python ${FUNCTEST_REPO_DIR}/testcases/Controllers/ONOS/Teston/CI/onosfunctest.py
+                python ${FUNCTEST_REPO_DIR}/testcases/Controllers/ONOS/Teston/onosfunctest.py
             fi
       ;;
         "promise")
-            python ${FUNCTEST_REPO_DIR}/testcases/features/promise.py $debug $report
+            python ${FUNCTEST_REPO_DIR}/testcases/features/promise.py $report
             sleep 10 # to let the instances terminate
         ;;
         "doctor")
index 2fc7a9c..03db4a9 100644 (file)
@@ -74,7 +74,7 @@ class Tier:
         return self.ci_loop
 
     def __str__(self):
-        lines = split_text(self.description, LINE_LENGTH-6)
+        lines = split_text(self.description, LINE_LENGTH - 6)
 
         out = ""
         out += ("+%s+\n" % ("=" * (LINE_LENGTH - 2)))
@@ -120,7 +120,7 @@ class TestCase:
         return self.name
 
     def __str__(self):
-        lines = split_text(self.description, LINE_LENGTH-6)
+        lines = split_text(self.description, LINE_LENGTH - 6)
 
         out = ""
         out += ("+%s+\n" % ("=" * (LINE_LENGTH - 2)))
@@ -45,7 +45,7 @@ if not os.path.exists(REPO_PATH):
     logger.error("Functest repository directory not found '%s'" % REPO_PATH)
     exit(-1)
 
-ONOSCI_PATH = REPO_PATH + 'testcases/Controllers/ONOS/Teston/CI/'
+ONOSCI_PATH = REPO_PATH + 'testcases/Controllers/ONOS/Teston/'
 starttime = datetime.datetime.now()
 
 HOME = os.environ['HOME'] + "/"
similarity index 98%
rename from testcases/VIM/OpenStack/CI/libraries/run_rally-cert.py
rename to testcases/OpenStack/rally/run_rally-cert.py
index 4dc1e16..c3dd304 100755 (executable)
@@ -88,10 +88,10 @@ with open(os.environ["CONFIG_FUNCTEST_YAML"]) as f:
 f.close()
 
 HOME = os.environ['HOME'] + "/"
-SCENARIOS_DIR = REPO_PATH + functest_yaml.get("general").get(
-    "directories").get("dir_rally_scn")
-TEMPLATE_DIR = SCENARIOS_DIR + "scenario/templates"
-SUPPORT_DIR = SCENARIOS_DIR + "scenario/support"
+RALLY_DIR = REPO_PATH + functest_yaml.get("general").get(
+    "directories").get("dir_rally")
+TEMPLATE_DIR = RALLY_DIR + "scenario/templates"
+SUPPORT_DIR = RALLY_DIR + "scenario/support"
 
 FLAVOR_NAME = "m1.tiny"
 USERS_AMOUNT = 2
@@ -304,12 +304,12 @@ def run_task(test_name):
     global SUMMARY
     logger.info('Starting test scenario "{}" ...'.format(test_name))
 
-    task_file = '{}task.yaml'.format(SCENARIOS_DIR)
+    task_file = '{}task.yaml'.format(RALLY_DIR)
     if not os.path.exists(task_file):
         logger.error("Task file '%s' does not exist." % task_file)
         exit(-1)
 
-    test_file_name = '{}opnfv-{}.yaml'.format(SCENARIOS_DIR + "scenario/",
+    test_file_name = '{}opnfv-{}.yaml'.format(RALLY_DIR + "scenario/",
                                               test_name)
     if not os.path.exists(test_file_name):
         logger.error("The scenario '%s' does not exist." % test_file_name)
similarity index 99%
rename from testcases/vPing/CI/libraries/vPing_ssh.py
rename to testcases/OpenStack/vPing/vPing_ssh.py
index fa9770b..5b392e8 100644 (file)
@@ -393,7 +393,7 @@ def main():
 
     scp = SCPClient(ssh.get_transport())
 
-    ping_script = REPO_PATH + "testcases/vPing/CI/libraries/ping.sh"
+    ping_script = REPO_PATH + "testcases/vPing/ping.sh"
     try:
         scp.put(ping_script, "~/")
     except: