Created
December 28, 2015 18:54
-
-
Save aojea/9a5b0aad017408c410e7 to your computer and use it in GitHub Desktop.
Script to clean up neutron objects, in this case it cleans all rally remaining routers and networks
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
for router_id in `neutron router-list | grep 's_rally' | awk '{print $2}'`; do | |
neutron router-gateway-clear $router_id | |
subnet_id=`neutron router-port-list $router_id | grep 'subnet_id' | awk '{print $8}' | awk -F '\"' '{print $2}'` | |
neutron router-interface-delete $router_id $subnet_id | |
neutron router-delete $router_id | |
net_id=`neutron subnet-show $subnet_id | grep 'network_id' | awk '{print $4}'` | |
neutron subnet-delete $subnet_id | |
neutron net-delete $net_id | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment