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.
9 -------------------------------------
11 Represents the **schema** of a specific type of **data**.
13 Supports both **primitive** and **complex** data types:
31 For complex data type, an **entry schema** is required, defining the
32 type of value contained within the complex type, if list or array.
34 Users can **create** as many **data type** as needed.
38 **Creating Custom Data Types:**
40 To create a custom data-type you can use a POST call to CDS endpoint:
41 "<cds-ip>:<cds-port>/api/v1/model-type"
43 .. code-block:: python
44 :caption: **Payload:**
48 "model-name": "<model-name>",
49 "derivedFrom": "tosca.datatypes.Root",
51 "definitionType": "data_type",
55 "description": "<description>",
57 "version": "<version-number: eg 1.0.0>",
59 "properties": {<add properties of your custom data type in JSON format>},
61 "derived_from": "tosca.datatypes.Root"
65 "description": "<description",
67 "version": "<version>",
69 "tags": "<model-name>,datatypes.Root.data_type",
71 "creationDate": "<creation timestamp>",
77 Data type are useful to manipulate data during resource resolution.
78 They can be used to format the JSON output as needed.
80 List of existing data type:
81 `<https://github.com/onap/ccsdk-cds/tree/master/components/model-catalog/definition-type/starter-type/data_type>`_
84 <http://docs.oasis-open.org/tosca/TOSCA-Simple-Profile-YAML/v1.2/csd01/TOSCA-Simple-Profile-YAML-v1.2-csd01.html#_Toc494454187>`_
86 **Below is a list of existing data types**
90 .. tab:: resource-assignment
92 **datatype-resource-assignment**
94 Used to define entries within artifact-mapping-resource
95 (see tab Artifact Type -> artifact-mapping-resource)
97 That datatype represent a **resource** to be resolved. We also refer
98 this as an **instance of a data dictionary** as it's directly linked to
108 - Defines how the resource looks like (see datatype-property on the right tab)
110 - Whether the resource can be provided as input.
112 - Reference to the name of the data dictionary (see :ref:`data_dictionary`).
113 * - dictionary-source
114 - Reference the source to use to resolve the resource (see :ref:`resource source`).
116 - List of dependencies required to resolve this resource.
118 - Date when mapping was upload.
120 - Name of the person that updated the mapping.
122 `<https://github.com/onap/ccsdk-cds/blob/master/components/model-catalog/definition-type/starter-type/data_type/datatype-resource-assignment.json>`_
125 :caption: **datatype-resource-assignment**
129 "description": "This is Resource Assignment Data Type",
133 "type": "datatype-property"
143 "dictionary-source": {
163 "derived_from": "tosca.datatypes.Root"
168 **datatype-property**
170 Used to defined the **property** entry of a **resource assignment**.
179 - Whether it's a primitive type, or a defined data-type
181 - Description of for the property
183 - Whether it's required or not
185 - If there is a default value to provide
187 - If the type is a complex one, such as list, define what is the type of element within the list.
189 `<https://github.com/onap/ccsdk-cds/blob/master/components/model-catalog/definition-type/starter-type/data_type/datatype-property.json>`_
192 :caption: **datatype-property**
196 "description": "This is Resource Assignment Data Type",
200 "type": "datatype-property"
210 "dictionary-source": {
230 "derived_from": "tosca.datatypes.Root"