Fix: Run both sonar and clm scans in parallel
[ccsdk/cds.git] / docs / modelingconcepts / dynamic-payload.rst
1 .. This work is a derivative of https://wiki.onap.org/display/DW/Modeling+Concepts
2 .. This work is licensed under a Creative Commons Attribution 4.0
3 .. International License. http://creativecommons.org/licenses/by/4.0
4 .. Copyright (C) 2020 Deutsche Telekom AG.
5
6 .. _dynamic_payload:
7
8 Dynamic Payload
9 ---------------
10
11 One of the most important API provided by the run time is to execute a CBA Package.
12
13 The nature of this API **request** and **response** is **model
14 driven** and **dynamic**.
15
16 Here is how the a **generic request** and **response** look like.
17
18 .. list-table::
19    :widths: 50 50
20    :header-rows: 1
21
22    * - request
23      - response
24    * - .. code-block:: json
25
26             {
27               "commonHeader": {
28                 "originatorId": "",
29                 "requestId": "",
30                 "subRequestId": ""
31               },
32               "actionIdentifiers": {
33                 "blueprintName": "",
34                 "blueprintVersion": "",
35                 "actionName": "",
36                 "mode": ""
37               },
38               "payload": {
39                 "$actionName-request": {
40                   "$actionName-properties": {
41                   }
42                 }
43               }
44             }
45
46      - .. code-block:: json
47
48             {
49               "commonHeader": {
50                 "originatorId": "",
51                 "requestId": "",
52                 "subRequestId": ""
53               },
54               "actionIdentifiers": {
55                 "blueprintName": "",
56                 "blueprintVersion": "",
57                 "actionName": "",
58                 "mode": ""
59               },
60               "payload": {
61                 "$actionName-response": {
62                 }
63               }
64             }
65
66 The ``actionName``, under the ``actionIdentifiers`` refers to the name of a
67 Workflow (see :ref:`workflow`)
68
69 The content of the ``payload`` is what is fully dynamic / model driven.
70
71 The first **top level element** will always be either
72 ``$actionName-request`` for a request or ``$actionName-response`` for a response.
73
74 Then the **content within this element** is fully based on the
75 **workflow** **inputs** and **outputs**.
76
77 During the :ref:`enrichment` CDS will aggregate all the resources
78 defined to be resolved as input (see :ref:`node_type` -> Source -> Input), within mapping definition files
79 (see :ref:`artifact_type` -> Mapping), as data-type, that will then be use as type
80 of an  input called ``$actionName-properties``.