diff options
author | Fatih Degirmenci <fdegir@gmail.com> | 2018-03-22 20:23:19 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2018-03-22 20:23:19 +0000 |
commit | 5c19a7833eafc7a9547e6b16d68794dbcd211d7a (patch) | |
tree | 808ecf9de93b21f7decce03b84f14906fb19925e | |
parent | 4fb43a082642b02cba81440e1fcc03a01caa78ba (diff) | |
parent | 69061efa216c53eb457bedd8cfc545d750ef3c36 (diff) |
Merge "xci: files: xci-destroy-env.sh: Remove VMs from all flavors"
-rwxr-xr-x | xci/files/xci-destroy-env.sh | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/xci/files/xci-destroy-env.sh b/xci/files/xci-destroy-env.sh index 9d53dc15..8b811d0f 100755 --- a/xci/files/xci-destroy-env.sh +++ b/xci/files/xci-destroy-env.sh @@ -14,6 +14,8 @@ if [[ $(whoami) != "root" ]]; then exit 1 fi +flavors=(aio mini noha ha) + # Start fresh rm -rf /opt/stack # HOME is normally set by sudo -H @@ -33,14 +35,16 @@ if which vbmc &>/dev/null || { [[ -e /opt/stack/bifrost/bin/activate ]] && sourc which vbmc &>/dev/null || { [[ -e /opt/stack/bifrost/bin/activate ]] && deactivate; } fi -# Destroy all XCI VMs if the previous operation failed -[[ -n ${XCI_FLAVOR} ]] && \ +# Destroy all XCI VMs on all flavors +for varfile in ${flavors[@]}; do + source ${XCI_PATH}/xci/config/${varfile}-vars for vm in ${TEST_VM_NODE_NAMES}; do if which virsh &>/dev/null; then virsh destroy $vm || true virsh undefine $vm || true fi done +done service ironic-conductor stop || true @@ -76,3 +80,5 @@ service libvirtd restart service ironic-api restart || true service ironic-conductor start || true service ironic-inspector restart || true + +# vim: set ts=4 sw=4 expandtab: |