From 62a96c11df1881645b015f946700bc8faf68a64d Mon Sep 17 00:00:00 2001 From: Huang Haibin Date: Wed, 15 Aug 2018 15:53:17 +0800 Subject: Add Multicloud infra workload API Change-Id: I5cb04c4ae11278a4c675edaa3ee32e459fcf6e0a Issue-ID: MULTICLOUD-250 Signed-off-by: Huang Haibin --- docs/specs/multicloud_infra_workload.rst | 135 +++++++++++++++++++++++++++++++ 1 file changed, 135 insertions(+) create mode 100644 docs/specs/multicloud_infra_workload.rst (limited to 'docs') diff --git a/docs/specs/multicloud_infra_workload.rst b/docs/specs/multicloud_infra_workload.rst new file mode 100644 index 0000000..71fd234 --- /dev/null +++ b/docs/specs/multicloud_infra_workload.rst @@ -0,0 +1,135 @@ +.. This work is licensed under a Creative Commons Attribution 4.0 International License. +.. http://creativecommons.org/licenses/by/4.0 +.. Copyright (c) 2017-2018 Intel, Inc. + +=============================== +MultiCloud infra_workload API +=============================== + +we have two purposes for this API: + +#. Intergrate 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 +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 +command line. +The detail design refer to https://wiki.onap.org/display/DW/SO+Casablanca+HPA+Design + + +Propose Change +============== + +Add infrastructure workload API +------------------------------- + +API URL: http://{msb IP}:{msb port}/api/multicloud /v1/{cloud-owner}/{cloud-region-id}/infra_workload + +Request Body: + + +:: + + { + "generic-vnf-id":"", + "vf-module-id":"", + "oof_directives":{}, + "sdnc_directives":{}, + "template_type":"", + "template_data":{} + } + +oof_directives: +:: + + "directives":[ + { + "id":"", + "type": "vnfc", + "directives":[ + { + "type":"", + "attributes":[ + { + "attribute_name":"", + "attribute_value":"" + } + ] + } + ] + }, + { + "id":"", + "type": "vnf", + "directives":[ + { + "type":"", + "attributes":[ + { + "attribute_name":"", + "attribute_value":"" + } + ] + } + ] + } + ] + + +Heat examples +============= + + "template_type":"heat", + "template_data":{ + "files":{ }, + "disable_rollback":true, + "parameters":{ + "flavor":"m1.heat" + }, + "stack_name":"teststack", + "template":{ + "heat_template_version":"2013-05-23", + "description":"Simple template to test heat commands", + "parameters": + { + "flavor":{ + "default":"m1.tiny", + "type":"string" + } + }, + "resources":{ + "hello_world":{ + "type":"OS::Nova::Server", + "properties":{ + "key_name":"heat_key", + "flavor":{ + "get_param":"flavor" + }, + "image":"40be8d1a-3eb9-40de-8abd-43237517384f", + "user_data":"#!/bin/bash -xv\necho \"hello world\" > /root/hello-world.txt\n" + } + } + } + }, + "timeout_mins":60 + } + +Work Items +========== + +#. Work with SO. +#. Work with OOF team for oof_directive form. +#. Work with SDNC team for sdc_directive form. + +Tests +===== + +#. Unit Tests with tox +#. CSIT Tests, the input/ouput of broker and each plugin see API design above. + -- cgit 1.2.3-korg