X-Git-Url: https://gerrit.onap.org/r/gitweb?p=multicloud%2Fframework.git;a=blobdiff_plain;f=docs%2Fspecs%2Fmulticloud_infra_workload.rst;h=6da49aebdaf0c7c12bf937966c09e7e6134482fa;hp=71fd2343cf70348b7a681a71dd687a9458853998;hb=e884e2812d775013e1f2d719095fd0ac9a6aafa6;hpb=11c98c9db093827f651935c38c1549fc215a9b72 diff --git a/docs/specs/multicloud_infra_workload.rst b/docs/specs/multicloud_infra_workload.rst index 71fd234..6da49ae 100644 --- a/docs/specs/multicloud_infra_workload.rst +++ b/docs/specs/multicloud_infra_workload.rst @@ -6,34 +6,60 @@ 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 -------------------------------- +Multi-Tenant Support +-------------------- -API URL: http://{msb IP}:{msb port}/api/multicloud /v1/{cloud-owner}/{cloud-region-id}/infra_workload +Request Headers: +>>>>>>>>>>>>>>>> -Request Body: +To support multi-tenants over the same cloud region, all APIs defined below +should support to accept the following optional headers which are used to +specify a tenant other than the default one associated with the cloud region. + +:: + + "Project" : Tenant/Project ID or Name specified by API consumer, Optional + + +Example 1: +:: + "Project: tenant1" +Example 2: +:: + + "Project: fcca3cc49d5e42caae15459e27103efc" + + + +Add infrastructure workload +--------------------------- + +API URL: POST http://{msb IP}:{msb port}/api/multicloud/v1/{cloud-owner}/{cloud-region-id}/infra_workload + +Request Body: +>>>>>>>>>>>>> :: { @@ -46,6 +72,7 @@ Request Body: } oof_directives: +::::::::::::::: :: "directives":[ @@ -81,9 +108,9 @@ oof_directives: } ] - Heat examples -============= +::::::::::::: +:: "template_type":"heat", "template_data":{ @@ -120,16 +147,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": "" + "template_response": + { + "stack": { + "id": "", + "links": [ + { + "href": "", + "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":"", + "workload_id": "", + "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. -