diff options
| author | Eduardo Gonzalez <dabarren@gmail.com> | 2018-11-07 18:16:32 +0100 |
|---|---|---|
| committer | Eduardo Gonzalez <dabarren@gmail.com> | 2018-12-21 11:43:22 +0100 |
| commit | 535aba79a91f8c9351e6bbe799ed1829cb270866 (patch) | |
| tree | b3b3191166816c81e63e64991a87ad78bd30562a /tests/test-scenario-nfv.sh | |
| parent | e73fe77d7d1714d81f7dba97d1f357762f16f0dc (diff) | |
| download | kolla-ansible-535aba79a91f8c9351e6bbe799ed1829cb270866.tar.gz kolla-ansible-535aba79a91f8c9351e6bbe799ed1829cb270866.zip | |
Add NFV orchestration services CI job
Change-Id: I33484d0961f1cd17ed05dd124eba68d99b4db83f
Diffstat (limited to 'tests/test-scenario-nfv.sh')
| -rwxr-xr-x | tests/test-scenario-nfv.sh | 78 |
1 files changed, 78 insertions, 0 deletions
diff --git a/tests/test-scenario-nfv.sh b/tests/test-scenario-nfv.sh new file mode 100755 index 000000000..5fe01340b --- /dev/null +++ b/tests/test-scenario-nfv.sh @@ -0,0 +1,78 @@ +#!/bin/bash + +set -o xtrace +set -o errexit + +# Enable unbuffered output for Ansible in Jenkins. +export PYTHONUNBUFFERED=1 + + +function test_tacker { + echo "TESTING: Tacker VIM,VNFD and VNF creation" + sh contrib/demos/tacker/deploy-tacker-demo + openstack vim list + openstack vnf list + openstack vnf descriptor list + + while [[ $(openstack vnf show kolla-sample-vnf -f value -c status) != "ACTIVE" ]]; do + echo "VNF not running yet" + attempt=$((attempt+1)) + if [[ $attempt -eq 10 ]]; then + echo "VNF failed to start" + openstack vnf show kolla-sample-vnf + return 1 + fi + sleep 10 + done +} + +function test_barbican { + echo "TESTING: Barbican" + openstack secret list +} + +function test_mistral { + echo "TESTING: Mistral" + openstack workflow list + openstack workflow execution list + openstack action execution list +} + +function test_nova { + echo "TESTING: Nova" + openstack server list +} + +function test_heat { + echo "TESTING: Heat" + openstack stack list +} + +function install_requirements { + echo "TESTING: Install requirements" + sudo -H pip install --ignore-installed -U "python-tackerclient" "python-heatclient" "networking-sfc" "python-mistralclient" "python-barbicanclient" +} + +function test_scenario_nfv_logged { + . /etc/kolla/admin-openrc.sh + install_requirements + test_tacker + test_barbican + test_mistral + test_nova + test_heat +} + +function test_scenario_nfv { + echo "Testing Scenario NFV" + test_scenario_nfv_logged > /tmp/logs/ansible/test-scenario-nfv 2>&1 + result=$? + if [[ $result != 0 ]]; then + echo "Testing Scenario NFV failed. See ansible/test-scenario-nfv for details" + else + echo "Successfully Scenario NFV. See ansible/test-scenario-nfv for details" + fi + return $result +} + +test_scenario_nfv |
