summaryrefslogtreecommitdiffstats
path: root/compass/deploy/func.sh
diff options
context:
space:
mode:
Diffstat (limited to 'compass/deploy/func.sh')
-rw-r--r--compass/deploy/func.sh20
1 files changed, 20 insertions, 0 deletions
diff --git a/compass/deploy/func.sh b/compass/deploy/func.sh
new file mode 100644
index 0000000..29c2c23
--- /dev/null
+++ b/compass/deploy/func.sh
@@ -0,0 +1,20 @@
+function tear_down_machines() {
+ virtmachines=$(virsh list --name |grep pxe)
+ for virtmachine in $virtmachines; do
+ echo "destroy $virtmachine"
+ virsh destroy $virtmachine
+ if [[ "$?" != "0" ]]; then
+ echo "destroy instance $virtmachine failed"
+ exit 1
+ fi
+ done
+ virtmachines=$(virsh list --all --name |grep pxe)
+ for virtmachine in $virtmachines; do
+ echo "undefine $virtmachine"
+ virsh undefine $virtmachine
+ if [[ "$?" != "0" ]]; then
+ echo "undefine instance $virtmachine failed"
+ exit 1
+ fi
+ done
+}