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 | |
| 6 | .. _enrichment: |
| 7 | |
| 8 | Enrichment |
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 | The idea is that the CBA is a self-sufficient package, hence requires |
| 12 | all the various types definition its using. |
| 13 | |
| 14 | Reason for this is the types its using might evolve. In order for the |
| 15 | CBA to be bounded to the version it has been using when it has been |
| 16 | designed, these types are embedded in the CBA, so if they change, the |
| 17 | CBA is not affected. |
| 18 | |
| 19 | The enrichment process will complete the package by providing all the |
| 20 | definition of types used: |
| 21 | |
| 22 | * gather all the node-type used and put them into a :file:`node_types.json` file |
| 23 | * gather all the data-type used and put them into a :file:`data_types.json` file |
| 24 | * gather all the artifact-type used and put them into a :file:`artifact_types.json` file |
Singal, Kapil (ks220y) | f1aafc4 | 2020-09-24 12:47:56 -0400 | [diff] [blame] | 25 | * gather all the data dictionary definitions used from within the mapping files and put them |
JakobKrieg | 7c3f395 | 2020-08-04 20:46:50 +0200 | [diff] [blame] | 26 | into a :file:`resources_definition_types.json` file |
| 27 | |
| 28 | .. warning:: |
Singal, Kapil (ks220y) | f1aafc4 | 2020-09-24 12:47:56 -0400 | [diff] [blame] | 29 | Before uploading a CBA, it must be enriched. If your package is already enrich, |
JakobKrieg | 7c3f395 | 2020-08-04 20:46:50 +0200 | [diff] [blame] | 30 | you do not need to perform enrichment again. |
| 31 | |
Singal, Kapil (ks220y) | f1aafc4 | 2020-09-24 12:47:56 -0400 | [diff] [blame] | 32 | The enrichment can be run using REST API, and required the **.zip** file as input. |
JakobKrieg | 7c3f395 | 2020-08-04 20:46:50 +0200 | [diff] [blame] | 33 | It will return an :file:`enriched-cba.zip` file. |
| 34 | |
| 35 | .. code-block:: bash |
| 36 | |
| 37 | curl -X POST \ |
Singal, Kapil (ks220y) | f1aafc4 | 2020-09-24 12:47:56 -0400 | [diff] [blame] | 38 | 'http://{{ip}}:{{cds-designtime}}/api/v1/blueprint-model/enrich' \ |
| 39 | -H 'content-type: multipart/form-data' \ |
| 40 | -F file=@cba.zip |
JakobKrieg | 7c3f395 | 2020-08-04 20:46:50 +0200 | [diff] [blame] | 41 | |
| 42 | The enrichment process will also, for all resources to be resolved as input and default: |
| 43 | |
| 44 | * dynamically gather them under a data-type, named ``dt-${actionName}-properties`` |
| 45 | * will add it as a input of the workflow, as follow using this name: ``${actionName}-properties`` |
| 46 | |
| 47 | Example for workflow named *resource-assignment*: |
| 48 | |
| 49 | .. code-block:: JSON |
| 50 | :caption: **dynamic input** |
| 51 | |
| 52 | { |
| 53 | "resource-assignment-properties": { |
| 54 | "required": true, |
| 55 | "type": "dt-resource-assignment-properties" |
| 56 | } |