Add output validation for substitution mappings
[parser.git] / tosca2heat / tosca-parser / toscaparser / tests / data / topology_template / queuingsubsystem.yaml
1 tosca_definitions_version: tosca_simple_yaml_1_0
2
3 description: >
4   Queue subsystem, which is service template with topology_template,
5   act as a nested system inside another system and also act as stand
6   alone service template.
7
8 imports:
9   - definitions.yaml
10
11 topology_template:
12   description: Template of a database including its hosting stack.
13
14   inputs:
15     server_ip:
16       type: string
17       description: IP address of the message queuing server to receive messages from.
18       default: 127.0.0.1
19     server_port:
20       type: integer
21       description: Port to be used for receiving messages.
22       default: 8080
23     my_cpus:
24       type: integer
25       description: Number of CPUs for the server.
26       default: 2
27       constraints:
28         - valid_values: [ 1, 2, 4, 8 ]
29
30   substitution_mappings:
31     node_type: example.QueuingSubsystem
32     # capabilities:
33     #  message_receiver: [ app, message_receiver ]
34     requirements:
35       receiver1: [ tran_app, receiver1 ]
36       receiver2: [ tran_app, receiver2 ]
37
38   node_templates:
39     tran_app:
40       type: example.QueuingSubsystem
41       properties:
42         server_ip: { get_input: server_ip }
43         server_port: { get_input: server_port }
44       requirements:
45         - host:
46             node: server
47
48     server:
49       type: tosca.nodes.Compute
50       capabilities:
51         host:
52           properties:
53             disk_size: 10 GB
54             num_cpus: { get_input: my_cpus }
55             mem_size: 4096 MB
56         os:
57           properties:
58             architecture: x86_64
59             type: Linux
60             distribution: Ubuntu
61             version: 14.04
62
63   outputs:
64 #    receiver_ip:
65 #      description: private IP address of the message receiver application
66 #      value: { get_attribute: [ server, private_address ] }
67
68     server_ip:
69       description: server_ip of the message receiver application
70       value: { get_input: server_ip }
71
72     server_port:
73       description: server_port of the message receiver application
74       value: { get_input: server_port }
75
76 # It seems current _process_intrisic_function can not handle more than 2 arguments, save it for later
77 #    receiver_port:
78 #      description: Port of the message receiver endpoint
79 #      value: { get_attribute: [ app, data_endpoint, port_name ] }
80
81   groups:
82     tran_server_group:
83       members: [ tran_app, server ]
84       type: tosca.groups.Root