# Use default if no param passed
CONFIG=${CONFIG:-'/var/opt/opnfv'}
+RESOURCES=${RESOURCES:-"$CONFIG/images"}
+LIB=${LIB:-"$CONFIG/lib"}
##LIBRARIES
-source $CONFIG/lib/common-functions.sh
+if ! source $LIB/common-functions.sh; then
+ echo "Failed to source $LIB/common-functions.sh"
+ exit 1
+fi
vm_index=4
ovs_bridges="br-admin br-private br-public br-storage"
-OPNFV_NETWORK_TYPES="admin_network private_network public_network storage_network"
+OPNFV_NETWORK_TYPES="admin_network private_network public_network storage_network api_network"
# Clean off instack/undercloud VM
for vm in instack undercloud; do
for bridge in ${ovs_bridges}; do
if detach_interface_from_ovs ${bridge} 2> /dev/null; then
ovs-vsctl del-br ${bridge} 2> /dev/null
+ rm -f /etc/sysconfig/network-scripts/ifcfg-${bridge}
fi
done
# force storage cleanup
virsh pool-refresh default
+# remove temporary files
+rm -f /tmp/network-environment.yaml
+
echo "Cleanup Completed"