debug="--debug"
fi
-FUNCTEST_REPO_DIR=${repos_dir}/functest
-FUNCTEST_TEST_DIR=${repos_dir}/functest/functest/opnfv_tests
+FUNCTEST_REPO_DIR=${REPOS_DIR}/functest
+FUNCTEST_TEST_DIR=${REPOS_DIR}/functest/functest/opnfv_tests
FUNCTEST_CONF_DIR=/home/opnfv/functest/conf
export PYTHONUNBUFFERED=1
neutron_ip=$(openstack catalog show network | grep publicURL | cut -f3 -d"/" | cut -f1 -d":")
odl_ip=${neutron_ip}
odl_port=8080
+ odl_restport=8181
if [ "$INSTALLER_TYPE" == "fuel" ]; then
odl_port=8282
elif [ "$INSTALLER_TYPE" == "apex" ]; then
odl_ip=$SDN_CONTROLLER_IP
- odl_port=8181
+ odl_port=8081
+ odl_restport=8081
+ elif [ "$INSTALLER_TYPE" == "netvirt" ]; then
+ odl_ip=$SDN_CONTROLLER_IP
+ odl_port=8081
+ odl_restport=8081
elif [ "$INSTALLER_TYPE" == "joid" ]; then
odl_ip=$SDN_CONTROLLER
elif [ "$INSTALLER_TYPE" == "compass" ]; then
fi
}
-function sfc_prepare(){
- ids=($(neutron security-group-list|grep default|awk '{print $2}'))
- for id in ${ids[@]}; do
- if ! neutron security-group-show $id|grep "22/tcp" &>/dev/null; then
- neutron security-group-rule-create --protocol tcp \
- --port-range-min 22 --port-range-max 22 --direction ingress $id
- neutron security-group-rule-create --protocol tcp \
- --port-range-min 22 --port-range-max 22 --direction egress $id
- fi
- done
-}
+
function run_test(){
test_name=$1
case $test_name in
"healthcheck")
- ${FUNCTEST_TEST_DIR}/OpenStack/healthcheck/healthcheck.sh
+ ${FUNCTEST_TEST_DIR}/openstack/healthcheck/healthcheck.sh
;;
"odl")
odl_tests
[[ "$report" == "-r" ]] && args=-p
- ${FUNCTEST_TEST_DIR}/Controllers/ODL/OpenDaylightTesting.py \
- --keystoneip $keystone_ip --neutronip $neutron_ip \
- --osusername ${OS_USERNAME} --ostenantname ${OS_TENANT_NAME} \
+ ${FUNCTEST_TEST_DIR}/sdn/odl/odl.py \
+ --keystoneip $keystone_ip \
+ --neutronip $neutron_ip \
+ --odlip $odl_ip \
+ --odlrestconfport $odl_restport \
+ --odlwebport $odl_port \
--ospassword ${OS_PASSWORD} \
- --odlip $odl_ip --odlwebport $odl_port ${args}
- ;;
- "tempest_smoke_serial")
- python ${FUNCTEST_TEST_DIR}/OpenStack/tempest/run_tempest.py \
- $clean_flag -s -m smoke $report
- ;;
- "tempest_full_parallel")
- python ${FUNCTEST_TEST_DIR}/OpenStack/tempest/run_tempest.py \
- $serial_flag $clean_flag -m full $report
- ;;
- "vims")
- python ${FUNCTEST_TEST_DIR}/vnf/vIMS/vIMS.py $clean_flag $report
- ;;
- "rally_full")
- python ${FUNCTEST_TEST_DIR}/OpenStack/rally/run_rally-cert.py $clean_flag all $report
- ;;
- "rally_sanity")
- python ${FUNCTEST_TEST_DIR}/OpenStack/rally/run_rally-cert.py \
- $clean_flag --sanity all $report
- ;;
- "bgpvpn")
- sdnvpn_repo_dir=${repos_dir}/sdnvpn/test/functest/
- python ${sdnvpn_repo_dir}/run_tests.py $report
- ;;
- "onos")
- python ${FUNCTEST_TEST_DIR}/Controllers/ONOS/Teston/onosfunctest.py
- ;;
- "onos_sfc")
- python ${FUNCTEST_TEST_DIR}/Controllers/ONOS/Teston/onosfunctest.py -t sfc
- ;;
- "promise")
- python ${FUNCTEST_TEST_DIR}/features/promise.py $report
- sleep 10 # to let the instances terminate
- ;;
- "doctor")
- python ${FUNCTEST_TEST_DIR}/features/doctor.py $report
+ --ostenantname ${OS_TENANT_NAME} \
+ --osusername ${OS_USERNAME} \
+ ${args}
;;
"ovno")
# suite under rewritting for colorado
# no need to run anything until refactoring done
- # ${repos_dir}/ovno/Testcases/RunTests.sh
- ;;
- "security_scan")
- echo "Sourcing Credentials ${FUNCTEST_CONF_DIR}/stackrc for undercloud .."
- source ${FUNCTEST_CONF_DIR}/stackrc
- python ${repos_dir}/securityscanning/security_scan.py --config ${repos_dir}/securityscanning/config.ini
- ;;
- "copper")
- python ${FUNCTEST_TEST_DIR}/features/copper.py $report
- ;;
- "moon")
- python ${repos_dir}/moon/tests/run_tests.py $report
- ;;
- "multisite")
- python ${FUNCTEST_TEST_DIR}/OpenStack/tempest/gen_tempest_conf.py
- python ${FUNCTEST_TEST_DIR}/OpenStack/tempest/run_tempest.py \
- $clean_flag -s -m feature_multisite $report \
- -c ${FUNCTEST_TEST_DIR}/OpenStack/tempest/tempest_multisite.conf
- ;;
- "odl-sfc")
- ODL_SFC_DIR=${repos_dir}/sfc/tests/functest/odl-sfc
- FUNCTEST_REPO_DIR=${FUNCTEST_REPO_DIR} python ${ODL_SFC_DIR}/prepare_odl_sfc.py || exit $?
- source ${ODL_SFC_DIR}/tackerc
- python ${ODL_SFC_DIR}/sfc.py $report
- ;;
- "parser")
- python ${FUNCTEST_TEST_DIR}/vnf/vRNC/parser.py $report
+ # ${REPOS_DIR}/ovno/Testcases/RunTests.sh
;;
*)
echo "The test case '${test_name}' does not exist."
# Source credentials
-echo "Sourcing Credentials ${FUNCTEST_CONF_DIR}/openstack.creds to run the test.."
-source ${FUNCTEST_CONF_DIR}/openstack.creds
+echo "Sourcing Credentials ${creds} to run the test.."
+source ${creds}
-# ODL Boron workaround to create additional flow rules to allow port 22 TCP
-if [[ $DEPLOY_SCENARIO == *"odl_l2-sfc"* ]]; then
- sfc_prepare
-fi
# Run test
run_test $TEST