From 52a7b6ecbad11c08dcd77a6fcd8bfef6a20324a9 Mon Sep 17 00:00:00 2001 From: Jakub Libosvar Date: Tue, 14 Jan 2014 18:52:51 +0100 Subject: [PATCH] Run neutron-debug with admin tenant in neutron-adv-test Because neutron-debug create-probe needs admin role only, demo tenants cannot create ports. neutron-debug is wrapped in order to run it only with admin tenant. Change-Id: Ib65e8639858c597345c6a5fdc0192b40f34a0300 Closes-Bug: #1269090 --- exercises/neutron-adv-test.sh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/exercises/neutron-adv-test.sh b/exercises/neutron-adv-test.sh index 0c0d42f458..1343f11553 100755 --- a/exercises/neutron-adv-test.sh +++ b/exercises/neutron-adv-test.sh @@ -185,6 +185,14 @@ function confirm_server_active { fi } +function neutron_debug_admin { + local os_username=$OS_USERNAME + local os_tenant_id=$OS_TENANT_ID + source $TOP_DIR/openrc admin admin + neutron-debug $@ + source $TOP_DIR/openrc $os_username $os_tenant_id +} + function add_tenant { local TENANT=$1 local USER=$2 @@ -241,7 +249,7 @@ function create_network { local NET_ID=$(neutron net-create --tenant-id $TENANT_ID $NET_NAME $EXTRA| grep ' id ' | awk '{print $4}' ) die_if_not_set $LINENO NET_ID "Failure creating NET_ID for $TENANT_ID $NET_NAME $EXTRA" neutron subnet-create --ip-version 4 --tenant-id $TENANT_ID --gateway $GATEWAY $NET_ID $CIDR - neutron-debug probe-create --device-owner compute $NET_ID + neutron_debug_admin probe-create --device-owner compute $NET_ID source $TOP_DIR/openrc demo demo }