Merge "Before deleting the instance, check if the instance exists"
authorTomi Juvonen <tomi.juvonen@nokia.com>
Mon, 20 Jun 2016 07:38:45 +0000 (07:38 +0000)
committerGerrit Code Review <gerrit@172.30.200.206>
Mon, 20 Jun 2016 07:38:45 +0000 (07:38 +0000)
tests/run.sh

index d476f33..56bacca 100755 (executable)
@@ -226,7 +226,7 @@ cleanup() {
 
     python ./nova_force_down.py "$COMPUTE_HOST" --unset
     sleep 1
-    nova delete "$VM_NAME"
+    nova list | grep -q " $VM_NAME " && nova delete "$VM_NAME"
     sleep 1
     alarm_id=$(ceilometer alarm-list | grep " $ALARM_NAME " | awk '{print $2}')
     sleep 1