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