Deleting ports

Ports in OpenStack can be deleted with the openstack port delete command. OpenStack automatically deletes ports it creates, such as when a server or floating IP is created, but may not delete ports created by users and associated with instances at a later time.

Note

Deleting ports associated with active instances may cause the instance to crash or can cause unexpected behavior in the instance.

Getting ready

When deleting a port, ensure that you are authenticated as an administrator or are the owner of the port. You will need the following details:

  • Port name or ID

For our example, the following will be used:

  • Port name: COOKBOOK_TEST_PORT_1

How to do it…

With the OpenStack client installed on our system, we are now able to delete a port with the following command:

openstack port delete COOKBOOK_TEST_PORT_1

No output is returned.

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

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