blob: 8ea1ed3a77b378dbc1a9146217955434f46af7d8 [file] [log] [blame]
JakobKrieg7c3f3952020-08-04 20:46:50 +02001.. This work is a derivative of https://wiki.onap.org/display/DW/Modeling+Concepts by IBM
2.. used under Creative Commons Attribution 4.0 International License.
3.. http://creativecommons.org/licenses/by/4.0
4.. Copyright (C) 2020 Deutsche Telekom AG.
5
6.. _enrichment:
7
8Enrichment
9-----------
10
11The idea is that the CBA is a self-sufficient package, hence requires
12all the various types definition its using.
13
14Reason for this is the types its using might evolve. In order for the
15CBA to be bounded to the version it has been using when it has been
16designed, these types are embedded in the CBA, so if they change, the
17CBA is not affected.
18
19The enrichment process will complete the package by providing all the
20definition 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
25* gather all the data dictionary definitions used from within the mapping files and put them
26 into a :file:`resources_definition_types.json` file
27
28.. warning::
29 Before uploading a CBA, it must be enriched. If your package is already enrich,
30 you do not need to perform enrichment again.
31
32The enrichment can be run using REST API, and required the **.zip** file as input.
33It will return an :file:`enriched-cba.zip` file.
34
35.. code-block:: bash
36
37 curl -X POST \
38 'http://{{ip}}:{{cds-designtime}}/api/v1/blueprint-model/enrich' \
39 -H 'content-type: multipart/form-data' \
40 -F file=@cba.zip
41
42The 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
47Example 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 }