Atom feed of this document
 

 Plug Attachment into Port

Verb URI Description
PUT /tenants/tenant-id/networks/network-id/ports/port-id/attachment Plugs a resource, such as a virtual network interface, into the port identified by port-id.

Normal Response Code(s): 204

Error Response Code(s): Unauthorized (401), Forbidden (403), NetworkNotFound (420), PortNotFound (430), PortInUse (432), AlreadyAttached (440)

This operation plugs an attachment into the port specified in the request URL.

Quantum validates the request and dispatches the request to the plugin. It is not guaranteed that the attached resource will be available as soon as the operation returns.

The validation can fail if:

  • An attachment with the same identifier is already plugged in somewhere else.

  • Another attachment is already plugged into the specified port.

If validation fails, the attachment is not created at all, and the appropriate error code is returned to the caller.

If no attachment is currently plugged into the port, the operation does not return any attachment identifier in the response. The response will contain an empty attachment element.

The request body for this network should contain a reference to the attachment to plug into the port.

 

Example 4.31. Plug Attachment Request (XML)

Request:

PUT /tenants/XYZ/networks/158233b0-ca9a-40b4-8614-54a4a99d47d1/ports/b832be00-6553-4f69-af33-acd554e36d08/attachment.xml	                
<attachment 
	id="test_interface_identifier"/>
                   

Response:

No data is returned in the response body.


 

Example 4.32. Plug Attachment Request (JSON)

Request:

PUT /tenants/XYZ/networks/158233b0-ca9a-40b4-8614-54a4a99d47d1/ports/b832be00-6553-4f69-af33-acd554e36d08/attachment.json	                
{
 "attachment":
     {
         "id": "test_interface_identifier"
     }
}

                    

Response:

No data is returned in the response body.