blob: f2dbc3524ee0135da0eefd62ec280b53189d5f1a [file] [log] [blame]
JakobKrieg7c3f3952020-08-04 20:46:50 +02001.. This work is a derivative of https://wiki.onap.org/display/DW/Modeling+Concepts#Concepts-1386016968 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.. _data_dictionary:
7
8Data Dictionary
9-----------------
10
11A data dictionary **models the how** a specific **resource** can be **resolved**.
12
13A resource is a **variable/parameter** in the context of the service.
14It can be anything, but it should not be confused with SDC or Openstack resources.
15
16A data dictionary can have **multiple sources** to handle resolution in different ways.
17
18The main goal of data dictionary is to define **re-usable** entity that could be shared.
19
20**Creation** of data dictionaries is a **standalone** activity, separated from the blueprint design.
21
22As part of modelling a data dictionary entry, the following generic information should be provided:
23
24.. list-table::
25 :widths: 25 50 25
26 :header-rows: 1
27
28 * - Property
29 - Description
30 - Scope
31 * - updated-by
32 - The creator
33 - Mandatory
34 * - tags
35 - Information related
36 - Mandatory
37 * - sources
38 - List of resource source instance (see :ref:`resource source`)
39 - Mandatory
40 * - property
41 - Defines type and description, as nested JSON
42 - Mandatory
43 * - name
44 - Data dictionary name
45 - Mandatory
46
47**Bellow are properties that all the resource source can have**
48
49The modeling does allow for **data translation** between external capability
50and CDS for both input and output key mapping.
51
52.. list-table::
53 :widths: 25 50 25
54 :header-rows: 1
55
56 * - Property
57 - Description
58 - Scope
59 * - input-key-mapping
60 - map of resources required to perform the request/query. The left hand-side is what is used within
61 the query/request, the right hand side refer to a data dictionary instance.
62 - Optional
63 * - output-key-mapping
64 - name of the resource to be resolved mapped to the value resolved by the request/query.
65 - Optional
66 * - key-dependencies
67 - | list of data dictionary instances to be resolved prior the resolution of this specific resource.
68 | during run time execution the key dependencies are recursively sorted and resolved
69 in batch processing using the `acyclic graph algorithm
70 <https://en.wikipedia.org/wiki/Directed_acyclic_graph>`_
71 - Optional
72
73**Example:**
74
75``vf-module-model-customization-uuid`` and ``vf-module-label`` are two data dictionaries.
76A SQL table, VF_MODULE_MODEL, exist to correlate them.
77
78Here is how input-key-mapping, output-key-mapping and key-dependencies can be used:
79
80.. list-table::
81 :widths: 100
82 :header-rows: 1
83
84 * - vf-module-label data dictionary
85 * - .. code-block:: JSON
86
87
88 {
89 "name" : "vf-module-label",
90 "tags" : "vf-module-label",
91 "updated-by" : "adetalhouet",
92 "property" : {
93 "description" : "vf-module-label",
94 "type" : "string"
95 },
96 "sources" : {
97 "primary-db" : {
98 "type" : "source-primary-db",
99 "properties" : {
100 "type" : "SQL",
101 "query" : "select sdnctl.VF_MODULE_MODEL.vf_module_label as vf_module_label
102 from sdnctl.VF_MODULE_MODEL where sdnctl.VF_MODULE_MODEL.customization_uuid=:customizationid",
103 "input-key-mapping" : {
104 "customizationid" : "vf-module-model-customization-uuid"
105 },
106 "output-key-mapping" : {
107 "vf-module-label" : "vf_module_label"
108 },
109 "key-dependencies" : [ "vf-module-model-customization-uuid" ]
110 }
111 }
112 }
113 }