1 .. This work is a derivative of https://wiki.onap.org/display/DW/Modeling+Concepts#Concepts-1581473264
2 .. This work is licensed under a Creative Commons Attribution 4.0
3 .. International License. http://creativecommons.org/licenses/by/4.0
4 .. Copyright (C) 2020 Deutsche Telekom AG.
11 Represents the **schema** of a specific type of **data**.
13 Supports both **primitive** and **complex** data types:
32 For complex data type, an **entry schema** is required, defining the
33 type of value contained within the complex type, if list or array.
35 Users can **create** as many **data type** as needed.
39 **Creating Custom Data Types:**
41 To create a custom data-type you can use a POST call to CDS endpoint:
42 "<cds-ip>:<cds-port>/api/v1/model-type"
45 :caption: **Payload:**
48 "model-name": "<model-name>",
49 "derivedFrom": "tosca.datatypes.Root",
50 "definitionType": "data_type",
52 "description": "<description>",
53 "version": "<version-number: eg 1.0.0>",
54 "properties": "code-block::{<add properties of your custom data type in JSON format>}",
55 "derived_from": "tosca.datatypes.Root"
57 "description": "<description",
58 "version": "<version>",
59 "tags": "<model-name>,datatypes.Root.data_type",
60 "creationDate": "<creation timestamp>",
64 Data type are useful to manipulate data during resource resolution.
65 They can be used to format the JSON output as needed.
67 List of existing data type:
68 `<https://github.com/onap/ccsdk-cds/tree/master/components/model-catalog/definition-type/starter-type/data_type>`_
71 <http://docs.oasis-open.org/tosca/TOSCA-Simple-Profile-YAML/v1.2/csd01/TOSCA-Simple-Profile-YAML-v1.2-csd01.html#_Toc494454187>`_
73 **Below is a list of existing data types**
77 .. tab:: resource-assignment
79 **datatype-resource-assignment**
81 Used to define entries within artifact-mapping-resource
82 (see tab Artifact Type -> artifact-mapping-resource)
84 That datatype represent a **resource** to be resolved. We also refer
85 this as an **instance of a data dictionary** as it's directly linked to
95 - Defines how the resource looks like (see datatype-property on the right tab)
97 - Whether the resource can be provided as input.
99 - Reference to the name of the data dictionary (see :ref:`data_dictionary`).
100 * - dictionary-source
101 - Reference the source to use to resolve the resource (see :ref:`node_type`).
103 - List of dependencies required to resolve this resource.
105 - Date when mapping was upload.
107 - Name of the person that updated the mapping.
109 `<https://github.com/onap/ccsdk-cds/blob/master/components/model-catalog/definition-type/starter-type/data_type/datatype-resource-assignment.json>`_
112 :caption: **datatype-resource-assignment**
116 "description": "This is Resource Assignment Data Type",
120 "type": "datatype-property"
130 "dictionary-source": {
150 "derived_from": "tosca.datatypes.Root"
155 **datatype-property**
157 Used to defined the **property** entry of a **resource assignment**.
166 - Whether it's a primitive type, or a defined data-type
168 - Description of for the property
170 - Whether it's required or not
172 - If there is a default value to provide
174 - If the type is a complex one, such as list, define what is the type of element within the list.
176 `<https://github.com/onap/ccsdk-cds/blob/master/components/model-catalog/definition-type/starter-type/data_type/datatype-property.json>`_
179 :caption: **datatype-property**
183 "description": "This is Resource Assignment Data Type",
187 "type": "datatype-property"
197 "dictionary-source": {
217 "derived_from": "tosca.datatypes.Root"