openstacksdk/extras/delete-network.sh
Monty Taylor a4ee1a3f09
Merge tox, tests and other support files
Change-Id: I5a4759e36089f1f4fab0c75412c94d051d8b16a7
2017-10-04 14:51:08 -05:00

15 lines
572 B
Bash

neutron router-gateway-clear router1
neutron router-interface-delete router1
for subnet in private-subnet ipv6-private-subnet ; do
neutron router-interface-delete router1 $subnet
subnet_id=$(neutron subnet-show $subnet -f value -c id)
neutron port-list | grep $subnet_id | awk '{print $2}' | xargs -n1 neutron port-delete
neutron subnet-delete $subnet
done
neutron router-delete router1
neutron net-delete private
# Make the public network directly consumable
neutron subnet-update public-subnet --enable-dhcp=True
neutron net-update public --shared=True