diff options
author | Huang Haibin <haibin.huang@intel.com> | 2018-08-20 15:36:37 +0800 |
---|---|---|
committer | Huang Haibin <haibin.huang@intel.com> | 2018-08-23 14:56:12 +0800 |
commit | a4c8fa026cf7552794989b3c90ca8d40431a33d4 (patch) | |
tree | cdeafbc9e416a3360d632be68ab401228be35eee | |
parent | be1a74cb51a52cf031c6862d31f27ec784767008 (diff) |
Multicloud infra workload Delete and Get
Adding two API:
- Delete infra workload
- Get infra workload
Change-Id: Ie458bb2f6170e57df29a76f06ea21dfe2b6250b7
Issue-ID: MULTICLOUD-250
Signed-off-by: Huang Haibin <haibin.huang@intel.com>
-rw-r--r-- | docs/specs/multicloud_infra_workload.rst | 161 |
1 files changed, 149 insertions, 12 deletions
diff --git a/docs/specs/multicloud_infra_workload.rst b/docs/specs/multicloud_infra_workload.rst index 82bf9df..ba1c312 100644 --- a/docs/specs/multicloud_infra_workload.rst +++ b/docs/specs/multicloud_infra_workload.rst @@ -6,32 +6,33 @@ MultiCloud infra_workload API =============================== -we have two purposes for this API: +We have two purposes for this API: -#. Intergrate SO and Multicloud. +#. Integrate SO and Multicloud. #. Generic API for SO to talk to different Multicloud plugins. Problem Description =================== -Currently HPA flavors are returned by OOF to SO and SO copies these flavors in -the Heat template before sending the Heat template to Multicloud. In Casablanca +Currently HPA flavors are returned by OOF to SO and SO copies these flavors in +the Heat template before sending the Heat template to Multicloud. In Casablanca instead of SO making changes in the Heat template the flavor information will be -provided to Multicloud and Multicloud will pass these as parameters to HEAT +provided to Multicloud and Multicloud will pass this as parameters to HEAT command line. -The detail design refer to https://wiki.onap.org/display/DW/SO+Casablanca+HPA+Design +For further detailed design, please refer to https://wiki.onap.org/display/DW/SO+Casablanca+HPA+Design Propose Change ============== -Add infrastructure workload API -------------------------------- +Add infrastructure workload +--------------------------- -API URL: http://{msb IP}:{msb port}/api/multicloud /v1/{cloud-owner}/{cloud-region-id}/infra_workload +API URL: POST http://{msb IP}:{msb port}/api/multicloud/v1/{cloud-owner}/{cloud-region-id}/infra_workload Request Body: +>>>>>>>>>>>>> :: { @@ -44,6 +45,7 @@ Request Body: } oof_directives: +::::::::::::::: :: "directives":[ @@ -79,9 +81,8 @@ oof_directives: } ] - Heat examples -============= +::::::::::::: :: "template_type":"heat", @@ -119,15 +120,151 @@ Heat examples "timeout_mins":60 } +Response: +>>>>>>>>> + +Response Codes +:::::::::::::: +Success +....... + ++--------------------+----------------------------------------------------------------------+ +| Code | Reason | ++====================+======================================================================+ +| 201 - Created | Resource was created and is ready to use. | ++--------------------+----------------------------------------------------------------------+ + +Error +..... + ++--------------------+----------------------------------------------------------------------+ +| Code | Reason | ++====================+======================================================================+ +| 400 - Bad Request | Some content in the request was invalid. | ++--------------------+----------------------------------------------------------------------+ +| 401 - Unauthorized | User must authenticate before making a request. | ++--------------------+----------------------------------------------------------------------+ +| 409 - Conflict | This operation conflicted with another operation on this resource. | ++--------------------+----------------------------------------------------------------------+ + +Response Body +::::::::::::: +:: + + { + "template_type":"heat", + "workload_id": "<The ID of infrastructure workload resource>" + "template_response": + { + "stack": { + "id": "<The UUID of stack>", + "links": [ + { + "href": "<A list of URLs for the stack>", + "rel": "self" + } + ] + } + } + +Delete infrastructure workload +------------------------------ + +API DELETE URL: http://{msb IP}:{msb port}/api/multicloud/v1/{cloud-owner}/{cloud-region-id}/infra_workload/{workload-id} + +Response: +>>>>>>>>> + +Response Codes +:::::::::::::: +Success +....... + ++--------------------+----------------------------------------------------------------------+ +| Code | Reason | ++====================+======================================================================+ +| 204 - No Content | The server has fulfilled the request by deleting the resource. | ++--------------------+----------------------------------------------------------------------+ + +Error +..... + ++--------------------+----------------------------------------------------------------------+ +| Code | Reason | ++====================+======================================================================+ +| 400 - Bad Request | Some content in the request was invalid. | ++--------------------+----------------------------------------------------------------------+ +| 401 - Unauthorized | User must authenticate before making a request. | ++--------------------+----------------------------------------------------------------------+ +| 404 - Not Found | The requested resource could not be found. | ++--------------------+----------------------------------------------------------------------+ +| 500 - Internal | Something went wrong inside the service. This should not happen | +| Server Error | usually. If it does happen, it means the server has experienced | +| | some serious problems. | ++--------------------+----------------------------------------------------------------------+ + +Response Body +::::::::::::: +This request does not return anything in the response body. + +Get infrastructure workload +---------------------------- + +API GET URL: http://{msb IP}:{msb port}/api/multicloud/v1/{cloud-owner}/{cloud-region-id}/infra_workload/{workload-id} + +Response: +>>>>>>>>> + +Response Codes +:::::::::::::: +Success +....... + ++--------------------+----------------------------------------------------------------------+ +| Code | Reason | ++====================+======================================================================+ +| 200 - OK | Request was successful. | ++--------------------+----------------------------------------------------------------------+ + +Error +..... + ++--------------------+----------------------------------------------------------------------+ +| Code | Reason | ++====================+======================================================================+ +| 400 - Bad Request | Some content in the request was invalid. | ++--------------------+----------------------------------------------------------------------+ +| 401 - Unauthorized | User must authenticate before making a request. | ++--------------------+----------------------------------------------------------------------+ +| 404 - Not Found | The requested resource could not be found. | ++--------------------+----------------------------------------------------------------------+ +| 500 - Internal | Something went wrong inside the service. This should not happen | +| Server Error | usually. If it does happen, it means the server has experienced | +| | some serious problems. | ++--------------------+----------------------------------------------------------------------+ + +Response Body +::::::::::::: +:: + + { + "template_type":"<heat/tosca/etc.>", + "workload_id": "<The ID of infrastructure workload resource>", + "workload_status":"CREATE_IN_PROCESS/CREATE_COMPLETE/DELETE_IN_PROCESS/etc" + } + Work Items ========== #. Work with SO. #. Work with OOF team for oof_directive form. #. Work with SDNC team for sdc_directive form. +#. Expose API by broker and each plugin. Tests ===== -#. Unit Tests with tox +#. Unit Tests with tox. +#. Pairwise test with SO project. +#. Integration test with vCPE HPA test. #. CSIT Tests, the input/ouput of broker and each plugin see API design above. |