diff options
Diffstat (limited to 'ci/clean.sh')
-rwxr-xr-x | ci/clean.sh | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/ci/clean.sh b/ci/clean.sh index 08c0d53f..e5b2f91c 100755 --- a/ci/clean.sh +++ b/ci/clean.sh @@ -22,6 +22,7 @@ source $LIB/common-functions.sh vm_index=4 ovs_bridges="br-admin br-private br-public br-storage" +OPNFV_NETWORK_TYPES="admin_network private_network public_network storage_network" # Clean off instack/undercloud VM for vm in instack undercloud; do @@ -41,10 +42,13 @@ for i in $(seq 0 $vm_index); do rm -f /var/lib/libvirt/images/baremetal${i}.qcow2 2> /dev/null done +for network in ${OPNFV_NETWORK_TYPES}; do + virsh net-destroy ${network} 2> /dev/null + virsh net-undefine ${network} 2> /dev/null +done + # Clean off created bridges for bridge in ${ovs_bridges}; do - virsh net-destroy ${bridge} 2> /dev/null | xargs echo -n - virsh net-undefine ${bridge} 2> /dev/null | xargs echo -n if detach_interface_from_ovs ${bridge} 2> /dev/null; then ovs-vsctl del-br ${bridge} 2> /dev/null fi |