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 specified network and any associated subnet(s), as long as all user-managed ports have been deleted. In a reference architecture, the layer 2 agents are responsible for deleting the respective virtual bridges and interfaces configured on the hosts, and all records of the network are purged from the OpenStack database.

Note

Neutron does not maintain network information in the database once those objects have been deleted. Requests against the OpenStack API may be logged, but using third-party tools or proxies is highly recommended if an audit trail is required.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.224.62.160