Skip to content
kazuya edited this page Jan 6, 2012 · 3 revisions

Attachments

Retrieve all attached resources

Retrieve all the resources currently attached to a network.

  • tenant_id : an unique id of the tenant (required).
  • net_id : an unique id of the network (required).
GET /tenants/:tenant_id/networks/:net_id/attachments

Response

  • **200
  • **404 Not found the specified tenant or network.
  • **500 Internal error.
[
  {
    "id" : "mac_created_via_rest_if",
    "mac" : "01:00:00:00:00:01"
  }
]

Plug resources

Plug resources into a network.

  • tenant_id : an unique id of the tenant (required).
  • net_id : an unique id of the network (required).
POST /tenants/:tenant_id/networks/:net_id/attachments

Input

  • id : an unique id of the attachment (mandatory).
  • mac : a mac address attached to the logical port (mandatory).
{ 
  "id" : "mac_created_via_rest_if", 
  "mac" : "01:00:00:00:00:01" 
}

Response

  • 202 : Succeeded.
  • 404 : Not found.
  • 422 : The specified parameters are unacceptable.
  • 500 : Internal error. (Failed to attach the specified resource.)

Show an attachment information

Show information about the attachment specified by the request URI.

  • tenant_id : an unique id of the tenant (required).
  • net_id : an unique id of the network (required).
  • attachment_id : an unique id of the attachement (required).
GET /tenants/:tenant_id/networks/:net_id/attachments/:attachment_id

Response

  • 200 : OK
  • 404 : Not found the specified tenant, network or attachment.
  • 500 : Internal error.
{
  "id" : "mac_created_via_rest_if",
  "mac" : "01:00:00:00:00:01"
}

Remove an attachemnt

Remove the attachment specified by the request URI.

  • tenant_id : an unique id of the tenant (required).
  • net_id : an unique id of the network (required).
  • attachment_id : an unique id of the attachement (required).
DELETE /tenants/:tenant_id/networks/:net_id/attachments/:attachment_id

Response

  • 202 : Succeeded.
  • 404 : Not found the specified tenant, network or attachment.
  • 500 : Internal error. (Failed to remove the specified attachment.)
Clone this wiki locally