diff options
author | Carlos Goncalves <carlos.goncalves@neclab.eu> | 2016-07-27 10:09:27 +0000 |
---|---|---|
committer | Carlos Goncalves <carlos.goncalves@neclab.eu> | 2016-07-27 12:18:49 +0200 |
commit | d2113c14319740e2bc51441f1c0e73c457fc48c6 (patch) | |
tree | fa4f90bdde6c00d6d3430078f8baccce16e09b16 | |
parent | 86d6d5c7f226caea590256bad3493549690c26e7 (diff) |
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 <carlos.goncalves@neclab.eu>
-rwxr-xr-x | tests/run.sh | 6 |
1 files 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}') |