summaryrefslogtreecommitdiffstats
path: root/tosca2heat/heat-translator/translator/tests/data/test_tosca_get_functions_semantic.yaml
diff options
context:
space:
mode:
Diffstat (limited to 'tosca2heat/heat-translator/translator/tests/data/test_tosca_get_functions_semantic.yaml')
-rw-r--r--tosca2heat/heat-translator/translator/tests/data/test_tosca_get_functions_semantic.yaml84
1 files changed, 84 insertions, 0 deletions
diff --git a/tosca2heat/heat-translator/translator/tests/data/test_tosca_get_functions_semantic.yaml b/tosca2heat/heat-translator/translator/tests/data/test_tosca_get_functions_semantic.yaml
new file mode 100644
index 0000000..2a76978
--- /dev/null
+++ b/tosca2heat/heat-translator/translator/tests/data/test_tosca_get_functions_semantic.yaml
@@ -0,0 +1,84 @@
+tosca_definitions_version: tosca_simple_yaml_1_0
+
+description: TOSCA template to test get_* functions semantic
+
+node_types:
+ tosca.capabilities.MyFeature:
+ derived_from: tosca.capabilities.Root
+ properties:
+ my_list:
+ type: list
+ my_map:
+ type: map
+
+ tosca.nodes.WebApplication.MyApp:
+ derived_from: tosca.nodes.WebApplication
+ requirements:
+ - myfeature:
+ capability: tosca.capabilities.MyFeature
+ node: tosca.nodes.MyDatabase
+ relationship: tosca.relationships.ConnectsTo
+
+ tosca.nodes.MyDatabase:
+ derived_from: tosca.nodes.Database
+ capabilities:
+ myfeature:
+ type: tosca.capabilities.MyFeature
+
+topology_template:
+ inputs:
+ map_val:
+ type: string
+
+ node_templates:
+ server:
+ type: tosca.nodes.Compute
+ capabilities:
+ host:
+ properties:
+ num_cpus: 1
+ mem_size: 1 GB
+ os:
+ properties:
+ type: Linux
+ distribution: Ubuntu
+ version: 12.04
+ architecture: x86_64
+
+ mysql_database:
+ type: tosca.nodes.MyDatabase
+ requirements:
+ - host: server
+ capabilities:
+ myfeature:
+ properties:
+ my_list: [list_val_0]
+ my_map:
+ test_key: { get_input: map_val }
+ test_key_static: static_value
+
+ myapp:
+ type: tosca.nodes.WebApplication.MyApp
+ requirements:
+ - myfeature: mysql_database
+ - host: server
+ interfaces:
+ Standard:
+ configure:
+ implementation: myapp_configure.sh
+ inputs:
+ list_val: { get_property: [ SELF, myfeature, my_list, 0 ] }
+
+ outputs:
+ map_val:
+ description: map_val
+ value: { get_property: [ myapp, myfeature, my_map, test_key ] }
+
+ static_map_val:
+ value: { get_property: [ myapp, myfeature, my_map, test_key_static ] }
+
+ concat_map_val:
+ value: { concat: [ 'http://', { get_property: [ myapp, myfeature, my_map, test_key ] }, ':8080' ] }
+
+ test_list_of_functions:
+ value: [ { get_property: [ myapp, myfeature, my_map, test_key ] }, { get_property: [ myapp, myfeature, my_map, test_key_static ] } ]