1 .. This work is licensed under a Creative Commons Attribution 4.0 International License.
2 .. http://creativecommons.org/licenses/by/4.0
3 .. Copyright (c) 2017-2018 Intel, Inc.
5 ===============================
6 MultiCloud infra_workload API
7 ===============================
9 We have two purposes for this API:
11 #. Integrate SO and Multicloud.
12 #. Generic API for SO to talk to different Multicloud plugins.
18 Currently HPA flavors are returned by OOF to SO and SO copies these flavors in
19 the Heat template before sending the Heat template to Multicloud. In Casablanca
20 instead of SO making changes in the Heat template the flavor information will be
21 provided to Multicloud and Multicloud will pass this as parameters to HEAT
22 command line. In Dublin, instead of SO transferring the content of HEAT and HEAT_ENV
23 to Multicloud, Mutlicloud will download these information/artifacts.
24 For further detailed design, please refer to https://wiki.onap.org/display/DW/SO+Casablanca+HPA+Design
36 To support multi-tenants over the same cloud region, all APIs defined below
37 should support to accept the following optional headers which are used to
38 specify a tenant other than the default one associated with the cloud region.
42 "Project" : Tenant/Project ID or Name specified by API consumer, Optional
53 "Project: fcca3cc49d5e42caae15459e27103efc"
57 Add infrastructure workload
58 ---------------------------
60 API URL: POST http://{msb IP}:{msb port}/api/multicloud/v1/{cloud-owner}/{cloud-region-id}/infra_workload
67 "generic-vnf-id":"<generic-vnf-id>",
68 "vf-module-id":"<vf-module-id>",
69 "vf-module-model-invariant-id":"<uuid>",
70 "vf-module-model-version-id":"<uuid>",
71 "vf-module-model-customization-id":"<uuid>",
75 "template_type":"<heat/tosca/etc.>",
79 The 'vf-module-model-"*"-id’s will be used by the Multicloud plugin to retrieve the associated cloud artifacts.
80 The 'oof_directives' is to convey oof’s input to multicloud.
81 The 'sdnc_directives' for SDNC input to MultiCloud.
82 The 'user_directives' is the parameter to convey input from VID portal to mutlicloud.
83 They are all about how to populate data to template parameters.
84 The precedence of the three directives are user_directives and oof_directives the sdnc_directives.
96 "type":"<flavor_directive>",
99 "attribute_name":"<name of attribute, such as flavor label>",
100 "attribute_value":"<value such as cloud specific flavor>"
111 "type":"<Name of directive>",
114 "attribute_name":"<name of attribute>",
115 "attribute_value":"<value>"
127 "template_type":"heat",
130 "disable_rollback":true,
134 "stack_name":"teststack",
136 "heat_template_version":"2013-05-23",
137 "description":"Simple template to test heat commands",
147 "type":"OS::Nova::Server",
149 "key_name":"heat_key",
153 "image":"40be8d1a-3eb9-40de-8abd-43237517384f",
154 "user_data":"#!/bin/bash -xv\necho \"hello world\" > /root/hello-world.txt\n"
170 +--------------------+----------------------------------------------------------------------+
172 +====================+======================================================================+
173 | 201 - Created | Resource was created and is ready to use. |
174 +--------------------+----------------------------------------------------------------------+
179 +--------------------+----------------------------------------------------------------------+
181 +====================+======================================================================+
182 | 400 - Bad Request | Some content in the request was invalid. |
183 +--------------------+----------------------------------------------------------------------+
184 | 401 - Unauthorized | User must authenticate before making a request. |
185 +--------------------+----------------------------------------------------------------------+
186 | 409 - Conflict | This operation conflicted with another operation on this resource. |
187 +--------------------+----------------------------------------------------------------------+
194 "template_type":"heat",
195 "workload_id": "<The ID of infrastructure workload resource>"
199 "id": "<The UUID of stack>",
202 "href": "<A list of URLs for the stack>",
209 Update infrastructure workload information in AAI (i.e. Heatbridge)
210 -------------------------------------------------------------------
212 API URL: POST http://{msb IP}:{msb port}/api/multicloud/v1/{cloud-owner}/{cloud-region-id}/infra_workload/{workload-id}
219 "generic-vnf-id":"<generic-vnf-id>",
220 "vf-module-id":"<vf-module-id>"
231 +--------------------+----------------------------------------------------------------------+
233 +====================+======================================================================+
234 | 202 - Accepted | The request was accepted. |
235 +--------------------+----------------------------------------------------------------------+
240 +--------------------+----------------------------------------------------------------------+
242 +====================+======================================================================+
243 | 400 - Bad Request | Some content in the request was invalid. |
244 +--------------------+----------------------------------------------------------------------+
245 | 401 - Unauthorized | User must authenticate before making a request. |
246 +--------------------+----------------------------------------------------------------------+
247 | 409 - Conflict | This operation conflicted with another operation on this resource. |
248 +--------------------+----------------------------------------------------------------------+
254 Delete infrastructure workload
255 ------------------------------
257 API DELETE URL: http://{msb IP}:{msb port}/api/multicloud/v1/{cloud-owner}/{cloud-region-id}/infra_workload/{workload-id}
267 +--------------------+----------------------------------------------------------------------+
269 +====================+======================================================================+
270 | 204 - No Content | The server has fulfilled the request by deleting the resource. |
271 +--------------------+----------------------------------------------------------------------+
276 +--------------------+----------------------------------------------------------------------+
278 +====================+======================================================================+
279 | 400 - Bad Request | Some content in the request was invalid. |
280 +--------------------+----------------------------------------------------------------------+
281 | 401 - Unauthorized | User must authenticate before making a request. |
282 +--------------------+----------------------------------------------------------------------+
283 | 404 - Not Found | The requested resource could not be found. |
284 +--------------------+----------------------------------------------------------------------+
285 | 500 - Internal | Something went wrong inside the service. This should not happen |
286 | Server Error | usually. If it does happen, it means the server has experienced |
287 | | some serious problems. |
288 +--------------------+----------------------------------------------------------------------+
292 This request does not return anything in the response body.
294 Get infrastructure workload
295 ----------------------------
297 API GET URL: http://{msb IP}:{msb port}/api/multicloud/v1/{cloud-owner}/{cloud-region-id}/infra_workload/{workload-id}
307 +--------------------+----------------------------------------------------------------------+
309 +====================+======================================================================+
310 | 200 - OK | Request was successful. |
311 +--------------------+----------------------------------------------------------------------+
316 +--------------------+----------------------------------------------------------------------+
318 +====================+======================================================================+
319 | 400 - Bad Request | Some content in the request was invalid. |
320 +--------------------+----------------------------------------------------------------------+
321 | 401 - Unauthorized | User must authenticate before making a request. |
322 +--------------------+----------------------------------------------------------------------+
323 | 404 - Not Found | The requested resource could not be found. |
324 +--------------------+----------------------------------------------------------------------+
325 | 500 - Internal | Something went wrong inside the service. This should not happen |
326 | Server Error | usually. If it does happen, it means the server has experienced |
327 | | some serious problems. |
328 +--------------------+----------------------------------------------------------------------+
335 "template_type":"<heat/tosca/etc.>",
336 "workload_id": "<The ID of infrastructure workload resource>",
337 "workload_status":"CREATE_IN_PROCESS/CREATE_COMPLETE/DELETE_IN_PROCESS/AAI_IN_PROGRESS/AAI_COMPLETE/etc"
344 #. Work with OOF team for oof_directive form.
345 #. Work with SDNC team for sdc_directive form.
346 #. Expose API by broker and each plugin.
351 #. Unit Tests with tox.
352 #. Pairwise test with SO project.
353 #. Integration test with vCPE HPA test.
354 #. CSIT Tests, the input/ouput of broker and each plugin see API design above.