tools/deployment/libvirt/destroy_network.sh
Felipe de Jesus Ruiz Garcia bb58b9e6d6 Update network command destroy_network.sh
ifconfig and brctl are deprecated commands.
They are replaced with ip command.

Story: 2004646
Task: 28597

Change-Id: I24e2d53ae7f8b866eef665a85d1785df0527c82a
Signed-off-by: Felipe de Jesus Ruiz Garcia <felipe_57@live.com.mx>
Signed-off-by: Felipe de Jesus Ruiz Garcia <felipe.de.jesus.ruiz.garcia@intel.com>
2018-12-20 02:30:48 -05:00

14 lines
418 B
Bash
Executable File

#!/usr/bin/env bash
BRIDGE_INTERFACE=${BRIDGE_INTERFACE:-stxbr}
EXTERNAL_NETWORK=${EXTERNAL_NETWORK:-10.10.10.0/24}
EXTERNAL_IP=${EXTERNAL_IP:-10.10.10.1/24}
for i in {1..4}; do
BRIDGE_INTERFACE_NAME=${BRIDGE_INTERFACE}$i
if [ -d "/sys/class/net/${BRIDGE_INTERFACE_NAME}" ]; then
sudo ip link set dev ${BRIDGE_INTERFACE_NAME} down
sudo ip link delete dev ${BRIDGE_INTERFACE_NAME}
fi
done