Difference between revisions of "MelangeAPIBase"
Line 86: | Line 86: | ||
All the urls below are prefixed by "/v0.1". | All the urls below are prefixed by "/v0.1". | ||
− | == | + | == IP Blocks == |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
---- | ---- | ||
Line 332: | Line 168: | ||
~+~-'type': 'public' or 'private' [Mandatory] | ~+~-'type': 'public' or 'private' [Mandatory] | ||
− | 'cidr': | + | 'cidr': IPV4 or IPV6 cidr [Mandatory] |
'network_id' : Can be a uuid, any string accepted | 'network_id' : Can be a uuid, any string accepted | ||
Line 414: | Line 250: | ||
Error - 404 Not Found [When IpBlock doesn't exist]-~+~ | Error - 404 Not Found [When IpBlock doesn't exist]-~+~ | ||
− | == IP Address from | + | == IP Address from Tenant's IP Blocks == |
---- | ---- | ||
− | === List addresses === | + | === List tenant's addresses === |
---- | ---- | ||
Line 425: | Line 261: | ||
|- | |- | ||
| GET | | GET | ||
− | | /ipam/ip_blocks/{ip_block_id}/ip_addresses | + | | /ipam/tenants/{tenant_id}/ip_blocks/{ip_block_id}/ip_addresses |
|} | |} | ||
Line 436: | Line 272: | ||
~+~-Normal Response code: 200 | ~+~-Normal Response code: 200 | ||
− | Error - 404 Not Found (When [[IpBlock]] for given ip_block_id is not found)-~+~ | + | Error - 404 Not Found (When [[IpBlock]] for given ip_block_id and tenant_id is not found)-~+~ |
---- | ---- | ||
− | === Get address | + | === Get address details === |
---- | ---- | ||
Line 447: | Line 283: | ||
|- | |- | ||
| GET | | GET | ||
− | | /ipam/ip_blocks/{ip_block_id}/ip_addresses/{address} | + | | /ipam/tenants/{tenant_id}/ip_blocks/{ip_block_id}/ip_addresses/{address} |
|} | |} | ||
Line 458: | Line 294: | ||
~+~-Normal Response code: 200 | ~+~-Normal Response code: 200 | ||
− | Error - 404 Not Found (When [[IpBlock]] for given ip_block_id is not found, or [[IpAddress]] for given address is not found)-~+~ | + | Error - 404 Not Found (When either [[IpBlock]] for given ip_block_id and tenant_id is not found, or [[IpAddress]] for given address is not found)-~+~ |
---- | ---- | ||
− | === Allocate address === | + | === Allocate tenant's address === |
---- | ---- | ||
Line 469: | Line 305: | ||
|- | |- | ||
| POST | | POST | ||
− | | /ipam/ip_blocks/{ip_block_id}/ip_addresses | + | | /ipam/tenants/{tenant_id}/ip_blocks/{ip_block_id}/ip_addresses |
|} | |} | ||
Line 476: | Line 312: | ||
~+~-'address' : This address is used for allocation. If this is not provided, next available address will be allocated. | ~+~-'address' : This address is used for allocation. If this is not provided, next available address will be allocated. | ||
− | ' | + | 'interface_id' : Can be a uuid, any string accepted-~+~ |
<span style="font-size: larger"><span style="font-size: smaller">''Response Codes:'' </span></span> | <span style="font-size: larger"><span style="font-size: smaller">''Response Codes:'' </span></span> | ||
Line 487: | Line 323: | ||
---- | ---- | ||
− | === Deallocate address === | + | === Deallocate tenant's address === |
---- | ---- | ||
Line 495: | Line 331: | ||
|- | |- | ||
| DELETE | | DELETE | ||
− | | /ipam/ip_blocks/{ip_block_id}/ip_addresses/{address} | + | | /ipam/tenants/{tenant_id}/ip_blocks/{ip_block_id}/ip_addresses/{address} |
|} | |} | ||
Line 506: | Line 342: | ||
~+~-Normal Response code: 200 | ~+~-Normal Response code: 200 | ||
− | Error - 404 Not Found (When | + | Error - 404 Not Found (When ip_block for given id and tenant_id is not found)-~+~ |
---- | ---- | ||
− | === Restore address === | + | === Restore tenant's address === |
---- | ---- | ||
Line 517: | Line 353: | ||
|- | |- | ||
| PUT | | PUT | ||
− | | /ipam/ip_blocks/{ip_block_id}/ip_addresses/{address}/restore | + | | /ipam/tenants/{tenant_id}/ip_blocks/{ip_block_id}/ip_addresses/{address}/restore |
|} | |} | ||
Line 528: | Line 364: | ||
~+~-Normal Response code: 200 | ~+~-Normal Response code: 200 | ||
− | Error - 404 Not Found (When [[IpBlock]] for given | + | Error - 404 Not Found (When [[IpBlock]] for given id and tenant_id is not found or [[IpAddress]] for given address is not found)-~+~ |
− | == IP | + | == IP allocations in a Network == |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | These API create an IPv4 and IPv6 address for given interface. | |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
---- | ---- | ||
− | === | + | === Allocate address from tenant's network === |
---- | ---- | ||
Line 562: | Line 378: | ||
| URI | | URI | ||
|- | |- | ||
− | | | + | | POST |
− | | /ipam/tenants/{tenant_id}/ | + | | /ipam/tenants/{tenant_id}/networks/{network_id}/interfaces/{interface_id}/ip_allocations |
|} | |} | ||
<span style="font-size: larger"><span style="font-size: smaller">''Params:'' </span></span> | <span style="font-size: larger"><span style="font-size: smaller">''Params:'' </span></span> | ||
− | <span style="font-size: larger"><span style="font-size: smaller"> | + | <span style="font-size: larger"><span style="font-size: smaller">'address' : This address is used for allocation. If this is not provided, next available address will be allocated.</span></span> |
<span style="font-size: larger"><span style="font-size: smaller">''Response Codes:'' </span></span> | <span style="font-size: larger"><span style="font-size: smaller">''Response Codes:'' </span></span> | ||
− | ~+~-Normal Response code: | + | ~+~-Normal Response code: 201 |
− | Error - | + | Error - 422 Unprocessable Entity [If ip address can not be allocated from Network] |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | + | Error - 404 Not Found [When network for a given network_id and tenant_id is not found] | |
− | |||
− | |||
Error - 409 Conflict [If the given address is already allocated]-~+~ | Error - 409 Conflict [If the given address is already allocated]-~+~ | ||
---- | ---- | ||
− | === | + | === List allocated [[IpAddresses]] from a tenant's network === |
---- | ---- | ||
Line 610: | Line 404: | ||
| URI | | URI | ||
|- | |- | ||
− | | | + | | GET |
− | | /ipam/tenants/{tenant_id}/ | + | | /ipam/tenants/{tenant_id}/networks/{network_id}/interfaces/{interface_id}/ip_allocations |
|} | |} | ||
Line 622: | Line 416: | ||
~+~-Normal Response code: 200 | ~+~-Normal Response code: 200 | ||
− | Error | + | Error - 404 Not Found [When network for a given network_id and tenant_id is not found]-~+~ |
---- | ---- | ||
− | === | + | ===Deallocate all [[IpAddresses]] from a tenant's network === |
---- | ---- | ||
Line 632: | Line 426: | ||
| URI | | URI | ||
|- | |- | ||
− | | | + | | DELETE |
− | | /ipam/tenants/{tenant_id}/ | + | | /ipam/tenants/{tenant_id}/networks/{network_id}/interfaces/{interface_id}/ip_allocations |
|} | |} | ||
Line 644: | Line 438: | ||
~+~-Normal Response code: 200 | ~+~-Normal Response code: 200 | ||
− | Error | + | Error - 404 Not Found [When network for a given network_id and tenant_id is not found]-~+~ |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
== NAT'ing == | == NAT'ing == | ||
Line 876: | Line 618: | ||
Error - 404 Not Found [When IpBlock for ip_block_id or IpAddress by given address is not found]-~+~ | Error - 404 Not Found [When IpBlock for ip_block_id or IpAddress by given address is not found]-~+~ | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
== Tenant Policies == | == Tenant Policies == | ||
− | = | + | === Tenant Policy Unusable Ip Ranges === |
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | == Tenant Policy Unusable Ip Ranges == | ||
− | === List all unusable ip ranges of a tenant's policy === | + | ==== List all unusable ip ranges of a tenant's policy ==== |
Method : GET | Method : GET | ||
Line 1,055: | Line 631: | ||
Error - 404 Not Found [When Policy doesn't exist] | Error - 404 Not Found [When Policy doesn't exist] | ||
− | === Get details of a tenant's policy's unusable ip range === | + | ==== Get details of a tenant's policy's unusable ip range ==== |
Method : GET | Method : GET | ||
Line 1,063: | Line 639: | ||
Error - 404 Not Found [When Policy or Ip Range doesn't exist] | Error - 404 Not Found [When Policy or Ip Range doesn't exist] | ||
− | === Create a unusable ip range in tenant's policy === | + | ==== Create a unusable ip range in tenant's policy ==== |
Method : POST | Method : POST | ||
Line 1,072: | Line 648: | ||
Error - 404 Not Found [When Policy doesn't exist] | Error - 404 Not Found [When Policy doesn't exist] | ||
− | === Update details of a tenant's policy's unusable ip range === | + | ==== Update details of a tenant's policy's unusable ip range ==== |
Method : PUT | Method : PUT | ||
Line 1,080: | Line 656: | ||
Error - 404 Not Found [When Policy or Ip Range doesn't exist] | Error - 404 Not Found [When Policy or Ip Range doesn't exist] | ||
− | === Delete a tenant's policy's unusable ip range === | + | ==== Delete a tenant's policy's unusable ip range ==== |
Method : DELETE | Method : DELETE | ||
Line 1,088: | Line 664: | ||
Error - 404 Not Found [When Policy or Ip Range doesn't exist] | Error - 404 Not Found [When Policy or Ip Range doesn't exist] | ||
− | == Tenant Policy Unusable Ip Octets == | + | === Tenant Policy Unusable Ip Octets === |
− | === List all unusable ip octets of a tenant's policy === | + | ==== List all unusable ip octets of a tenant's policy ==== |
Method : GET | Method : GET | ||
Line 1,097: | Line 673: | ||
Error - 404 Not Found [When Policy doesn't exist] | Error - 404 Not Found [When Policy doesn't exist] | ||
− | === Get details of a tenant's policy's unusable ip octet === | + | ==== Get details of a tenant's policy's unusable ip octet ==== |
Method : GET | Method : GET | ||
Line 1,105: | Line 681: | ||
Error - 404 Not Found [When Policy or Ip Octet doesn't exist] | Error - 404 Not Found [When Policy or Ip Octet doesn't exist] | ||
− | === Create a unusable ip octet in tenant's policy === | + | ==== Create a unusable ip octet in tenant's policy ==== |
Method : POST | Method : POST | ||
Line 1,113: | Line 689: | ||
Error - 404 Not Found [When Policy doesn't exist] | Error - 404 Not Found [When Policy doesn't exist] | ||
− | === Update details of a tenant's policy's unusable ip octet. === | + | ==== Update details of a tenant's policy's unusable ip octet. ==== |
Method : PUT | Method : PUT | ||
Line 1,121: | Line 697: | ||
Error - 404 Not Found [When Policy or Ip Octet doesn't exist] | Error - 404 Not Found [When Policy or Ip Octet doesn't exist] | ||
− | === Delete a tenant's policy's unusable ip octet === | + | ==== Delete a tenant's policy's unusable ip octet ==== |
Method : DELETE | Method : DELETE | ||
Line 1,131: | Line 707: | ||
== To Be Done: == | == To Be Done: == | ||
− | |||
− | |||
* Add 'self' and 'bookmark' links in resource details. | * Add 'self' and 'bookmark' links in resource details. | ||
* Versions atom feed | * Versions atom feed | ||
− | * | + | * API to list all IPs by an instance_id |
Revision as of 11:29, 7 September 2011
Melange API Specification
<<TableOfContents()>>
General Information
The Melange API is implemented using a RESTful web service interface.
- All GET /resources accepts 'limit' and 'marker' params. If these params are not passed default limit is applied.
- If POST or PUT on a resource doesn't send mandatory params, API returns '400 Bad Request' response.
Request/Response Types
- The Melange API supports both the JSON and XML data serialization formats.
- The request format is specified using the Content-Type header and is required for operations that have a request body.
- The response format can be specified in requests using either the Accept header or adding an .xml or .json extension to the request URI.
- If no response format is specified, JSON is the default.
- If conflicting formats are specified using both an Accept header and a query extension, the query extension takes precedence.
Versions
List versions
Verb | URI |
GET | / |
Params:
None
Response Codes:
Normal Response code: 200
Extensions
The Melange API is extensible. The API Extensions allow introducing new features in the API without requiring a version change and allows vendor specific niche functionality. The API extensions work similar to nova extensions.
List extensions
Verb | URI |
GET | /extensions |
Params:
None
Response Codes:
Normal Response code: 200
List extension details
Verb | URI |
GET | /extensions/alias |
Params:
None
Response Codes:
Normal Response code: 200
NOTE:
All the urls below are prefixed by "/v0.1".
IP Blocks
List Tenant's blocks
Verb | URI |
GET | /ipam/tenants/{tenant_id}/ip_blocks |
Params:
type ('public' or 'private')
Response Codes:
Normal Response code: 200
List Tenant's subnets
Verb | URI |
GET | /ipam/tenants/{tenant_id}/ip_blocks/{ip_block_id}/subnets |
Params:
None
Response Codes:
~+~-Normal Response code: 200
Error - 404 Not Found [When IpBlock doesn't exist]-~+~
Get details of tenant's IP block
Verb | URI |
GET | /ipam/tenants/{tenant_id}/ip_blocks/:(id) |
Params:
None
Response Codes:
~+~-Normal Response code: 200
Error - 404 Not Found [When IpBlock doesn't exist]-~+~
Create tenant's IP block
Verb | URI |
POST | /ipam/tenants/{tenant_id}/ip_blocks |
Params:
~+~-'type': 'public' or 'private' [Mandatory]
'cidr': IPV4 or IPV6 cidr [Mandatory]
'network_id' : Can be a uuid, any string accepted
'policy_id' : Can be a uuid, any string accepted-~+~
Response Codes:
Normal Response code: 201
Create tenant's subnet
Verb | URI |
POST | /ipam/tenants/{tenant_id}/ip_blocks/{ip_block_id}/subnets |
Params:
~+~-'type': 'cidr': IpV4 or IpV6 cidr [Mandatory]
'network_id' : Can be a uuid, any string accepted
'policy_id' : Can be a uuid, any string accepted-~+~
Response Codes:
~+~-Normal Response code: 201
Error - 404 Not Found [When IpBlock doesn't exist]-~+~
Update tenant's IP block
Verb | URI |
PUT | /ipam/tenants/{tenant_id}/ip_blocks/:(id) |
Params:
~+~-'type': 'network_id' : Can be a uuid, any string accepted
'policy_id' : Can be a uuid, any string accepted-~+~
Response Codes:
~+~-Normal Response code: 200
Error - 404 Not Found [When IpBlock doesn't exist]-~+~
Delete tenant's IP block
Verb | URI |
DELETE | /ipam/tenants/{tenant_id}/ip_blocks/:(id) |
Params:
None
Response Codes:
~+~-Normal Response code: 200
Error - 404 Not Found [When IpBlock doesn't exist]-~+~
IP Address from Tenant's IP Blocks
List tenant's addresses
Verb | URI |
GET | /ipam/tenants/{tenant_id}/ip_blocks/{ip_block_id}/ip_addresses |
Params:
None
Response Codes:
~+~-Normal Response code: 200
Error - 404 Not Found (When IpBlock for given ip_block_id and tenant_id is not found)-~+~
Get address details
Verb | URI |
GET | /ipam/tenants/{tenant_id}/ip_blocks/{ip_block_id}/ip_addresses/{address} |
Params:
None
Response Codes:
~+~-Normal Response code: 200
Error - 404 Not Found (When either IpBlock for given ip_block_id and tenant_id is not found, or IpAddress for given address is not found)-~+~
Allocate tenant's address
Verb | URI |
POST | /ipam/tenants/{tenant_id}/ip_blocks/{ip_block_id}/ip_addresses |
Params:
~+~-'address' : This address is used for allocation. If this is not provided, next available address will be allocated.
'interface_id' : Can be a uuid, any string accepted-~+~
Response Codes:
~+~-Normal Response code: 201
Error - 404 Not Found [When IpBlock for given ip_block_id is not found] Error - 422 Unprocessable Entity [If any new ip_address can not be allocated from IpBlock] Error - 409 Conflict [If the given address is already allocated]-~+~
Deallocate tenant's address
Verb | URI |
DELETE | /ipam/tenants/{tenant_id}/ip_blocks/{ip_block_id}/ip_addresses/{address} |
Params:
None
Response Codes:
~+~-Normal Response code: 200
Error - 404 Not Found (When ip_block for given id and tenant_id is not found)-~+~
Restore tenant's address
Verb | URI |
PUT | /ipam/tenants/{tenant_id}/ip_blocks/{ip_block_id}/ip_addresses/{address}/restore |
Params:
None
Response Codes:
~+~-Normal Response code: 200
Error - 404 Not Found (When IpBlock for given id and tenant_id is not found or IpAddress for given address is not found)-~+~
IP allocations in a Network
These API create an IPv4 and IPv6 address for given interface.
Allocate address from tenant's network
Verb | URI |
POST | /ipam/tenants/{tenant_id}/networks/{network_id}/interfaces/{interface_id}/ip_allocations |
Params:
'address' : This address is used for allocation. If this is not provided, next available address will be allocated.
Response Codes:
~+~-Normal Response code: 201
Error - 422 Unprocessable Entity [If ip address can not be allocated from Network]
Error - 404 Not Found [When network for a given network_id and tenant_id is not found]
Error - 409 Conflict [If the given address is already allocated]-~+~
List allocated IpAddresses from a tenant's network
Verb | URI |
GET | /ipam/tenants/{tenant_id}/networks/{network_id}/interfaces/{interface_id}/ip_allocations |
Params:
None
Response Codes:
~+~-Normal Response code: 200
Error - 404 Not Found [When network for a given network_id and tenant_id is not found]-~+~
Deallocate all IpAddresses from a tenant's network
Verb | URI |
DELETE | /ipam/tenants/{tenant_id}/networks/{network_id}/interfaces/{interface_id}/ip_allocations |
Params:
None
Response Codes:
~+~-Normal Response code: 200
Error - 404 Not Found [When network for a given network_id and tenant_id is not found]-~+~
NAT'ing
Tracking NAT information is designed to assist in the implementation and tracking of floating IPs.
List globals
Verb | URI |
GET | /ipam/ip_blocks/{ip_block_id}/ip_addresses/{address}/inside_globals |
Params:
None
Response Codes:
~+~-Normal Response code: 200
Error - 404 Not Found [When IpBlock for ip block ID or IP Address by given address is not found]-~+~
List locals
Verb | URI |
GET | /ipam/ip_blocks/{ip_block_id}/ip_addresses/{address}/inside_locals |
Params:
None
Response Codes:
~+~-Normal Response code: 200
Error - 404 Not Found [When IP Block for ip_block_id or IpAddress by given address is not found]-~+~
Assign globals
Verb | URI |
POST | /ipam/ip_blocks/{ip_block_id}/ip_addresses/{address}/inside_globals |
Params:
{'ip_addresses':'[ { "ip_block_id" : "some_global_ip_block_id", "ip_address" : "some_global_ip_address" } ... {} }
Response Codes:
~+~-Normal Response code: 200
Error - 400 Bad Request [When the values of ip_block_id and ip_address are missing in the params]-~+~
Assign locals
Verb | URI |
POST | /ipam/ip_blocks/{ip_block_id}/ip_addresses/{address}/inside_globals |
Params:
{'ip_addresses':'[ { "ip_block_id" : "some_local_ip_block_id", "ip_address" : "some_local_ip_address" } ... {} }
Response Codes:
~+~-Normal Response code: 200
Error - 400 Bad Request [When the values of ip_block_id and ip_address are missing in the params]-~+~
Remove global
Verb | URI |
DELETE | /ipam/ip_blocks/{ip_block_id}/ip_addresses/{address}/inside_globals/{address} |
Params:
None
Response Codes:
~+~-Normal Response code: 200
Error - 404 Not Found [When IpBlock for ip_block_id or IpAddress by given address is not found]-~+~
Remove local
Verb | URI |
DELETE | /ipam/ip_blocks/{ip_block_id}/ip_addresses/{address}/inside_locals/{address} |
Params:
None
Response Codes:
~+~-Normal Response code: 200
Error - 404 Not Found [When IpBlock for ip_block_id or IpAddress by given address is not found]-~+~
Remove all globals
Verb | URI |
DELETE | /ipam/ip_blocks/{ip_block_id}/ip_addresses/{address}/inside_locals/{address} |
Params:
None
Response Codes:
~+~-Normal Response code: 200
Error - 404 Not Found [When IpBlock for ip_block_id or IpAddress by given address is not found]-~+~
Remove all locals
Verb | URI |
DELETE | /ipam/ip_blocks/{ip_block_id}/ip_addresses/{address}/inside_locals |
Params:
None
Response Codes:
~+~-Normal Response code: 200
Error - 404 Not Found [When IpBlock for ip_block_id or IpAddress by given address is not found]-~+~
Tenant Policies
Tenant Policy Unusable Ip Ranges
List all unusable ip ranges of a tenant's policy
Method : GET URL : /ipam/tenants/{tenant_id}/policies/{policy_id}/unusable_ip_ranges Params : None Response Code : Success - 200 OK
Error - 404 Not Found [When Policy doesn't exist]
Get details of a tenant's policy's unusable ip range
Method : GET URL : /ipam/tenants/{tenant_id}/policies/{policy_id}/unusable_ip_ranges/:(id) Params : None Response Code : Success - 200 OK Error - 404 Not Found [When Policy or Ip Range doesn't exist]
Create a unusable ip range in tenant's policy
Method : POST URL : /ipam/tenants/{tenant_id}/policies/{policy_id}/unusable_ip_ranges Params : 'offset': integer [Mandatory, Can be +ve or -ve integer] 'length' : integer [Mandatory, Should be +ve integer] Response Code : Success - 201 Created Error - 404 Not Found [When Policy doesn't exist]
Update details of a tenant's policy's unusable ip range
Method : PUT URL : /ipam/tenants/{tenant_id}/policies/{policy_id}/unusable_ip_ranges/:(id) Params : 'offset', 'length' Response Code : Success - 200 OK Error - 404 Not Found [When Policy or Ip Range doesn't exist]
Delete a tenant's policy's unusable ip range
Method : DELETE URL : /ipam/tenants/{tenant_id}/policies/{policy_id}/unusable_ip_ranges/:(id) Params : None Response Code : Success - 200 OK Error - 404 Not Found [When Policy or Ip Range doesn't exist]
Tenant Policy Unusable Ip Octets
List all unusable ip octets of a tenant's policy
Method : GET URL : /ipam/tenants/{tenant_id}/policies/{policy_id}/unusable_ip_octets Params : None Response Code : Success - 200 OK Error - 404 Not Found [When Policy doesn't exist]
Get details of a tenant's policy's unusable ip octet
Method : GET URL : /ipam/tenants/{tenant_id}/policies/{policy_id}/unusable_ip_octets/:(id) Params : None Response Code : Success - 200 OK Error - 404 Not Found [When Policy or Ip Octet doesn't exist]
Create a unusable ip octet in tenant's policy
Method : POST URL : /ipam/tenants/{tenant_id}/policies/{policy_id}/unusable_ip_octets Params : 'octet': integer [Mandatory, Should be 0-255] Response Code : Success - 201 Created Error - 404 Not Found [When Policy doesn't exist]
Update details of a tenant's policy's unusable ip octet.
Method : PUT URL : /ipam/tenants/{tenant_id}/policies/{policy_id}/unusable_ip_octets/:(id) Params : 'octet' Response Code : Success - 200 OK Error - 404 Not Found [When Policy or Ip Octet doesn't exist]
Delete a tenant's policy's unusable ip octet
Method : DELETE URL : /ipam/tenants/{tenant_id}/policies/{policy_id}/unusable_ip_octets/:(id) Params : None Response Code : Success - 200 OK Error - 404 Not Found [When Policy or Ip Octet doesn't exist]
To Be Done:
- Add 'self' and 'bookmark' links in resource details.
- Versions atom feed
- API to list all IPs by an instance_id