aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--docker/Dockerfile1
-rwxr-xr-xdocker/common.sh4
-rwxr-xr-xdocker/run_tests.sh33
-rwxr-xr-xtestcases/VIM/OpenStack/CI/libraries/check_os.sh28
-rw-r--r--testcases/VIM/OpenStack/CI/libraries/os_defaults.yaml2
-rwxr-xr-xtestcases/config_functest.py2
-rw-r--r--testcases/config_functest.yaml5
-rw-r--r--testcases/vPing/CI/libraries/vPing.py18
8 files changed, 68 insertions, 25 deletions
diff --git a/docker/Dockerfile b/docker/Dockerfile
index 69c2bd48..0765eb84 100644
--- a/docker/Dockerfile
+++ b/docker/Dockerfile
@@ -66,6 +66,7 @@ RUN git clone -b stable https://github.com/boucherv-orange/clearwater-live-test
RUN git clone https://github.com/openstack/networking-bgpvpn ${repos_dir}/bgpvpn
RUN git clone https://gerrit.onosproject.org/OnosSystemTest ${repos_dir}/onos
RUN git clone https://github.com/opnfv/promise ${repos_dir}/promise
+RUN git clone https://gerrit.opnfv.org/gerrit/ovno ${repos_dir}/ovno
RUN pip install -r ${repos_dir}/functest/docker/requirements.pip
RUN pip install -r ${repos_dir}/rally/requirements.txt
diff --git a/docker/common.sh b/docker/common.sh
index d61e9576..1f1cc75d 100755
--- a/docker/common.sh
+++ b/docker/common.sh
@@ -65,6 +65,8 @@ ONOS_BRANCH=$(cat $config_file | grep -w onos_branch | awk 'END {print $NF}')
ONOS_COMMIT=$(cat $config_file | grep -w onos_commit | awk 'END {print $NF}')
PROMISE_BRANCH=$(cat $config_file | grep -w promise_branch | awk 'END {print $NF}')
PROMISE_COMMIT=$(cat $config_file | grep -w promise_commit | awk 'END {print $NF}')
+OVNO_BRANCH=$(cat $config_file | grep -w ovno_branch | awk 'END {print $NF}')
+OVNO_COMMIT=$(cat $config_file | grep -w ovno_commit | awk 'END {print $NF}')
echo "_____Parsed needed data from ${config_file}:"
@@ -90,6 +92,8 @@ echo "ONOS_BRANCH=${ONOS_BRANCH}"
echo "ONOS_COMMIT=${ONOS_COMMIT}"
echo "PROMISE_BRANCH=${PROMISE_BRANCH}"
echo "PROMISE_COMMIT=${PROMISE_COMMIT}"
+echo "OVNO_BRANCH=${OVNO_BRANCH}"
+echo "OVNO_COMMIT=${OVNO_COMMIT}"
echo "############################"
info () {
diff --git a/docker/run_tests.sh b/docker/run_tests.sh
index 97bbfefe..cb6fb0c8 100755
--- a/docker/run_tests.sh
+++ b/docker/run_tests.sh
@@ -10,20 +10,19 @@
usage="Script to trigger the tests automatically.
usage:
- bash $(basename "$0") [--offline] [-h|--help] [-t <test_name>]
+ bash $(basename "$0") [-h|--help] [-t <test_name>]
where:
- -o|--offline optional offline mode (experimental)
-h|--help show this help text
-r|--report push results to database (false by default)
-t|--test run specific set of tests
- <test_name> one or more of the following: vping,odl,rally,tempest,vims,onos, promise. Separated by comma.
+ <test_name> one or more of the following: vping,odl,rally,tempest,vims,onos,promise,ovno. Separated by comma.
examples:
$(basename "$0")
$(basename "$0") --test vping,odl
- $(basename "$0") --offline -t tempest,rally"
+ $(basename "$0") -t tempest,rally"
# Support for Functest offline
@@ -32,12 +31,7 @@ offline=false
report=""
# Get the list of runnable tests
# Check if we are in CI mode
-if [[ -n "$DEPLOY_SCENARIO" && "$DEPLOY_SCENARIO" != "none" ]]; then
- testcase=`cat /home/opnfv/functest/conf/testcase-list.txt`
- arr_test=("$testcase")
-else
- arr_test=(vping tempest vims rally)
-fi
+
function clean_openstack(){
echo -e "\n\nCleaning Openstack environment..."
@@ -50,7 +44,7 @@ function run_test(){
test_name=$1
echo ""
echo "----------------------------------------------"
- echo " Running test case: $i"
+ echo " Running test cases: $i"
echo "----------------------------------------------"
echo ""
case $test_name in
@@ -138,6 +132,10 @@ function run_test(){
info "Running Doctor test..."
python ${FUNCTEST_REPO_DIR}/testcases/features/doctor.py
;;
+ "ovno")
+ info "Running OpenContrail test..."
+ # TODO
+ ;;
esac
}
@@ -170,6 +168,17 @@ while [[ $# > 0 ]]
shift # past argument or value
done
+
+tests_file="/home/opnfv/functest/conf/testcase-list.txt"
+if [[ -n "$DEPLOY_SCENARIO" && "$DEPLOY_SCENARIO" != "none" ]] &&\
+ [[ -f $tests_file ]]; then
+ echo "testcase-list.txt content:";cat $test_file; echo ""
+ arr_test=($(cat $tests_file))
+else
+ arr_test=(vping tempest vims rally)
+fi
+echo "arr_test: "${arr_test[@]}
+
BASEDIR=`dirname $0`
source ${BASEDIR}/common.sh
@@ -208,7 +217,7 @@ if [ "${TEST}" != "" ]; then
run_test $i
done
else
- info "Executing all the tests"
+ info "Executing tests..."
for i in "${arr_test[@]}"; do
run_test $i
done
diff --git a/testcases/VIM/OpenStack/CI/libraries/check_os.sh b/testcases/VIM/OpenStack/CI/libraries/check_os.sh
index 56020526..63d4ea69 100755
--- a/testcases/VIM/OpenStack/CI/libraries/check_os.sh
+++ b/testcases/VIM/OpenStack/CI/libraries/check_os.sh
@@ -31,7 +31,7 @@ echo ">>Verifying connectivity to the public endpoint $publicIP:$publicPort..."
verify_connectivity $publicIP $publicPort
RETVAL=$?
if [ $RETVAL -ne 0 ]; then
- echo "ERROR: Cannot talk to the public endpoint publicIP:$publicPort ."
+ echo "ERROR: Cannot talk to the public endpoint $publicIP:$publicPort ."
echo "OS_AUTH_URL=$OS_AUTH_URL"
exit 1
fi
@@ -44,8 +44,8 @@ echo ">>Verifying connectivity to the admin endpoint $adminIP:$adminPort..."
verify_connectivity $adminIP $adminPort
RETVAL=$?
if [ $RETVAL -ne 0 ]; then
- echo "ERROR: Cannot talk to the admin endpoint adminIP:$adminPort ."
- echo "adminURL"
+ echo "ERROR: Cannot talk to the admin endpoint $adminIP:$adminPort ."
+ echo "$adminURL"
exit 1
fi
echo " ...OK"
@@ -88,4 +88,26 @@ if [ $is_external == "False" ]; then
exit 1
fi
+
+# Temporary output information
+# To see the initial OpenStack defaults
+# in case we delete something later on.
+# This is to be removed for the release
+echo "nova list:"
+nova list
+echo "cinder list"
+cinder list
+echo "nova floating-ip-list:"
+nova floating-ip-list
+echo "neutron net-list:"
+neutron net-list
+echo "neutron router-list:"
+neutron router-list
+echo "neutron security-group-list:"
+neutron security-group-list
+echo "keystone tenant-list:"
+keystone tenant-list
+echo "keystone user-list:"
+keystone user-list
+
exit 0
diff --git a/testcases/VIM/OpenStack/CI/libraries/os_defaults.yaml b/testcases/VIM/OpenStack/CI/libraries/os_defaults.yaml
index f792cda5..c8ec1522 100644
--- a/testcases/VIM/OpenStack/CI/libraries/os_defaults.yaml
+++ b/testcases/VIM/OpenStack/CI/libraries/os_defaults.yaml
@@ -25,7 +25,7 @@ joid:
routers: []
security_groups: ['default']
tenants: ['admin', 'services']
- users: ['admin', 'glance', 'nova', 'quantum_nova', 'quantum', 'heat-cfn_heat', 'ceilometer', 'cinder_cinderv2', 'swift']
+ users: ['admin', 'glance', 'nova', 'neutron', 'heat-cfn_heat', 'ceilometer', 'cinder_cinderv2', 'swift']
common:
networks: ['functest-net']
routers: ['functest-router']
diff --git a/testcases/config_functest.py b/testcases/config_functest.py
index 199fadfd..70a7d6cd 100755
--- a/testcases/config_functest.py
+++ b/testcases/config_functest.py
@@ -211,7 +211,7 @@ def action_clean():
logger.debug("Cleaning up the OpenStack deployment...")
cmd='python ' + REPO_PATH + \
- '/testcases/VIM/OpenStack/CI/libraries/clean_openstack.py'
+ '/testcases/VIM/OpenStack/CI/libraries/clean_openstack.py --debug'
functest_utils.execute_command(cmd,logger)
logger.info("Functest environment clean!")
diff --git a/testcases/config_functest.yaml b/testcases/config_functest.yaml
index 7c1e79d3..6a612067 100644
--- a/testcases/config_functest.yaml
+++ b/testcases/config_functest.yaml
@@ -18,6 +18,7 @@ general:
dir_repo_onos: /home/opnfv/repos/onos
dir_repo_promise: /home/opnfv/repos/promise
dir_repo_doctor: /home/opnfv/repos/doctor
+ dir_repo_ovno: /home/opnfv/repos/ovno
dir_functest: /home/opnfv/functest
dir_results: /home/opnfv/functest/results
dir_functest_conf: /home/opnfv/functest/conf
@@ -40,6 +41,8 @@ general:
onos_commit: latest
promise_branch: master
promise_commit: latest
+ ovno_branch: master
+ ovno_commit: latest
openstack:
image_name: functest-img
@@ -158,7 +161,7 @@ test_exec_priority:
2: tempest
3: odl
4: onos
- #5: ovno
+ 5: ovno
#6: doctor
7: promise
#8: policy-test
diff --git a/testcases/vPing/CI/libraries/vPing.py b/testcases/vPing/CI/libraries/vPing.py
index be0d2341..b87de850 100644
--- a/testcases/vPing/CI/libraries/vPing.py
+++ b/testcases/vPing/CI/libraries/vPing.py
@@ -56,7 +56,7 @@ formatter = logging.Formatter('%(asctime)s - %(name)s'
ch.setFormatter(formatter)
logger.addHandler(ch)
-REPO_PATH=os.environ['repos_dir']+'/functest/'
+REPO_PATH = os.environ['repos_dir']+'/functest/'
if not os.path.exists(REPO_PATH):
logger.error("Functest repository directory not found '%s'" % REPO_PATH)
exit(-1)
@@ -274,13 +274,13 @@ def cleanup(nova, neutron, image_id, network_dic, port_id1, port_id2):
def main():
creds_nova = functest_utils.get_credentials("nova")
- nova_client = novaclient.Client('2',**creds_nova)
+ nova_client = novaclient.Client('2', **creds_nova)
creds_neutron = functest_utils.get_credentials("neutron")
neutron_client = neutronclient.Client(**creds_neutron)
creds_keystone = functest_utils.get_credentials("keystone")
keystone_client = keystoneclient.Client(**creds_keystone)
glance_endpoint = keystone_client.service_catalog.url_for(service_type='image',
- endpoint_type='publicURL')
+ endpoint_type='publicURL')
glance_client = glanceclient.Client(1, glance_endpoint,
token=keystone_client.auth_token)
EXIT_CODE = -1
@@ -291,7 +291,8 @@ def main():
logger.debug("Creating image '%s' from '%s'..." % (GLANCE_IMAGE_NAME,
GLANCE_IMAGE_PATH))
image_id = functest_utils.create_glance_image(glance_client,
- GLANCE_IMAGE_NAME,GLANCE_IMAGE_PATH)
+ GLANCE_IMAGE_NAME,
+ GLANCE_IMAGE_PATH)
if not image_id:
logger.error("Failed to create a Glance image...")
exit(-1)
@@ -419,7 +420,8 @@ def main():
if not waitVmActive(nova_client, vm2):
logger.error("Instance '%s' cannot be booted. Status is '%s'" % (
NAME_VM_2, functest_utils.get_instance_status(nova_client, vm2)))
- cleanup(nova_client, neutron_client, image_id, network_dic, port_id1, port_id2)
+ cleanup(nova_client, neutron_client, image_id, network_dic,
+ port_id1, port_id2)
return (EXIT_CODE)
else:
logger.info("Instance '%s' is ACTIVE." % NAME_VM_2)
@@ -427,6 +429,7 @@ def main():
logger.info("Waiting for ping...")
sec = 0
console_log = vm2.get_console_output()
+ duration = 0
while True:
time.sleep(1)
@@ -449,7 +452,8 @@ def main():
logger.debug("No vPing detected...")
sec += 1
- cleanup(nova_client, neutron_client, image_id, network_dic, port_id1, port_id2)
+ cleanup(nova_client, neutron_client, image_id, network_dic,
+ port_id1, port_id2)
test_status = "NOK"
if EXIT_CODE == 0:
@@ -474,7 +478,7 @@ def main():
# json.dump({'timestart': start_time_ts, 'duration': duration,
# 'status': test_status}, outfile, indent=4)
except:
- logger.error("Error pushing results into Database")
+ logger.error("Error pushing results into Database '%s'" % sys.exc_info()[0])
exit(EXIT_CODE)