Deleting networks
Deleting a network in OpenStack is as easy as invoking the openstack network delete
command. Neutron will delete any automatically-created ports associated with the network, like the ones created by/for the DHCP or router namespaces, and will return any automatically-assigned segmentation IDs to the respective pool for allocation to another network.
Getting ready
When deleting a network in OpenStack, ensure that all associated user-created ports have been deleted. This may require deleting instances, detaching and deleting ports from instances, or detaching and deleting ports from routers. When deleting a network, the following information will be necessary:
Network name or ID
How to do it…
With the OpenStack client installed on our system, we are able now to delete a network with the following command:
openstack network delete COOKBOOK_TENANT_NETWORK_3
No output is returned.
How it works...
When invoked, the openstack network delete
command will instruct Neutron to delete the...