compass-core/regtest/ansible/ci/func.sh
Xicheng Chang ca8da634be Add ansible regtest
1. add regtest scripts and allinone job
2. further jobs can be added with just conf files

Change-Id: I203bd17154a6525a9ed3605ee35598d2cb472f6f
2015-05-29 15:42:43 -07:00

21 lines
623 B
Bash

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
}