summaryrefslogtreecommitdiffstats
path: root/ci/clean.sh
diff options
context:
space:
mode:
Diffstat (limited to 'ci/clean.sh')
-rwxr-xr-xci/clean.sh12
1 files changed, 6 insertions, 6 deletions
diff --git a/ci/clean.sh b/ci/clean.sh
index d9a02e43..7fad2ef1 100755
--- a/ci/clean.sh
+++ b/ci/clean.sh
@@ -5,13 +5,13 @@
#
#Uses Vagrant and VirtualBox
#
+vm_index=4
virsh destroy instack 2> /dev/null || echo -n ''
virsh undefine instack --remove-all-storage 2> /dev/null || echo -n ''
-virsh destroy baremetalbrbm_0 2> /dev/null || echo -n ''
-virsh undefine baremetalbrbm_0 --remove-all-storage 2> /dev/null || echo -n ''
-virsh destroy baremetalbrbm_1 2> /dev/null || echo -n ''
-virsh undefine baremetalbrbm_1 --remove-all-storage 2> /dev/null || echo -n ''
rm -f /var/lib/libvirt/images/instack.qcow2 2> /dev/null
-rm -f /var/lib/libvirt/images/baremetalbrbm_0.qcow2 2> /dev/null
-rm -f /var/lib/libvirt/images/baremetalbrbm_1.qcow2 2> /dev/null
+for i in $(seq 0 vm_index); do
+ virsh destroy baremetalbrbm_$i 2> /dev/null || echo -n ''
+ virsh undefine baremetalbrbm_$i --remove-all-storage 2> /dev/null || echo -n ''
+ rm -f /var/lib/libvirt/images/baremetalbrbm_${i}.qcow2 2> /dev/null
+done