Skip to content

Instantly share code, notes, and snippets.

@alazyer
Created November 6, 2017 09:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alazyer/bb79ad764ccdca2ac195d852d2a8f57f to your computer and use it in GitHub Desktop.
Save alazyer/bb79ad764ccdca2ac195d852d2a8f57f to your computer and use it in GitHub Desktop.
#!/bin/sh
# https://github.com/bigswitch/deployment-support/blob/master/openstack/clean-devices.sh
set -e
for qvb in `ifconfig -a | grep qvb | cut -d' ' -f1`
do
`sudo ip link set $qvb down`
`sudo ip link delete $qvb`
done
for qbr in `ifconfig -a | grep qbr | cut -d' ' -f1`
do
`sudo ip link set $qbr down`
`sudo ip link delete $qbr`
done
for qvo in `ifconfig -a | grep qvo | cut -d' ' -f1`
do
`sudo ovs-vsctl del-port br-int $qvo`
done
for tap in `ifconfig -a | grep tap | cut -d' ' -f1`
do
`sudo ip link set $tap down`
`sudo ovs-vsctl del-port br-int $tap`
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment