Difference between revisions of "Neutron/DeviceInventory"
m (ThierryCarrez moved page Quantum/DeviceInventory to Neutron/DeviceInventory) |
|||
(10 intermediate revisions by one other user not shown) | |||
Line 3: | Line 3: | ||
<!-- ## page was renamed from Quantum/LBaaS/RESTAPI/ProviderAPI/proposal --> | <!-- ## page was renamed from Quantum/LBaaS/RESTAPI/ProviderAPI/proposal --> | ||
= Device Inventory Management = | = Device Inventory Management = | ||
+ | |||
+ | Rationale: Some vendor drivers may require storing available appliances and their parameters to choose to which instance logical configuration will be deployed. | ||
Device Inventory Management is the central control point for appliances that offer [[Quantum/ServiceInsertion|advanced services]] in Quantum. | Device Inventory Management is the central control point for appliances that offer [[Quantum/ServiceInsertion|advanced services]] in Quantum. | ||
+ | It should be made generic to support different kinds of service devices: loadbalancer, VPN, firewall, etc. | ||
− | + | == Appliance Model == | |
− | |||
− | == | ||
{| border="1" cellpadding="2" cellspacing="0" | {| border="1" cellpadding="2" cellspacing="0" | ||
Line 16: | Line 17: | ||
| ''Required'' | | ''Required'' | ||
| ''Default Value'' | | ''Default Value'' | ||
+ | | ''Comments'' | ||
|- | |- | ||
| id | | id | ||
Line 22: | Line 24: | ||
| y | | y | ||
| generated | | generated | ||
+ | | | ||
|- | |- | ||
| name | | name | ||
Line 28: | Line 31: | ||
| n | | n | ||
| none | | none | ||
+ | | | ||
|- | |- | ||
− | | | + | | service_providers |
| uuid_list | | uuid_list | ||
| CRU | | CRU | ||
| y | | y | ||
| [] | | [] | ||
+ | | list of service providers uuids that the appliance covers | ||
|- | |- | ||
| management | | management | ||
Line 40: | Line 45: | ||
| n | | n | ||
| none | | none | ||
+ | | address, credentials, etc. | ||
|- | |- | ||
| shared | | shared | ||
Line 46: | Line 52: | ||
| n | | n | ||
| true | | true | ||
+ | | shows whether the appliance can be shared among tenants | ||
|- | |- | ||
| tenant_id | | tenant_id | ||
Line 52: | Line 59: | ||
| n | | n | ||
| none | | none | ||
+ | | | ||
|- | |- | ||
| capabilities | | capabilities | ||
Line 58: | Line 66: | ||
| n | | n | ||
| none | | none | ||
+ | | | ||
|} | |} | ||
Line 66: | Line 75: | ||
"id": "f2bf34e0-28b6-4ce5-93aa-8bab56259cad", | "id": "f2bf34e0-28b6-4ce5-93aa-8bab56259cad", | ||
"name": "HAP-001", | "name": "HAP-001", | ||
− | " | + | "service_providers": ["db902c0c-d5ff-4753-b465-668ad9656918"], |
"shared": "true", | "shared": "true", | ||
"management": { | "management": { | ||
Line 74: | Line 83: | ||
"password": "swordfish" | "password": "swordfish" | ||
} | } | ||
+ | "capabilities": { | ||
+ | "lb_methods": [ | ||
+ | "ROUND_ROBIN", | ||
+ | "STATIC_RR" | ||
+ | ], | ||
+ | "protocols": [ | ||
+ | "TCP", | ||
+ | "HTTP" | ||
+ | ], | ||
+ | "healthMonitors": [ | ||
+ | "ICMP", | ||
+ | "HTTP" | ||
+ | ], | ||
+ | "sessionPersistences": [ | ||
+ | "HTTP_COOKIE", | ||
+ | "SOURCE_IP" | ||
+ | ] | ||
} | } | ||
</nowiki></pre> | </nowiki></pre> | ||
− | + | == API commands: == | |
{| border="1" cellpadding="2" cellspacing="0" | {| border="1" cellpadding="2" cellspacing="0" | ||
| ''Verb'' | | ''Verb'' | ||
− | | ''URI'' | + | | ''URI'' |
+ | | ''Comments'' | ||
|- | |- | ||
| GET | | GET | ||
− | | /v2.0/ | + | | /v2.0/appliances |
+ | | | ||
|- | |- | ||
| POST | | POST | ||
− | | /v2.0/ | + | | /v2.0/appliances |
+ | | admin only | ||
|- | |- | ||
| GET | | GET | ||
− | | /v2.0/ | + | | /v2.0/appliances/{appliance_id} |
+ | | | ||
|- | |- | ||
| UPDATE | | UPDATE | ||
− | | /v2.0/ | + | | /v2.0/appliances/{appliance_id} |
+ | | admin only | ||
|- | |- | ||
| DELETE | | DELETE | ||
− | | /v2.0/ | + | | /v2.0/appliances/{appliance_id} |
+ | | admin only | ||
|} | |} | ||
− | == List | + | === List Appliances === |
{| border="1" cellpadding="2" cellspacing="0" | {| border="1" cellpadding="2" cellspacing="0" | ||
Line 106: | Line 138: | ||
|- | |- | ||
| GET | | GET | ||
− | | / | + | | /appliances |
|} | |} | ||
Line 120: | Line 152: | ||
<pre><nowiki> | <pre><nowiki> | ||
− | GET /v2.0/ | + | GET /v2.0/appliances |
Accept: application/json | Accept: application/json | ||
</nowiki></pre> | </nowiki></pre> | ||
Line 129: | Line 161: | ||
<pre><nowiki> | <pre><nowiki> | ||
{ | { | ||
− | " | + | "appliances": [ |
{ | { | ||
"id": "f2bf34e028b64ce593aa8bab56259cad", | "id": "f2bf34e028b64ce593aa8bab56259cad", | ||
"name": "HAP-001", | "name": "HAP-001", | ||
− | " | + | "service_providers": ["db902c0c-d5ff-4753-b465-668ad9656918"], |
"shared": "true", | "shared": "true", | ||
"management": { | "management": { | ||
Line 165: | Line 197: | ||
− | == Show | + | === Show Appliance === |
{| border="1" cellpadding="2" cellspacing="0" | {| border="1" cellpadding="2" cellspacing="0" | ||
Line 172: | Line 204: | ||
|- | |- | ||
| GET | | GET | ||
− | | / | + | | /appliances/{appliance_id} |
|} | |} | ||
Line 186: | Line 218: | ||
<pre><nowiki> | <pre><nowiki> | ||
− | GET /v2.0/ | + | GET /v2.0/appliances/{afc75773-640e-403c-9fff-62ba98db1f19} |
Accept: application/json | Accept: application/json | ||
</nowiki></pre> | </nowiki></pre> | ||
Line 195: | Line 227: | ||
<pre><nowiki> | <pre><nowiki> | ||
{ | { | ||
− | " | + | "appliance": { |
− | "id": " | + | "id": "afc75773-640e-403c-9fff-62ba98db1f19", |
"name": "HAP-001", | "name": "HAP-001", | ||
− | " | + | "service_providers": ["db902c0c-d5ff-4753-b465-668ad9656918"], |
"shared": "true", | "shared": "true", | ||
"management": { | "management": { | ||
Line 233: | Line 265: | ||
− | == Create | + | === Create Appliance === |
{| border="1" cellpadding="2" cellspacing="0" | {| border="1" cellpadding="2" cellspacing="0" | ||
Line 240: | Line 272: | ||
|- | |- | ||
| POST | | POST | ||
− | | / | + | | /appliances |
|} | |} | ||
Line 254: | Line 286: | ||
<pre><nowiki> | <pre><nowiki> | ||
− | POST /v2.0/ | + | POST /v2.0/appliances |
Content-Type: application/json | Content-Type: application/json | ||
Accept: application/json | Accept: application/json | ||
Line 263: | Line 295: | ||
<pre><nowiki> | <pre><nowiki> | ||
{ | { | ||
− | " | + | "appliance": { |
"name": "HAP-001", | "name": "HAP-001", | ||
− | " | + | "service_providers": ["db902c0c-d5ff-4753-b465-668ad9656918"], |
"shared": "false", | "shared": "false", | ||
"tenant_id": "f2bf34e028b64ce593aa8bab56259cad", | "tenant_id": "f2bf34e028b64ce593aa8bab56259cad", | ||
Line 283: | Line 315: | ||
<pre><nowiki> | <pre><nowiki> | ||
{ | { | ||
− | " | + | "appliance": { |
"id": "f2bf34e028b64ce593aa8bab56259cad", | "id": "f2bf34e028b64ce593aa8bab56259cad", | ||
"name": "HAP-001", | "name": "HAP-001", | ||
− | " | + | "service_providers": ["db902c0c-d5ff-4753-b465-668ad9656918"], |
"is_public": "true", | "is_public": "true", | ||
"management": { | "management": { | ||
Line 299: | Line 331: | ||
− | == Update | + | === Update Appliance === |
{| border="1" cellpadding="2" cellspacing="0" | {| border="1" cellpadding="2" cellspacing="0" | ||
Line 306: | Line 338: | ||
|- | |- | ||
| PUT | | PUT | ||
− | | / | + | | /appliances/{appliance_id} |
|} | |} | ||
Line 329: | Line 361: | ||
<pre><nowiki> | <pre><nowiki> | ||
− | PUT /v2.0/ | + | PUT /v2.0/appliances/fc68ea2c-b60b-4b4f-bd82-94ec81110766 |
Content-Type: application/json | Content-Type: application/json | ||
Accept: application/json | Accept: application/json | ||
Line 338: | Line 370: | ||
<pre><nowiki> | <pre><nowiki> | ||
{ | { | ||
− | " | + | "appliance": { |
"name": "HAP-001-new", | "name": "HAP-001-new", | ||
} | } | ||
Line 353: | Line 385: | ||
{ | { | ||
− | " | + | "appliance": { |
− | "id": " | + | "id": "fc68ea2c-b60b-4b4f-bd82-94ec81110766", |
"name": "HAP-001-new", | "name": "HAP-001-new", | ||
"type": "virtual_load_balancing", | "type": "virtual_load_balancing", | ||
Line 369: | Line 401: | ||
− | == Delete | + | === Delete Appliance === |
{| border="1" cellpadding="2" cellspacing="0" | {| border="1" cellpadding="2" cellspacing="0" | ||
Line 376: | Line 408: | ||
|- | |- | ||
| DELETE | | DELETE | ||
− | | / | + | | /appliances/{appliance_id} |
|} | |} | ||
Line 390: | Line 422: | ||
<pre><nowiki> | <pre><nowiki> | ||
− | DELETE /v2.0/ | + | DELETE /v2.0/appliances/{afc75773-640e-403c-9fff-62ba98db1f19} |
Accept: application/json | Accept: application/json | ||
</nowiki></pre> | </nowiki></pre> |
Latest revision as of 15:54, 21 June 2013
Contents
Device Inventory Management
Rationale: Some vendor drivers may require storing available appliances and their parameters to choose to which instance logical configuration will be deployed.
Device Inventory Management is the central control point for appliances that offer advanced services in Quantum. It should be made generic to support different kinds of service devices: loadbalancer, VPN, firewall, etc.
Appliance Model
Attribute | Type | CRUD | Required | Default Value | Comments |
id | uuid | CR | y | generated | |
name | string | CRU | n | none | |
service_providers | uuid_list | CRU | y | [] | list of service providers uuids that the appliance covers |
management | object | CRU | n | none | address, credentials, etc. |
shared | boolean | CR | n | true | shows whether the appliance can be shared among tenants |
tenant_id | uuid | CR | n | none | |
capabilities | object | R | n | none |
Example
{ "id": "f2bf34e0-28b6-4ce5-93aa-8bab56259cad", "name": "HAP-001", "service_providers": ["db902c0c-d5ff-4753-b465-668ad9656918"], "shared": "true", "management": { "address": "10.0.0.6", "port": 22, "user": "user", "password": "swordfish" } "capabilities": { "lb_methods": [ "ROUND_ROBIN", "STATIC_RR" ], "protocols": [ "TCP", "HTTP" ], "healthMonitors": [ "ICMP", "HTTP" ], "sessionPersistences": [ "HTTP_COOKIE", "SOURCE_IP" ] }
API commands:
Verb | URI | Comments |
GET | /v2.0/appliances | |
POST | /v2.0/appliances | admin only |
GET | /v2.0/appliances/{appliance_id} | |
UPDATE | /v2.0/appliances/{appliance_id} | admin only |
DELETE | /v2.0/appliances/{appliance_id} | admin only |
List Appliances
Verb | URI |
GET | /appliances |
Normal Response Code: 200
Error Response Codes: Unauthorized (401)
This operation does not require a request body, unless the Quantum server is running without Keystone integration.
This operation returns a response body.
JSON Request:
GET /v2.0/appliances Accept: application/json
JSON Response:
{ "appliances": [ { "id": "f2bf34e028b64ce593aa8bab56259cad", "name": "HAP-001", "service_providers": ["db902c0c-d5ff-4753-b465-668ad9656918"], "shared": "true", "management": { "address": "10.0.0.6", "port": 22, "user": "user", "password": "swordfish" }, "capabilities": { "lb_methods": [ "STATIC_RR", "ROUND_ROBIN", ], "protocols": [ "TCP", "HTTP" ], "healthMonitors": [ "ICMP", "HTTP_GET", ], "sessionPersistences": [ "COOKIE", "SRC_ADDR" ] } } ] }
Show Appliance
Verb | URI |
GET | /appliances/{appliance_id} |
Normal Response Code: 200
Error Response Codes: Unauthorized (401), Not Found (404)
This operation does not require a request body, unless the Quantum server is running without Keystone integration.
This operation returns a response body.
JSON Request:
GET /v2.0/appliances/{afc75773-640e-403c-9fff-62ba98db1f19} Accept: application/json
JSON Response:
{ "appliance": { "id": "afc75773-640e-403c-9fff-62ba98db1f19", "name": "HAP-001", "service_providers": ["db902c0c-d5ff-4753-b465-668ad9656918"], "shared": "true", "management": { "address": "10.0.0.6", "port": 22, "user": "user", "password": "swordfish" }, "capabilities": { "lb_methods": [ "STATIC_RR", "ROUND_ROBIN", "HASH_SOURCE", "LEAST_CONNECTION", "HASH_URI" ], "protocols": [ "TCP", "HTTP" ], "healthMonitors": [ "ICMP", "HTTP_GET", "HTTP_HEAD" ], "sessionPersistences": [ "COOKIE", "SRC_ADDR" ] } } }
Create Appliance
Verb | URI |
POST | /appliances |
Normal Response Code: 201
Error Response Codes: Bad Request (400) Unauthorized (401)
This operation requires a request body. The request body must contain a network object that specifies a symbolic name for the network.
This operation returns a response body.
JSON Request:
POST /v2.0/appliances Content-Type: application/json Accept: application/json
{ "appliance": { "name": "HAP-001", "service_providers": ["db902c0c-d5ff-4753-b465-668ad9656918"], "shared": "false", "tenant_id": "f2bf34e028b64ce593aa8bab56259cad", "management": { "address": "10.0.0.6", "port": 22, "user": "user", "password": "swordfish" } } }
JSON Response:
{ "appliance": { "id": "f2bf34e028b64ce593aa8bab56259cad", "name": "HAP-001", "service_providers": ["db902c0c-d5ff-4753-b465-668ad9656918"], "is_public": "true", "management": { "address": "10.0.0.6", "port": 22, "user": "user", "password": "swordfish" } } }
Update Appliance
Verb | URI |
PUT | /appliances/{appliance_id} |
Normal Response Code: 200
Error Response Codes: Bad Request (400) Unauthorized (401), Forbidden (403) Not Found (404)
This operation requires a request body. You can set the following attributes in the request body:
Attribute |
name |
management |
If update of any other attributes is asked, a 400 Bad Request error is returned. Note: like in Quantum, update operations adopt patch semantics. This implies that user is not required to send the whole resource to be updated, but just the attributes that the user wishes to update, as shown in the following example.
This operation returns a response body.
JSON Request:
PUT /v2.0/appliances/fc68ea2c-b60b-4b4f-bd82-94ec81110766 Content-Type: application/json Accept: application/json
{ "appliance": { "name": "HAP-001-new", } }
JSON Response:
status: 200 content-length: 192 content-type: application/json { "appliance": { "id": "fc68ea2c-b60b-4b4f-bd82-94ec81110766", "name": "HAP-001-new", "type": "virtual_load_balancing", "is_public": "true", "management": { "address": "10.0.0.6", "port": 22, "user": "user", "password": "swordfish" } } }
Delete Appliance
Verb | URI |
DELETE | /appliances/{appliance_id} |
Normal Response Code: 204
Error Response Codes: Unauthorized (401), Not Found (404)
This operation does not require a request body.
This operation does not return a response body.
JSON Request:
DELETE /v2.0/appliances/{afc75773-640e-403c-9fff-62ba98db1f19} Accept: application/json
JSON Response:
status: 204