From d2113c14319740e2bc51441f1c0e73c457fc48c6 Mon Sep 17 00:00:00 2001 From: Carlos Goncalves Date: Wed, 27 Jul 2016 10:09:27 +0000 Subject: Delete $VM_NAME and alrms with doctor user creds 'openstack server delete' tries to delete VM with admin credentials which fails because $VM_NAME is under a different tenant. Same for ceilometer alarms that we created with doctor creds. Change-Id: Ibba3b842dc8fa160137bb04316d285e52d776641 Signed-off-by: Carlos Goncalves --- tests/run.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/run.sh b/tests/run.sh index 767a726a..ae030e22 100755 --- a/tests/run.sh +++ b/tests/run.sh @@ -266,11 +266,11 @@ cleanup() { ssh $ssh_opts_cpu "$COMPUTE_USER@$COMPUTE_IP" \ "[ -e disable_network.log ] && cat disable_network.log" - openstack $as_doctor_user server list | grep -q " $VM_NAME " && openstack server delete "$VM_NAME" + openstack $as_doctor_user server list | grep -q " $VM_NAME " && openstack $as_doctor_user server delete "$VM_NAME" sleep 1 - alarm_id=$(ceilometer alarm-list | grep " $ALARM_NAME " | awk '{print $2}') + alarm_id=$(ceilometer $as_doctor_user alarm-list | grep " $ALARM_NAME " | awk '{print $2}') sleep 1 - [ -n "$alarm_id" ] && ceilometer alarm-delete "$alarm_id" + [ -n "$alarm_id" ] && ceilometer $as_doctor_user alarm-delete "$alarm_id" sleep 1 image_id=$(openstack image list | grep " $IMAGE_NAME " | awk '{print $2}') -- cgit 1.2.3-korg