File: delete-network.sh

package info (click to toggle)
python-openstacksdk 4.4.0-5
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 13,352 kB
  • sloc: python: 122,960; sh: 153; makefile: 23
file content (14 lines) | stat: -rw-r--r-- 572 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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