Atom feed of this document
 

 Update Port

Verb URI Description
PUT /tenants/tenant-id/networks/network-id/ports/port-id Sets the administrative state for the port identified by port-id on the network identified by network-id.

Normal Response Code(s): 204

Error Response Code(s): BadRequest (400), Unauthorized (401), Forbidden (403), NetworkNotFound (420), PortNotFound (430), RequestedStateInvalid (431)

This operation sets the administrative state for a port. Currently Quantum recognizes two port states: DOWN and ACTIVE. In the DOWN state a port will not provide connectivity to the network.

This feature allows the tenant the ability to take entities offline without affecting the logical topology.

The operation will return the RequestedStateInvalid error code if the specified administrative state is not either DOWN or ACTIVE.

The operation's request body must contain a Port object with the new administrative state for the port.

 

Example 4.25. Update Port Request (XML)

Request:

PUT tenants/33/networks/158233b0-ca9a-40b4-8614-54a4a99d47d1/ports/98017ddc-efc8-4c25-a915-774b2a633855.xml                
<port 
	state="ACTIVE"/>

                

Response:

No data is returned in the response body.


 

Example 4.26. Update Port Request (JSON)

Request:

PUT tenants/33/networks/158233b0-ca9a-40b4-8614-54a4a99d47d1/ports/98017ddc-efc8-4c25-a915-774b2a633855.json	                
{
    "port": 
    	{
        	"state": "ACTIVE" 
    	}
}

                	

Response:

No data is returned in the response body.