forked from trema/apps
-
Notifications
You must be signed in to change notification settings - Fork 0
Ports
kazuya edited this page Jan 6, 2012
·
2 revisions
A short description of the logical ports currently defined.
- tenant_id : a unique id of the tenant (required).
- net_id : a unique id of the network (required).
GET /tenants/:tenant_id/networks/:net_id/ports
- 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 on the network specified in the request URI.
- tenant_id : a unique id of the tenant (required).
- net_id : a unique id of the network (required).
POST /tenants/:tenant_id/networks/:net_id/ports
- id : a unique id of the logical port (option). 'id' is automatically assigned if it is not specified.
- datapath_id : a datapath related with the logical port (mandatory).
- port : a physical port related with the logical port (mandatory).
- vid : a vlan tag related with the logical port (mandatory). if you don't use vlan tag, you should have this field to input 65535.
{
"id" : "port_created_via_rest_if",
"datapath_id" : "1024",
"port" : 1,
"vid" : 65535
}
- 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 logical port port_id configured for the network net_id.
- tenant_id : a unique id of the tenant (required).
- net_id : a unique id of the network (required).
- port_id : a unique id of the logical port (required).
GET /tenants/:tenant_id/networks/:net_id/ports/:port_id
- 200 : OK
- 404 : Not found the specified tenant or network. Not found the specified logical 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 logical port from the network.
- tenant_id : a unique id of the tenant (required).
- net_id : a unique id of the network (required).
- port_id : a unique id of the logical port (required).
DELETE /tenants/:tenant_id/networks/:net_id/ports/:port_id
- 202 : Succeeded.
- 404 : Not found the specified tenant, network or port.
- 500 : Internal error. (Failed to remove the logical port from the specified network. )