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
23 For further detailed design, please refer to https://wiki.onap.org/display/DW/SO+Casablanca+HPA+Design
29 Add infrastructure workload
30 ---------------------------
32 API URL: POST http://{msb IP}:{msb port}/api/multicloud/v1/{cloud-owner}/{cloud-region-id}/infra_workload
39 "generic-vnf-id":"<generic-vnf-id>",
40 "vf-module-id":"<vf-module-id>",
43 "template_type":"<heat/tosca/etc.>",
57 "type":"<flavor_directive>",
60 "attribute_name":"<name of attribute, such as flavor label>",
61 "attribute_value":"<value such as cloud specific flavor>"
72 "type":"<Name of directive>",
75 "attribute_name":"<name of attribute>",
76 "attribute_value":"<value>"
88 "template_type":"heat",
91 "disable_rollback":true,
95 "stack_name":"teststack",
97 "heat_template_version":"2013-05-23",
98 "description":"Simple template to test heat commands",
108 "type":"OS::Nova::Server",
110 "key_name":"heat_key",
114 "image":"40be8d1a-3eb9-40de-8abd-43237517384f",
115 "user_data":"#!/bin/bash -xv\necho \"hello world\" > /root/hello-world.txt\n"
131 +--------------------+----------------------------------------------------------------------+
133 +====================+======================================================================+
134 | 201 - Created | Resource was created and is ready to use. |
135 +--------------------+----------------------------------------------------------------------+
140 +--------------------+----------------------------------------------------------------------+
142 +====================+======================================================================+
143 | 400 - Bad Request | Some content in the request was invalid. |
144 +--------------------+----------------------------------------------------------------------+
145 | 401 - Unauthorized | User must authenticate before making a request. |
146 +--------------------+----------------------------------------------------------------------+
147 | 409 - Conflict | This operation conflicted with another operation on this resource. |
148 +--------------------+----------------------------------------------------------------------+
155 "template_type":"heat",
156 "workload_id": "<The ID of infrastructure workload resource>"
160 "id": "<The UUID of stack>",
163 "href": "<A list of URLs for the stack>",
170 Delete infrastructure workload
171 ------------------------------
173 API DELETE URL: http://{msb IP}:{msb port}/api/multicloud/v1/{cloud-owner}/{cloud-region-id}/infra_workload/{workload-id}
183 +--------------------+----------------------------------------------------------------------+
185 +====================+======================================================================+
186 | 204 - No Content | The server has fulfilled the request by deleting the resource. |
187 +--------------------+----------------------------------------------------------------------+
192 +--------------------+----------------------------------------------------------------------+
194 +====================+======================================================================+
195 | 400 - Bad Request | Some content in the request was invalid. |
196 +--------------------+----------------------------------------------------------------------+
197 | 401 - Unauthorized | User must authenticate before making a request. |
198 +--------------------+----------------------------------------------------------------------+
199 | 404 - Not Found | The requested resource could not be found. |
200 +--------------------+----------------------------------------------------------------------+
201 | 500 - Internal | Something went wrong inside the service. This should not happen |
202 | Server Error | usually. If it does happen, it means the server has experienced |
203 | | some serious problems. |
204 +--------------------+----------------------------------------------------------------------+
208 This request does not return anything in the response body.
210 Get infrastructure workload
211 ----------------------------
213 API GET URL: http://{msb IP}:{msb port}/api/multicloud/v1/{cloud-owner}/{cloud-region-id}/infra_workload/{workload-id}
223 +--------------------+----------------------------------------------------------------------+
225 +====================+======================================================================+
226 | 200 - OK | Request was successful. |
227 +--------------------+----------------------------------------------------------------------+
232 +--------------------+----------------------------------------------------------------------+
234 +====================+======================================================================+
235 | 400 - Bad Request | Some content in the request was invalid. |
236 +--------------------+----------------------------------------------------------------------+
237 | 401 - Unauthorized | User must authenticate before making a request. |
238 +--------------------+----------------------------------------------------------------------+
239 | 404 - Not Found | The requested resource could not be found. |
240 +--------------------+----------------------------------------------------------------------+
241 | 500 - Internal | Something went wrong inside the service. This should not happen |
242 | Server Error | usually. If it does happen, it means the server has experienced |
243 | | some serious problems. |
244 +--------------------+----------------------------------------------------------------------+
251 "template_type":"<heat/tosca/etc.>",
252 "workload_id": "<The ID of infrastructure workload resource>",
253 "workload_status":"CREATE_IN_PROCESS/CREATE_COMPLETE/DELETE_IN_PROCESS/etc"
260 #. Work with OOF team for oof_directive form.
261 #. Work with SDNC team for sdc_directive form.
262 #. Expose API by broker and each plugin.
267 #. Unit Tests with tox.
268 #. Pairwise test with SO project.
269 #. Integration test with vCPE HPA test.
270 #. CSIT Tests, the input/ouput of broker and each plugin see API design above.