aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--docker/Dockerfile2
-rwxr-xr-xdocker/common.sh46
-rwxr-xr-xdocker/prepare_env.sh135
-rw-r--r--docker/requirements.pip4
-rwxr-xr-xdocker/run_tests.sh24
-rwxr-xr-xtestcases/VIM/OpenStack/CI/libraries/healthcheck.sh170
-rwxr-xr-xtestcases/VIM/OpenStack/CI/libraries/run_rally-cert.py11
-rwxr-xr-xtestcases/VIM/OpenStack/CI/libraries/test_openstack.sh117
-rw-r--r--testcases/config_functest.yaml46
9 files changed, 209 insertions, 346 deletions
diff --git a/docker/Dockerfile b/docker/Dockerfile
index 71032a45a..876033d42 100644
--- a/docker/Dockerfile
+++ b/docker/Dockerfile
@@ -67,7 +67,7 @@ RUN git config --global http.sslVerify false
RUN git clone https://gerrit.opnfv.org/gerrit/functest ${repos_dir}/functest
RUN git clone https://gerrit.opnfv.org/gerrit/releng ${repos_dir}/releng
RUN git clone https://gerrit.opnfv.org/gerrit/doctor ${repos_dir}/doctor
-RUN git clone https://github.com/openstack/rally.git ${repos_dir}/rally
+RUN git clone -b 0.3.3 clone https://github.com/openstack/rally.git ${repos_dir}/rally
RUN git clone https://github.com/openstack/tempest.git ${repos_dir}/tempest
RUN git clone https://github.com/opendaylight/integration.git ${repos_dir}/odl_integration
RUN git clone -b stable https://github.com/boucherv-orange/clearwater-live-test ${repos_dir}/vims-test
diff --git a/docker/common.sh b/docker/common.sh
index 0d2cfb9b0..ccb653f88 100755
--- a/docker/common.sh
+++ b/docker/common.sh
@@ -61,52 +61,6 @@ FUNCTEST_CONF_DIR=$(cat $config_file | grep -w dir_functest_conf | awk 'END {pri
FUNCTEST_DATA_DIR=$(cat $config_file | grep -w dir_functest_data | awk 'END {print $NF}')
RALLY_VENV_DIR=$(cat $config_file | grep -w dir_rally_inst | awk 'END {print $NF}')
-# Repos
-RALLY_BRANCH=$(cat $config_file | grep -w rally_branch | awk 'END {print $NF}')
-RALLY_COMMIT=$(cat $config_file | grep -w rally_commit | awk 'END {print $NF}')
-RELENG_BRANCH=$(cat $config_file | grep -w releng_branch | awk 'END {print $NF}')
-RELENG_COMMIT=$(cat $config_file | grep -w releng_commit | awk 'END {print $NF}')
-VIMS_BRANCH=$(cat $config_file | grep -w vims_test_branch | awk 'END {print $NF}')
-VIMS_COMMIT=$(cat $config_file | grep -w vims_test_commit | awk 'END {print $NF}')
-BGPVPN_BRANCH=$(cat $config_file | grep -w bgpvpn_branch | awk 'END {print $NF}')
-BGPVPN_COMMIT=$(cat $config_file | grep -w bgpvpn_commit | awk 'END {print $NF}')
-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}')
-DOCTOR_BRANCH=$(cat $config_file | grep -w doctor_branch | awk 'END {print $NF}')
-DOCTOR_COMMIT=$(cat $config_file | grep -w doctor_commit | awk 'END {print $NF}')
-
-echo "_____Parsed needed data from ${config_file}:"
-echo "####### Directories #######"
-echo "REPOS_DIR=${REPOS_DIR}"
-echo "FUNCTEST_REPO_DIR=${FUNCTEST_REPO_DIR}"
-echo "RALLY_REPO_DIR=${RALLY_REPO_DIR}"
-echo "RELENG_REPO_DIR=${RELENG_REPO_DIR}"
-echo "VIMS_REPO_DIR=${VIMS_REPO_DIR}"
-echo "FUNCTEST_DIR=${FUNCTEST_DIR}"
-echo "FUNCTEST_RESULTS_DIR=${FUNCTEST_RESULTS_DIR}"
-echo "FUNCTEST_CONF_DIR=${FUNCTEST_CONF_DIR}"
-echo "FUNCTEST_DATA_DIR=${FUNCTEST_DATA_DIR}"
-echo "RALLY_VENV_DIR=${RALLY_VENV_DIR}"
-echo "####### Repositories #######"
-echo "RELENG_BRANCH=${RELENG_BRANCH}"
-echo "RELENG_COMMIT=${RELENG_COMMIT}"
-echo "RALLY_BRANCH=${RALLY_BRANCH}"
-echo "RALLY_COMMIT=${RALLY_COMMIT}"
-echo "VIMS_BRANCH=${VIMS_BRANCH}"
-echo "VIMS_COMMIT=${VIMS_COMMIT}"
-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 "DOCTOR_BRANCH=${DOCTOR_BRANCH}"
-echo "DOCTOR_COMMIT=${DOCTOR_COMMIT}"
-echo "############################"
info () {
logger -s -t "FUNCTEST.info" "$*"
diff --git a/docker/prepare_env.sh b/docker/prepare_env.sh
index 58fa514ec..c9bc99201 100755
--- a/docker/prepare_env.sh
+++ b/docker/prepare_env.sh
@@ -16,17 +16,14 @@
usage="Script to prepare the Functest environment.
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
examples:
$(basename "$0")
- $(basename "$0") --offline"
-offline=false
# Parse parameters
while [[ $# > 0 ]]
@@ -38,9 +35,6 @@ while [[ $# > 0 ]]
exit 0
shift
;;
- -o|--offline)
- offline=true
- ;;
*)
error "unknown option $1"
exit 1
@@ -52,15 +46,8 @@ done
BASEDIR=`dirname $0`
source ${BASEDIR}/common.sh
-# Support for Functest offline
-# NOTE: Still not 100% working when running the tests
info "######### Preparing Functest environment #########"
-if [ $offline == false ]; then
- info "MODE: online"
-else
- info "MODE: offline"
-fi
# definition of available installer names
INSTALLERS=(fuel compass apex joid)
@@ -84,131 +71,12 @@ if [ ! -f ${FUNCTEST_CONF_DIR}/openstack.creds ]; then
fi
-if [ $offline == false ]; then
- # Update repos
- info "Updating Releng repository...."
- cd ${RELENG_REPO_DIR}
- if [ ${RELENG_BRANCH} != "master" ]; then
- info "Releng repo: checkout ${RELENG_BRANCH} branch..."
- git checkout ${RELENG_BRANCH}
- fi
- info "Releng repo: pulling to latest..."
- git pull
- if [ ${RELENG_COMMIT} != "latest" ]; then
- info "Releng repo: given commit is ${RELENG_COMMIT}. Reseting..."
- git reset --hard ${RELENG_COMMIT}
- fi
-
- info "Updating Rally repository...."
- cd ${RALLY_REPO_DIR}
- if [ ${RALLY_BRANCH} != "master" ]; then
- info "Rally repo: checkout ${RALLY_BRANCH} branch..."
- git checkout ${RALLY_BRANCH}
- fi
- info "Rally repo: pulling to latest..."
- git pull
- # We leave the reset command for later.
-
- info "Updating vIMS test repository...."
- cd ${VIMS_REPO_DIR}
- if [ ${VIMS_BRANCH} != "stable" ]; then
- info "Releng repo: checkout ${VIMS_TEST_BRANCH} branch..."
- git checkout ${VIMS_BRANCH}
- fi
- info "vIMS test repo: pulling to latest..."
- git pull
- if [ ${VIMS_COMMIT} != "latest" ]; then
- info "vIMS test repo: given commit is ${VIMS_TEST_COMMIT}. Reseting..."
- git reset --hard ${VIMS_COMMIT}
- fi
-
- info "Updating BGPVPN repository...."
- cd ${BGPVPN_REPO_DIR}
- if [ ${BGPVPN_BRANCH} != "master" ]; then
- info "BGPVPN repo: checkout ${BGPVPN_BRANCH} branch..."
- git checkout ${BGPVPN_BRANCH}
- fi
- info "BGPVPN repo: pulling to latest..."
- git pull
- if [ ${BGPVPN_COMMIT} != "latest" ]; then
- info "BGPVPN repo: given commit is ${BGPVPN_COMMIT}. Reseting..."
- git reset --hard ${BGPVPN_COMMIT}
- fi
-
- info "Updating ONOS repository...."
- cd ${ONOS_REPO_DIR}
- if [ ${ONOS_BRANCH} != "master" ]; then
- info "ONOS repo: checkout ${ONOS} branch..."
- git checkout ${ONOS_BRANCH}
- fi
- info "ONOS repo: pulling to latest..."
- git pull
- if [ ${ONOS_COMMIT} != "latest" ]; then
- info "ONOS repo: given commit is ${ONOS_COMMIT}. Reseting..."
- git reset --hard ${ONOS_COMMIT}
- fi
-
- info "Updating PROMISE repository...."
- cd ${PROMISE_REPO_DIR}
- if [ ${PROMISE_BRANCH} != "master" ]; then
- info "PROMISE repo: checkout ${PROMISE} branch..."
- git checkout ${PROMISE_BRANCH}
- fi
- info "PROMISE repo: pulling to latest..."
- git pull
- if [ ${PROMISE_COMMIT} != "latest" ]; then
- info "PROMISE repo: given commit is ${PROMISE_COMMIT}. Reseting..."
- git reset --hard ${PROMISE_COMMIT}
- fi
-
- info "Updating OVNO repository...."
- cd ${OVNO_REPO_DIR}
- if [ ${OVNO_BRANCH} != "master" ]; then
- info "OVNO repo: checkout ${OVNO} branch..."
- git checkout ${OVNO_BRANCH}
- fi
- info "OVNO repo: pulling to latest..."
- git pull
- if [ ${OVNO_COMMIT} != "latest" ]; then
- info "OVNO repo: given commit is ${OVNO_COMMIT}. Reseting..."
- git reset --hard ${OVNO_COMMIT}
- fi
-
- info "Updating DOCTOR repository...."
- cd ${DOCTOR_REPO_DIR}
- if [ ${DOCTOR_BRANCH} != "master" ]; then
- info "DOCTOR repo: checkout ${DOCTOR} branch..."
- git checkout ${DOCTOR_BRANCH}
- fi
- info "DOCTOR repo: pulling to latest..."
- git pull
- if [ ${DOCTOR_COMMIT} != "latest" ]; then
- info "DOCTOR repo: given commit is ${DOCTOR_COMMIT}. Reseting..."
- git reset --hard ${DOCTOR_COMMIT}
- fi
-fi
-
-# We do this regardless if its online or offline mode.
-# Assumption: the docker image contains a newer rally repo than the given commit.
-if [ ${RALLY_COMMIT} != "latest" ]; then
- cd ${RALLY_REPO_DIR}
- info "Rally repo: given commit is ${RALLY_COMMIT}. Reseting..."
- git reset --hard ${RALLY_COMMIT}
-fi
-
-# IMPORTANT: To be removed when version 0.2.1 is out
-git config --global user.email "functest@opnfv.com"
-git config --global user.name "opnfv/functest"
-git fetch https://review.openstack.org/openstack/rally refs/changes/06/270506/9 && git cherry-pick FETCH_HEAD
-
-
# Create directories
mkdir -p ${FUNCTEST_CONF_DIR}
mkdir -p ${FUNCTEST_DATA_DIR}
mkdir -p ${FUNCTEST_RESULTS_DIR}/ODL
-
# Create Openstack credentials file
# $creds is an env varialbe in the docker container pointing to
# /home/opnfv/functest/conf/openstack.creds
@@ -255,7 +123,6 @@ fi
info "Generating OpenStack defaults..."
python ${FUNCTEST_REPO_DIR}/testcases/VIM/OpenStack/CI/libraries/generate_defaults.py -d
-
ifconfig eth0 mtu 1450
echo "1" > ${FUNCTEST_CONF_DIR}/env_active
diff --git a/docker/requirements.pip b/docker/requirements.pip
index 0ecb447ca..07334db48 100644
--- a/docker/requirements.pip
+++ b/docker/requirements.pip
@@ -9,7 +9,7 @@
#
pyyaml==3.10
gitpython==1.0.1
-python-openstackclient==2.0.0
+python-openstackclient==2.3.0
python-ceilometerclient==1.5.1
virtualenv==1.11.4
pexpect==4.0
@@ -21,4 +21,4 @@ configObj==5.0.6
Flask==0.10.1
xmltodict==0.9.2
scp==0.10.2
-paramiko==1.16.0
+paramiko==1.16.0 \ No newline at end of file
diff --git a/docker/run_tests.sh b/docker/run_tests.sh
index 56d70ec50..4dabddacf 100755
--- a/docker/run_tests.sh
+++ b/docker/run_tests.sh
@@ -25,7 +25,8 @@ where:
-s|--serial run tests in one thread
-t|--test run specific set of tests
<test_name> one or more of the following separated by comma:
- vping_ssh,vping_userdata,odl,onos,tempest,rally,vims,promise,doctor
+ healthcheck,vping_ssh,vping_userdata,odl,onos,
+ tempest,rally,vims,promise,doctor
examples:
@@ -34,9 +35,6 @@ examples:
$(basename "$0") -t tempest,rally"
-# Support for Functest offline
-# NOTE: Still not 100% working when running the tests
-offline=false
report=""
clean=true
serial=false
@@ -95,6 +93,11 @@ function run_test(){
fi
case $test_name in
+ "healthcheck")
+ info "Running health check test..."
+ ${FUNCTEST_REPO_DIR}/testcases/VIM/OpenStack/CI/libraries/healthcheck.sh
+ clean_openstack
+ ;;
"vping_ssh")
info "Running vPing-SSH test..."
python ${FUNCTEST_REPO_DIR}/testcases/vPing/CI/libraries/vPing_ssh.py \
@@ -145,6 +148,9 @@ function run_test(){
;;
"bgpvpn")
info "Running BGPVPN Tempest test case..."
+ pushd ${repos_dir}/bgpvpn/
+ pip install --no-deps -e .
+ popd
tempest_dir=$(ls -t /home/opnfv/.rally/tempest/ |grep for-deploy |tail -1)
if [[ $tempest_dir == "" ]]; then
echo "Make sure tempest was running before"
@@ -152,15 +158,14 @@ function run_test(){
fi
tempest_dir=/home/opnfv/.rally/tempest/$tempest_dir
pushd $tempest_dir
- . .venv/bin/activate
- pip install --no-deps -e ~/repos/bgpvpn/.
mkdir -p /etc/tempest/
cp tempest.conf /etc/tempest/
echo "[service_available]
bgpvpn = True" >> /etc/tempest/tempest.conf
- ./run_tempest.sh -- networking_bgpvpn_tempest
+ ./run_tempest.sh -t -N -- networking_bgpvpn_tempest
rm -rf /etc/tempest/tempest.conf
popd
+ clean_openstack
;;
"onos")
info "Running ONOS test case..."
@@ -198,9 +203,6 @@ while [[ $# > 0 ]]
exit 0
shift
;;
- -o|--offline)
- offline=true
- ;;
-r|--report)
report="-r"
;;
@@ -228,7 +230,7 @@ if [[ -n "$DEPLOY_SCENARIO" && "$DEPLOY_SCENARIO" != "none" ]] &&\
[[ -f $tests_file ]]; then
arr_test=($(cat $tests_file))
else
- arr_test=(vping_ssh tempest vims rally)
+ arr_test=(healthcheck vping_ssh vping_userdata tempest vims rally)
fi
BASEDIR=`dirname $0`
diff --git a/testcases/VIM/OpenStack/CI/libraries/healthcheck.sh b/testcases/VIM/OpenStack/CI/libraries/healthcheck.sh
new file mode 100755
index 000000000..9d3559b20
--- /dev/null
+++ b/testcases/VIM/OpenStack/CI/libraries/healthcheck.sh
@@ -0,0 +1,170 @@
+#
+# OpenStack Health Check
+# This script is meant for really basic API operations on OpenStack
+# Services tested: Keystone, Glance, Cinder, Neutron, Nova
+#
+#
+# Author:
+# jose.lausuch@ericsson.com
+#
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+
+set -e
+
+if [ -z $OS_AUTH_URL ]; then
+ echo "Source credentials first."
+ exit 1
+fi
+
+#Redirect all the output (stdout) to a log file and show only possible errors.
+LOG_FILE=/home/opnfv/functest/results/healthcheck.log
+exec 1<>$LOG_FILE
+
+echo "Using following credentials:"
+env | grep OS
+
+## Variables:
+project_1="opnfv-tenant1"
+project_2="opnfv-tenant2"
+user_1="opnfv_user1"
+user_2="opnfv_user2"
+user_3="opnfv_user3"
+user_4="opnfv_user4"
+user_5="opnfv_user5"
+user_6="opnfv_user6"
+image_1="opnfv-image1"
+image_2="opnfv-image2"
+volume_1="opnfv-volume1"
+volume_2="opnfv-volume2"
+net_1="opnfv-network1"
+net_2="opnfv-network2"
+subnet_1="opnfv-subnet1"
+subnet_2="opnfv-subnet2"
+port_1="opnfv-port1"
+port_2="opnfv-port2"
+router_1="opnfv-router1"
+router_2="opnfv-router2"
+instance_1="opnfv-instance1"
+instance_2="opnfv-instance2"
+instance_3="opnfv-instance3"
+instance_4="opnfv-instance4"
+
+
+
+function wait_for_ip() {
+ # $1 is the instance name
+ # $2 is the first octet of the subnet ip
+ timeout=60
+ while [[ ${timeout} > 0 ]]; do
+ if [[ $(nova console-log $1|grep "No lease, failing") ]]; then
+ echo "ERROR: The instance $1 couldn't get an IP from the DHCP agent." | tee -a $LOG_FILE 1>&2
+ exit 1
+ elif [[ $(nova console-log $1|grep "^Lease"|grep "obtained") ]]; then
+ echo "The instance $1 got an IP successfully from the DHCP agent."
+ break
+ fi
+ let timeout=timeout-1
+ sleep 1
+ done
+}
+
+
+#################################
+echo "Testing Keystone API..." | tee -a $LOG_FILE 1>&2
+#################################
+openstack project create ${project_1}
+openstack project create ${project_2}
+
+openstack user create ${user_1} --project ${project_1}
+openstack user create ${user_2} --project ${project_1}
+openstack user create ${user_3} --project ${project_1}
+openstack user create ${user_4} --project ${project_2}
+openstack user create ${user_5} --project ${project_2}
+openstack user create ${user_6} --project ${project_2}
+
+echo "...OK" | tee -a $LOG_FILE 1>&2
+
+#################################
+echo "Testing Glance API..." | tee -a $LOG_FILE 1>&2
+#################################
+image=/home/opnfv/functest/data/cirros-0.3.4-x86_64-disk.img
+glance image-create --name ${image_1} --disk-format qcow2 --container-format bare < ${image}
+glance image-create --name ${image_2} --disk-format qcow2 --container-format bare < ${image}
+
+echo "...OK" | tee -a $LOG_FILE 1>&2
+
+#################################
+echo "Testing Cinder API..." | tee -a $LOG_FILE 1>&2
+#################################
+cinder create --display_name ${volume_1} 1
+cinder create --display_name ${volume_2} 10
+
+echo "...OK" | tee -a $LOG_FILE 1>&2
+
+#################################
+echo "Testing Neutron API..." | tee -a $LOG_FILE 1>&2
+#################################
+
+network_ids=($(neutron net-list|grep -v "+"|grep -v name|awk '{print $2}'))
+for id in ${network_ids[@]}; do
+ [[ $(neutron net-show ${id}|grep 'router:external'|grep -i "true") != "" ]] && ext_net_id=${id}
+done
+if [[ "${ext_net_id}" == "" ]]; then
+ echo "ERROR: No external network found. Exiting Health Check..." | tee -a $LOG_FILE 1>&2
+ exit 1
+else
+ echo "External network found. ${ext_net_id}"
+fi
+
+echo "1. Create Networks..."
+neutron net-create ${net_1}
+neutron net-create ${net_2}
+net1_id=$(neutron net-list | grep ${net_1} | awk '{print $2}')
+net2_id=$(neutron net-list | grep ${net_2} | awk '{print $2}')
+
+echo "2. Create subnets..."
+neutron subnet-create --name ${subnet_1} --allocation-pool start=10.6.0.2,end=10.6.0.253 --gateway 10.6.0.254 ${net_1} 10.6.0.0/24
+neutron subnet-create --name ${subnet_2} --allocation-pool start=10.7.0.2,end=10.7.0.253 --gateway 10.7.0.254 ${net_2} 10.7.0.0/24
+
+echo "4. Create Routers..."
+neutron router-create ${router_1}
+neutron router-create ${router_2}
+
+neutron router-gateway-set ${router_1} ${ext_net_id}
+neutron router-gateway-set ${router_2} ${ext_net_id}
+
+neutron router-interface-add ${router_1} ${subnet_1}
+neutron router-interface-add ${router_2} ${subnet_2}
+
+echo "...OK" | tee -a $LOG_FILE 1>&2
+
+#################################
+echo "Testing Nova API..." | tee -a $LOG_FILE 1>&2
+#################################
+
+nova boot --flavor 2 --image ${image_1} --nic net-id=${net1_id} ${instance_1}
+nova boot --flavor 2 --image ${image_1} --nic net-id=${net1_id} ${instance_2}
+nova boot --flavor 2 --image ${image_2} --nic net-id=${net2_id} ${instance_3}
+nova boot --flavor 2 --image ${image_2} --nic net-id=${net2_id} ${instance_4}
+
+vm1_id=$(nova list | grep ${instance_1} | awk '{print $2}')
+vm2_id=$(nova list | grep ${instance_2} | awk '{print $2}')
+vm3_id=$(nova list | grep ${instance_3} | awk '{print $2}')
+vm4_id=$(nova list | grep ${instance_4} | awk '{print $2}')
+
+echo "...OK" | tee -a $LOG_FILE 1>&2
+
+echo "Checking if instances get an IP from DHCP..." | tee -a $LOG_FILE 1>&2
+
+wait_for_ip ${instance_1} "10.6"
+wait_for_ip ${instance_2} "10.6"
+wait_for_ip ${instance_3} "10.7"
+wait_for_ip ${instance_4} "10.7"
+
+echo "Health check passed!" | tee -a $LOG_FILE 1>&2
+exit 0
diff --git a/testcases/VIM/OpenStack/CI/libraries/run_rally-cert.py b/testcases/VIM/OpenStack/CI/libraries/run_rally-cert.py
index 078e5eaa1..0ef7b4ed3 100755
--- a/testcases/VIM/OpenStack/CI/libraries/run_rally-cert.py
+++ b/testcases/VIM/OpenStack/CI/libraries/run_rally-cert.py
@@ -406,6 +406,7 @@ def main():
logger.debug("Using existing volume type(s)...")
image_id = openstack_utils.get_image_id(glance_client, GLANCE_IMAGE_NAME)
+ image_exists = False
if image_id == '':
logger.debug("Creating image '%s' from '%s'..." % (GLANCE_IMAGE_NAME,
@@ -422,6 +423,7 @@ def main():
else:
logger.debug("Using existing image '%s' with ID '%s'..." \
% (GLANCE_IMAGE_NAME, image_id))
+ image_exists = True
if args.test_name == "all":
for test_name in tests:
@@ -495,10 +497,11 @@ def main():
if args.noclean:
exit(0)
- logger.debug("Deleting image '%s' with ID '%s'..." \
- % (GLANCE_IMAGE_NAME, image_id))
- if not openstack_utils.delete_glance_image(nova_client, image_id):
- logger.error("Error deleting the glance image")
+ if not image_exists:
+ logger.debug("Deleting image '%s' with ID '%s'..." \
+ % (GLANCE_IMAGE_NAME, image_id))
+ if not openstack_utils.delete_glance_image(nova_client, image_id):
+ logger.error("Error deleting the glance image")
if not volume_types:
logger.debug("Deleting volume type '%s'..." \
diff --git a/testcases/VIM/OpenStack/CI/libraries/test_openstack.sh b/testcases/VIM/OpenStack/CI/libraries/test_openstack.sh
deleted file mode 100755
index fa1f0fa04..000000000
--- a/testcases/VIM/OpenStack/CI/libraries/test_openstack.sh
+++ /dev/null
@@ -1,117 +0,0 @@
-#
-# Script to test clean_openstack.py
-#
-# Author:
-# jose.lausuch@ericsson.com
-#
-#
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Apache License, Version 2.0
-# which accompanies this distribution, and is available at
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-
-if [ -z $OS_AUTH_URL ]; then
- echo "Source credentials first"
- exit 1
-fi
-
-echo "Using following credentials:"
-env | grep OS
-
-#################################
-echo "Creating keystone stuff.."
-#################################
-keystone tenant-create --name tenant_test1
-keystone tenant-create --name tenant_test2
-tenant1_id=$(keystone tenant-list | grep tenant_test1 | awk '{print $2}')
-tenant2_id=$(keystone tenant-list | grep tenant_test2 | awk '{print $2}')
-keystone user-create --name user_test11 --tenant $tenant1_id
-keystone user-create --name user_test12 --tenant $tenant1_id
-keystone user-create --name user_test13 --tenant $tenant1_id
-keystone user-create --name user_test21 --tenant $tenant2_id
-keystone user-create --name user_test22 --tenant $tenant2_id
-
-
-#################################
-echo "Creating glance stuff.."
-#################################
-wget http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-disk.img
-glance image-create --name image_test1 --disk-format qcow2 --container-format bare < cirros-0.3.4-x86_64-disk.img
-glance image-create --name image_test2 --disk-format qcow2 --container-format bare < cirros-0.3.4-x86_64-disk.img
-#glance image-create --name test --visibility public --disk-format qcow2 --container-format bare --file cirros-0.3.4-x86_64-disk.img
-
-
-#################################
-echo "Creating cinder stuff.."
-#################################
-cinder create --display_name volume-test1 1
-cinder create --display_name volume-test2 2
-
-
-#################################
-echo "Creating NEUTRON stuff.."
-#################################
-echo "1. Create Networks."
-neutron net-create net-test1
-neutron net-create net-test2
-
-echo "2. Create subnets."
-neutron subnet-create --name subnet-test11 --allocation-pool start=10.7.0.2,end=10.7.0.253 --gateway 10.7.0.254 net-test1 10.7.0.0/24
-neutron subnet-create --name subnet-test21 --allocation-pool start=10.6.0.2,end=10.6.0.253 --gateway 10.6.0.254 net-test2 10.6.0.0/24
-
-echo "3. Create Ports."
-neutron port-create --name port-test11 --fixed-ip ip_address=10.7.0.10 net-test1
-neutron port-create --name port-test21 --fixed-ip ip_address=10.6.0.60 net-test2
-
-
-echo "4. Create Routers."
-neutron router-create router-test1
-neutron router-create router-test2
-router1_id=$(neutron router-list | grep router-test1 | awk '{print $2}')
-router1_id=$(neutron router-list | grep router-test2 | awk '{print $2}')
-
-neutron router-gateway-set router-test1 net04_ext
-neutron router-gateway-set router-test2 net04_ext
-
-neutron router-interface-add router-test1 subnet-test11
-neutron router-interface-add router-test2 subnet-test21
-
-echo "5. Floating IPs."
-neutron floatingip-create net04_ext
-neutron floatingip-create net04_ext
-neutron floatingip-create net04_ext
-neutron floatingip-create net04_ext
-
-floating_ip1_id=$(neutron floatingip-list | awk 'FNR == 4 {print}' | awk '{print $2}')
-floating_ip2_id=$(neutron floatingip-list | awk 'FNR == 5 {print}' | awk '{print $2}')
-floating_ip3_id=$(neutron floatingip-list | awk 'FNR == 6 {print}' | awk '{print $2}')
-floating_ip4_id=$(neutron floatingip-list | awk 'FNR == 7 {print}' | awk '{print $2}')
-
-floating_ip1=$(neutron floatingip-list | awk 'FNR == 4 {print}' | awk '{print $5}')
-floating_ip2=$(neutron floatingip-list | awk 'FNR == 5 {print}' | awk '{print $5}')
-floating_ip3=$(neutron floatingip-list | awk 'FNR == 6 {print}' | awk '{print $5}')
-floating_ip4=$(neutron floatingip-list | awk 'FNR == 7 {print}' | awk '{print $5}')
-
-#################################
-echo "Creating NOVA stuff.."
-#################################
-net1_id=$(neutron net-list | grep net-test1 | awk '{print $2}')
-net2_id=$(neutron net-list | grep net-test2 | awk '{print $2}')
-
-nova boot --flavor 2 --image image_test1 --nic net-id=$net1_id nova-test11
-nova boot --flavor 2 --image image_test1 --nic net-id=$net1_id nova-test12
-nova boot --flavor 2 --image image_test2 --nic net-id=$net2_id nova-test21
-nova boot --flavor 2 --image image_test2 --nic net-id=$net2_id nova-test22
-
-vm1_id=$(nova list | grep nova-test11 | awk '{print $2}')
-vm2_id=$(nova list | grep nova-test12 | awk '{print $2}')
-vm3_id=$(nova list | grep nova-test21 | awk '{print $2}')
-vm4_id=$(nova list | grep nova-test22 | awk '{print $2}')
-
-nova floating-ip-associate $vm1_id $floating_ip1
-nova floating-ip-associate $vm2_id $floating_ip2
-nova floating-ip-associate $vm3_id $floating_ip3
-nova floating-ip-associate $vm4_id $floating_ip4
-
-#neutron floatingip-associate --fixed-ip-address $floating_ip2 <PORT>
diff --git a/testcases/config_functest.yaml b/testcases/config_functest.yaml
index b09050871..d9432316c 100644
--- a/testcases/config_functest.yaml
+++ b/testcases/config_functest.yaml
@@ -29,25 +29,6 @@ general:
dir_vIMS_data: /home/opnfv/functest/data/vIMS
dir_rally_inst: /home/opnfv/.rally
- repositories:
- # branch and commit ID to which the repos will be reset (HEAD)
- releng_branch: master
- releng_commit: latest
- rally_branch: master
- rally_commit: 1b6e9e9219b143c685a2af134ab025dddd72ed27
- vims_test_branch: stable
- vims_test_commit: latest
- bgpvpn_branch: master
- bgpvpn_commit: latest
- onos_branch: master
- onos_commit: latest
- promise_branch: master
- promise_commit: latest
- ovno_branch: master
- ovno_commit: latest
- doctor_branch: stable/brahmaputra
- doctor_commit: latest
-
openstack:
image_name: functest-img
image_file_name: cirros-0.3.4-x86_64-disk.img
@@ -171,16 +152,17 @@ results:
# the execution order is important as some tests may be more destructive than others
# and if vPing is failing is usually not needed to continue...
test_exec_priority:
- 1: vping_ssh
- 2: vping_userdata
- 3: tempest
- 4: odl
- 5: onos
- 6: ovno
- 7: doctor
- 8: promise
- 9: odl-vpnservice
- 10: bgpvpn
+ 1: healthcheck
+ 2: vping_ssh
+ 3: vping_userdata
+ 4: tempest
+ 5: odl
+ 6: onos
+ 7: ovno
+ 8: doctor
+ 9: promise
+ 10: odl-vpnservice
+ 11: bgpvpn
#11: openstack-neutron-bgpvpn-api-extension-tests
12: vims
13: rally
@@ -235,8 +217,10 @@ test-dependencies:
installer: 'apex'
functest:
vims:
- scenario: '(ocl)|(odl)|(nosdn)'
+ scenario: '(ocl)|(nosdn)|(?!.*bgpvpn)odl'
+ healthcheck:
vping_ssh:
+ scenario: '(?!.*bgpvpn)odl'
vping_userdata:
tempest:
rally:
@@ -252,6 +236,6 @@ test-dependencies:
scenario: 'odl'
sdnvpn:
bgpvpn:
- installer: 'fuel'
+ installer: '(fuel)|(apex)'
scenario: 'bgpvpn'
# this execute the tempest tests of networking-bgpvpn