summaryrefslogtreecommitdiffstats
path: root/tests/ci/clean_images.sh
diff options
context:
space:
mode:
authorJing Lu <lvjing5@huawei.com>2017-06-23 01:52:13 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-06-23 01:52:13 +0000
commit6e3cb9346cb11acd6bf0882bd7f715b879246909 (patch)
tree653260ce1b5a7df90af132df790d6f89fb5f6ca4 /tests/ci/clean_images.sh
parentb93bbc01bf90d4fe6defb137145e74aee8c3081e (diff)
parentf92c10a994a2818d8e03ac0be35c6d697530bcb3 (diff)
Merge "HA testcase improvement" into stable/danube
Diffstat (limited to 'tests/ci/clean_images.sh')
-rwxr-xr-xtests/ci/clean_images.sh16
1 files changed, 11 insertions, 5 deletions
diff --git a/tests/ci/clean_images.sh b/tests/ci/clean_images.sh
index 27da9e279..cb5410ab2 100755
--- a/tests/ci/clean_images.sh
+++ b/tests/ci/clean_images.sh
@@ -15,18 +15,24 @@ cleanup()
echo
echo "========== Cleanup =========="
- if ! openstack image list; then
+ if [ $OS_CACERT ] && [ "$(echo $OS_CACERT | tr '[:upper:]' '[:lower:]')" = "false" ]; then
+ SECURE="--insecure"
+ else
+ SECURE=""
+ fi
+
+ if ! openstack "${SECURE}" image list; then
return
fi
- for image in $(openstack image list | grep -e cirros-0.3.5 -e yardstick-image -e Ubuntu-16.04 \
+ for image in $(openstack "${SECURE}" image list | grep -e cirros-0.3.5 -e yardstick-image -e Ubuntu-16.04 \
| awk '{print $2}'); do
echo "Deleting image $image..."
- openstack image delete $image || true
+ openstack "${SECURE}" image delete $image || true
done
- openstack flavor delete yardstick-flavor &> /dev/null || true
- openstack flavor delete storperf &> /dev/null || true
+ openstack "${SECURE}" flavor delete yardstick-flavor &> /dev/null || true
+ openstack "${SECURE}" flavor delete storperf &> /dev/null || true
}
main()