Merge "Add create of workload update in AAI"
authorBin Yang <bin.yang@windriver.com>
Tue, 19 Mar 2019 02:58:32 +0000 (02:58 +0000)
committerGerrit Code Review <gerrit@onap.org>
Tue, 19 Mar 2019 02:58:32 +0000 (02:58 +0000)
1  2 
docs/specs/multicloud_infra_workload.rst

@@@ -19,41 -19,13 +19,41 @@@ Currently HPA flavors are returned by O
  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 this as parameters to HEAT
 -command line.
 +command line. In Dublin, instead of SO transferring the content of HEAT and HEAT_ENV
 +to Multicloud, Mutlicloud will download these information/artifacts.
  For further detailed design, please refer to https://wiki.onap.org/display/DW/SO+Casablanca+HPA+Design
  
  
  Propose Change
  ==============
  
 +Multi-Tenant Support
 +--------------------
 +
 +Request Headers:
 +>>>>>>>>>>>>>>>>
 +
 +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
  ---------------------------
  
@@@ -66,23 -38,12 +66,23 @@@ Request Body
    {
       "generic-vnf-id":"<generic-vnf-id>",
       "vf-module-id":"<vf-module-id>",
 +     "vf-module-model-invariant-id":"<uuid>",
 +     "vf-module-model-version-id":"<uuid>",
 +     "vf-module-model-customization-id":"<uuid>",
       "oof_directives":{},
       "sdnc_directives":{},
 +     "user_directives":{},
       "template_type":"<heat/tosca/etc.>",
       "template_data":{}
    }
  
 + The 'vf-module-model-"*"-id’s will be used by the Multicloud plugin to retrieve the associated cloud artifacts.
 + The 'oof_directives' is to convey oof’s input to multicloud.
 + The 'sdnc_directives' for SDNC input to MultiCloud.
 + The 'user_directives' is the parameter to convey input from VID portal to mutlicloud.
 + They are all about how to populate data to template parameters.
 + The precedence of the three directives are user_directives and oof_directives the sdnc_directives.
 +
  oof_directives:
  :::::::::::::::
  ::
@@@ -206,6 -167,51 +206,51 @@@ Response Bod
          }
      }
  
+ Update infrastructure workload information in AAI (i.e. Heatbridge)
+ -------------------------------------------------------------------
+ API URL: POST http://{msb IP}:{msb port}/api/multicloud/v1/{cloud-owner}/{cloud-region-id}/infra_workload/{workload-id}
+ Request Body:
+ >>>>>>>>>>>>>
+ ::
+   {
+      "generic-vnf-id":"<generic-vnf-id>",
+      "vf-module-id":"<vf-module-id>"
+   }
+ Response:
+ >>>>>>>>>
+ Response Codes
+ ::::::::::::::
+ Success
+ .......
+ +--------------------+----------------------------------------------------------------------+
+ | Code               | Reason                                                               |
+ +====================+======================================================================+
+ | 202 - Accepted     | The request was accepted.                                            |
+ +--------------------+----------------------------------------------------------------------+
+ 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
+ :::::::::::::
  Delete infrastructure workload
  ------------------------------
  
@@@ -289,7 -295,7 +334,7 @@@ Response Bod
      {
          "template_type":"<heat/tosca/etc.>",
          "workload_id": "<The ID of infrastructure workload resource>",
-         "workload_status":"CREATE_IN_PROCESS/CREATE_COMPLETE/DELETE_IN_PROCESS/etc"
+         "workload_status":"CREATE_IN_PROCESS/CREATE_COMPLETE/DELETE_IN_PROCESS/AAI_IN_PROGRESS/AAI_COMPLETE/etc"
      }
  
  Work Items