diff options
author | 2015-10-03 17:34:24 +0200 | |
---|---|---|
committer | 2015-10-03 17:34:24 +0200 | |
commit | 543130927ba40a174e8674cca66ae442d5056d76 (patch) | |
tree | ee497cf48d8f31e998b48c6ae54fc625b852b20d /compass/deploy/func.sh | |
parent | 11dbe27afb96c5b54b9f4f0a1c8b21194f59dc7b (diff) |
Moving tag arno.2015.2.0 from genesis to fuel/stable/arnoarno.2015.2.0stable/arno
Change-Id: I01b5f9f9125756d80d7ca666bb6d994f2b13d2a0
Signed-off-by: Jonas Bjurel <jonas.bjurel@ericsson.com>
Diffstat (limited to 'compass/deploy/func.sh')
-rwxr-xr-x[-rw-r--r--] | compass/deploy/func.sh | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/compass/deploy/func.sh b/compass/deploy/func.sh index 29c2c23fe..49ea94780 100644..100755 --- a/compass/deploy/func.sh +++ b/compass/deploy/func.sh @@ -1,19 +1,22 @@ function tear_down_machines() { - virtmachines=$(virsh list --name |grep pxe) + virtmachines=$(sudo virsh list --name |grep pxe) for virtmachine in $virtmachines; do echo "destroy $virtmachine" - virsh destroy $virtmachine + sudo 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 + + sudo virsh list --all|grep shut|awk '{print $2}'|xargs -n 1 sudo virsh undefine + + vol_names=$(sudo virsh vol-list default |grep .img | awk '{print $1}') + for vol_name in $vol_names; do + echo "virsh vol-delete $vol_name" + sudo virsh vol-delete $vol_name --pool default if [[ "$?" != "0" ]]; then - echo "undefine instance $virtmachine failed" + echo "vol-delete $vol_name failed!" exit 1 fi done |