Deleting routers
Routers in OpenStack can be deleted using the openstack router delete
command. Before a router can be deleted, all subnets/ports attached to the router must be detached. This will cause a disruption of traffic for any instance connected to a network behind the router. Subnets can be detached using the openstack router remove subnet
or openstack router remove port
commands.
Getting ready
When deleting a router, the following information will be necessary:
Router name or ID
How to do it…
To delete a router in OpenStack, issue the following command:
openstack router delete COOKBOOK_ROUTER_DVR
No output is given. However, the operation can be verified using the openstack router list
command:
Deleted routers will no longer appear in the list.
How it works...
When invoked, the openstack router delete
command will instruct Neutron to delete the specified router and associated resources. In a reference architecture, the layer 3 agents are responsible for deleting the respective network...