This section explains how to delete a port.
Deletion of a port is basically the procedure for creating a port done in reverse.
However, when a virtual server that the port is attached to is deleted, the port will be deleted at the same time.
-
Set the environment variable below as follows:
$ TMP_PORT_ID=<portIdTargetedForDeletion>
-
Execute the following API:
$ curl -i -Ss $NETWORK/v2.0/ports/$TMP_PORT_ID -X DELETE \
-H "X-Auth-Token: $OS_AUTH_TOKEN"
HTTP/1.1 204 No Content
Server: Apache
Date: Www, DD MMM yyyy hh:mm:ss GMT
x-compute-request-id: req-<reqId>
Cache-Control: no-cache
X-Request-Id: <xReqId>
X-Runtime: <runtime>
Keep-Alive: timeout=5, max=100