Skip to content

Navigation Menu

Sign up
kazuya edited this page Jan 6, 2012 · 2 revisions

Ports

List all ports

List all the ports currently defined.

  • 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/ports

Response

  • 200 : OK
  • 404 : Not found the specified tenant or network.
  • 500 : Internal error.
[
 {
 "vid" : 65535,
 "datapath_id" : "1024",
 "id" : "port_created_via_rest_if",
 "port" : 1
 }
]

Create a logical port

Create a logical port on the network specified in the request URI.

  • 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/ports

Input

  • id : an unique id of the logical port (option) 'id' is automatically assigned if it is not specified.
  • datapath_id : a datapath, physical port, and vlan tag related with the logical port (mandatory)
  • port :
  • vid :
{ 
 "id" : "port_created_via_rest_if", 
 "datapath_id" : "1024", 
 "port" : 1, 
 "vid" : 65535 
}

Response

  • 202 : Succeeded.
  • 404 : Not found the specified tenant or network.
  • 422 : The specified parameters are unacceptable.
  • 500 : Internal error. (Failed to add the logical port to the specified network. )

Retrieve details of a port

Retrieve details of a port port_id configured for the network net_id.

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

Response

  • 200 : OK
  • 404 : Not found the specified tenant or network. Not found the specified port in the network.
  • 500 : Internal error.
{
 "attachments" : [
 {
 "id" : "port_mac_created_via_rest_if",
 "mac" : "01:01:01:01:01:01"
 }
 ],
 "config" : {
 "vid" : 65535,
 "datapath_id" : "1024",
 "port" : 1 
 }
}

Remove a port

Remove a port from the network.

  • tenant_id : an unique id of the tenant (required).
  • net_id : an unique id of the network (required).
  • port_id : an unique id of the port (required).
DELETE /tenants/:tenant_id/networks/:net_id/ports/:port_id

Response

  • 202 : Succeeded.
  • 404 : Not found the specified tenant, network or port.
  • 500 : Internal error. (Failed to remove the logical port from the specified network. )

Clone this wiki locally

AltStyle によって変換されたページ (->オリジナル) /