Adding Modeling Concepts documentation from COnfluence to RDT
[ccsdk/cds.git] / docs / modelingconcepts / expression.rst
1 .. This work is a derivative of https://wiki.onap.org/display/DW/Modeling+Concepts#Concepts-198012600 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
7 .. _expression:
8
9 Expression
10 -------------------------------------
11
12 TOSCA provides for a set of functions to reference elements within the template or to retrieve runtime values.
13
14 **Below is a list of supported expressions**
15
16 .. tabs::
17
18    .. tab:: get_input
19
20       **get_input**
21
22       The **get_input** function is used to retrieve the values of properties declared 
23       within the inputs section of a TOSCA Service Template.
24
25       Within CDS, this is mainly Workflow inputs.
26
27       `TOSCA specification 
28       <http://docs.oasis-open.org/tosca/TOSCA-Simple-Profile-YAML/v1.2/csd01/TOSCA-Simple-Profile-YAML-v1.2-csd01.html#_Toc494454178>`_
29
30       **Example:**
31
32       `<https://github.com/onap/ccsdk-cds/blob/master/components/model-catalog/blueprint-model/test-blueprint/golden/Definitions/golden-blueprint.json#L210>`_
33
34       .. code-block:: JSON
35          
36          "resolution-key": {
37          "get_input": "resolution-key"
38          }
39          
40    .. tab:: get_property
41
42       **get_property**
43
44       The **get_property** function is used to retrieve property values between modelable 
45       entities defined in the same service template.
46
47       `TOSCA specification 
48       <http://docs.oasis-open.org/tosca/TOSCA-Simple-Profile-YAML/v1.2/csd01/TOSCA-Simple-Profile-YAML-v1.2-csd01.html#_Toc494454178>`_
49
50       **Example:**
51
52       TBD
53
54    .. tab:: get_attribute
55
56       **get_attribute**
57
58       The **get_attribute** function is used to retrieve the values of named attributes declared 
59       by the referenced node or relationship template name.
60
61       `TOSCA specification 
62       <http://docs.oasis-open.org/tosca/TOSCA-Simple-Profile-YAML/v1.2/csd01/TOSCA-Simple-Profile-YAML-v1.2-csd01.html#_Toc494454178>`_
63
64       **Example:**
65
66       `<https://github.com/onap/ccsdk-cds/blob/master/components/model-catalog/blueprint-model/test-blueprint/golden/Definitions/golden-blueprint.json#L64-L67>`_
67
68       .. code-block:: JSON
69          
70          "get_attribute": [
71             "resource-assignment",
72             "assignment-params"
73          ]
74
75    .. tab:: get_operation_output
76
77       **get_operation_output**
78
79       The **get_operation_output** function is used to retrieve property values between modelable 
80       entities defined in the same service template.
81
82       `TOSCA specification 
83       <http://docs.oasis-open.org/tosca/TOSCA-Simple-Profile-YAML/v1.2/csd01/TOSCA-Simple-Profile-YAML-v1.2-csd01.html#_Toc494454180>`_
84
85       **Example:**
86
87       TBD
88
89    .. tab:: get_artifact
90
91       **get_artifact**
92
93       The **get_artifact** function is used to retrieve property values between modelable 
94       entities defined in the same service template.
95
96       `TOSCA specification 
97       <http://docs.oasis-open.org/tosca/TOSCA-Simple-Profile-YAML/v1.2/csd01/TOSCA-Simple-Profile-YAML-v1.2-csd01.html#_Toc494454182>`_
98
99       **Example:**
100
101       TBD