blob: 554517a7e0ce66494f3624b5e95aa3d4e9937e4d [file] [log] [blame]
JakobKriegf2d67d62020-08-17 22:36:44 +02001.. 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
JakobKrieg7c3f3952020-08-04 20:46:50 +02004.. Copyright (C) 2020 Deutsche Telekom AG.
5
6.. _enrichment:
7
8Enrichment
Singal, Kapil (ks220y)f1aafc42020-09-24 12:47:56 -04009----------
JakobKrieg7c3f3952020-08-04 20:46:50 +020010
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
Singal, Kapil (ks220y)f1aafc42020-09-24 12:47:56 -040025* gather all the data dictionary definitions used from within the mapping files and put them
JakobKrieg7c3f3952020-08-04 20:46:50 +020026 into a :file:`resources_definition_types.json` file
27
28.. warning::
Singal, Kapil (ks220y)f1aafc42020-09-24 12:47:56 -040029 Before uploading a CBA, it must be enriched. If your package is already enrich,
JakobKrieg7c3f3952020-08-04 20:46:50 +020030 you do not need to perform enrichment again.
31
Singal, Kapil (ks220y)f1aafc42020-09-24 12:47:56 -040032The enrichment can be run using REST API, and required the **.zip** file as input.
JakobKrieg7c3f3952020-08-04 20:46:50 +020033It will return an :file:`enriched-cba.zip` file.
34
35.. code-block:: bash
36
37 curl -X POST \
Singal, Kapil (ks220y)f1aafc42020-09-24 12:47:56 -040038 'http://{{ip}}:{{cds-designtime}}/api/v1/blueprint-model/enrich' \
39 -H 'content-type: multipart/form-data' \
40 -F file=@cba.zip
JakobKrieg7c3f3952020-08-04 20:46:50 +020041
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 }