From 2135dfb940696089fbec610ead19d355b6078700 Mon Sep 17 00:00:00 2001 From: Andrey Kurilin Date: Mon, 3 Apr 2017 11:18:34 +0300 Subject: [PATCH] [ci] print available images, volumes, nets It would be nice to print all available images, volumes and networks before rally launch. It can be helpful while debugging. Change-Id: I1990ea601ad4e21785b7710d4fb531cf75e7bfa8 --- tests/ci/rally_gate_functions.sh | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/tests/ci/rally_gate_functions.sh b/tests/ci/rally_gate_functions.sh index 8bdd249c..edbaba5f 100644 --- a/tests/ci/rally_gate_functions.sh +++ b/tests/ci/rally_gate_functions.sh @@ -34,12 +34,26 @@ function setUp () { source ~/.rally/openrc admin admin + if [[ $(rally deployment config) == *"project_name"* ]]; then + export OS_IDENTITY_API_VERSION=3 + else + export OS_IDENTITY_API_VERSION="2.0" + fi + + OPENSTACK_SERVICES=$(openstack service list) + if [[ $OPENSTACK_SERVICES == *"glance"* ]]; then + openstack image list + fi + if [[ $OPENSTACK_SERVICES == *"cinder"* ]]; then + openstack volume list --all-projects + fi + if [[ $OPENSTACK_SERVICES == *"neutron"* ]]; then + openstack network list + fi + # NOTE(ikhudoshyn): Create additional users and register a new env # so that we could run scenarios using 'existing_users' context if [ "$DEVSTACK_GATE_PREPOPULATE_USERS" = "1" ]; then - # NOTE(andreykurilin): let's hardcode version, since we already - # hardcoded arguments for users... - export OS_IDENTITY_API_VERSION=3 openstack --version openstack project create rally-test-project-1 @@ -136,4 +150,4 @@ function run () { | gzip > rally-plot/resources_diff.txt.gz exit $retval -} \ No newline at end of file +}