JakobKrieg | f2d67d6 | 2020-08-17 22:36:44 +0200 | [diff] [blame] | 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 |
JakobKrieg | 7c3f395 | 2020-08-04 20:46:50 +0200 | [diff] [blame] | 4 | .. Copyright (C) 2020 Deutsche Telekom AG. |
| 5 | |
Singal, Kapil (ks220y) | cef859c | 2020-10-07 13:00:24 -0400 | [diff] [blame] | 6 | .. _dynamic_payload: |
| 7 | |
JakobKrieg | 7c3f395 | 2020-08-04 20:46:50 +0200 | [diff] [blame] | 8 | Dynamic Payload |
Singal, Kapil (ks220y) | f1aafc4 | 2020-09-24 12:47:56 -0400 | [diff] [blame] | 9 | --------------- |
JakobKrieg | 7c3f395 | 2020-08-04 20:46:50 +0200 | [diff] [blame] | 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 | |
Singal, Kapil (ks220y) | f1aafc4 | 2020-09-24 12:47:56 -0400 | [diff] [blame] | 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": { |
JakobKrieg | 7c3f395 | 2020-08-04 20:46:50 +0200 | [diff] [blame] | 41 | } |
Singal, Kapil (ks220y) | f1aafc4 | 2020-09-24 12:47:56 -0400 | [diff] [blame] | 42 | } |
JakobKrieg | 7c3f395 | 2020-08-04 20:46:50 +0200 | [diff] [blame] | 43 | } |
Singal, Kapil (ks220y) | f1aafc4 | 2020-09-24 12:47:56 -0400 | [diff] [blame] | 44 | } |
JakobKrieg | 7c3f395 | 2020-08-04 20:46:50 +0200 | [diff] [blame] | 45 | |
| 46 | - .. code-block:: json |
Singal, Kapil (ks220y) | f1aafc4 | 2020-09-24 12:47:56 -0400 | [diff] [blame] | 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 | } |
JakobKrieg | 7c3f395 | 2020-08-04 20:46:50 +0200 | [diff] [blame] | 63 | } |
Singal, Kapil (ks220y) | f1aafc4 | 2020-09-24 12:47:56 -0400 | [diff] [blame] | 64 | } |
JakobKrieg | 7c3f395 | 2020-08-04 20:46:50 +0200 | [diff] [blame] | 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 |
Singal, Kapil (ks220y) | f1aafc4 | 2020-09-24 12:47:56 -0400 | [diff] [blame] | 79 | (see :ref:`artifact_type` -> Mapping), as data-type, that will then be use as type |
JakobKrieg | 7c3f395 | 2020-08-04 20:46:50 +0200 | [diff] [blame] | 80 | of an input called ``$actionName-properties``. |