push addional code
[sdc.git] / openecomp-be / lib / openecomp-sdc-translator-lib / openecomp-sdc-translator-core / src / test / resources / mock / services / heattotosca / securityrulestoportconnectionmulti / expectedoutputfiles / MainServiceTemplate.yaml
1 tosca_definitions_version: tosca_simple_yaml_1_0_0
2 metadata:
3   template_name: Main
4 imports:
5   NeutronPortGlobalTypes:
6     file: NeutronPortGlobalTypesServiceTemplate.yaml
7   NeutronNetGlobalTypes:
8     file: NeutronNetGlobalTypesServiceTemplate.yaml
9   CommonGlobalTypes:
10     file: CommonGlobalTypesServiceTemplate.yaml
11   CinderVolumeGlobalTypes:
12     file: CinderVolumeGlobalTypesServiceTemplate.yaml
13   ContrailNetworkRuleGlobalType:
14     file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
15   NeutronSecurityRulesGlobalTypes:
16     file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
17   NovaServerGlobalTypes:
18     file: NovaServerGlobalTypesServiceTemplate.yaml
19   ContrailVirtualNetworkGlobalType:
20     file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
21   AbstractSubstituteGlobalTypes:
22     file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
23 node_types:
24   org.openecomp.resource.vfc.nodes.heat.cmaui_image:
25     derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
26 topology_template:
27   inputs:
28     security_group_id1:
29       hidden: false
30       immutable: false
31       type: string
32       description: UID of OAM network
33     cmaui_names:
34       hidden: false
35       immutable: false
36       type: list
37       description: CMAUI1, CMAUI2 server names
38       entry_schema:
39         type: String
40     cmaui_image:
41       hidden: false
42       immutable: false
43       type: string
44       description: Image for CMAUI server
45     cmaui_flavor:
46       hidden: false
47       immutable: false
48       type: string
49       description: Flavor for CMAUI server
50     security_group_name:
51       label: security group name
52       hidden: false
53       immutable: false
54       type: string
55       description: the name of security group
56     security_group_id:
57       hidden: false
58       immutable: false
59       type: string
60       description: UID of OAM network
61     availability_zone_0:
62       label: availabilityzone name
63       hidden: false
64       immutable: false
65       type: string
66       description: availabilityzone name
67     cmaui_oam_ips:
68       hidden: false
69       immutable: false
70       type: string
71       description: cmaui_oam_ips
72     shared_network_id:
73       hidden: false
74       immutable: false
75       type: string
76       description: Flavor for CMAUI server
77     jsa_net_name:
78       hidden: false
79       immutable: false
80       type: string
81       description: network name of jsa log network
82     security_group_id3:
83       hidden: false
84       immutable: false
85       type: string
86       description: UID of OAM network
87     security_group_id2:
88       hidden: false
89       immutable: false
90       type: string
91       description: UID of OAM network
92   node_templates:
93     cmaui_port_2:
94       type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
95       properties:
96         replacement_policy: AUTO
97         security_groups:
98         - get_input: security_group_id
99         - get_input: security_group_id3
100         fixed_ips:
101         - ip_address:
102             get_input:
103             - cmaui_oam_ips
104             - 0
105         network:
106           get_input: shared_network_id
107     server_cmaui:
108       type: org.openecomp.resource.vfc.nodes.heat.cmaui_image
109       properties:
110         flavor:
111           get_input: cmaui_flavor
112         availability_zone:
113           get_input: availability_zone_0
114         image:
115           get_input: cmaui_image
116         name:
117           get_input:
118           - cmaui_names
119           - 0
120     jsa_security_group1:
121       type: org.openecomp.resource.nodes.heat.network.neutron.SecurityRules
122       properties:
123         name:
124           get_input: security_group_name
125         description: ems security group
126         rules:
127         - protocol: tcp
128           ethertype: IPv4
129           port_range_max: 65535
130           remote_ip_prefix: 0.0.0.0/0
131           direction: egress
132           port_range_min: 1
133         - protocol: udp
134           ethertype: IPv4
135           port_range_max: 65535
136           remote_ip_prefix: 0.0.0.0/0
137           direction: egress
138           port_range_min: 1
139         - protocol: icmp
140           ethertype: IPv4
141           remote_ip_prefix: 0.0.0.0/0
142           direction: egress
143         - protocol: tcp
144           ethertype: IPv6
145           port_range_max: 65535
146           remote_ip_prefix: ::/0
147           direction: egress
148           port_range_min: 1
149         - protocol: udp
150           ethertype: IPv6
151           port_range_max: 65535
152           remote_ip_prefix: ::/0
153           direction: egress
154           port_range_min: 1
155         - protocol: icmp
156           ethertype: IPv6
157           remote_ip_prefix: ::/0
158           direction: egress
159         - protocol: tcp
160           ethertype: IPv4
161           port_range_max: 65535
162           remote_ip_prefix: 0.0.0.0/0
163           direction: ingress
164           port_range_min: 1
165         - protocol: udp
166           ethertype: IPv4
167           port_range_max: 65535
168           remote_ip_prefix: 0.0.0.0/0
169           direction: ingress
170           port_range_min: 1
171         - protocol: icmp
172           ethertype: IPv4
173           remote_ip_prefix: 0.0.0.0/0
174           direction: ingress
175         - protocol: tcp
176           ethertype: IPv6
177           port_range_max: 65535
178           remote_ip_prefix: ::/0
179           direction: ingress
180           port_range_min: 1
181         - protocol: udp
182           ethertype: IPv6
183           port_range_max: 65535
184           remote_ip_prefix: ::/0
185           direction: ingress
186           port_range_min: 1
187         - protocol: icmp
188           ethertype: IPv6
189           remote_ip_prefix: ::/0
190           direction: ingress
191       requirements:
192       - port:
193           capability: tosca.capabilities.Attachment
194           node: cmaui_port_0
195           relationship: org.openecomp.relationships.AttachesTo
196       - port:
197           capability: tosca.capabilities.Attachment
198           node: cmaui_port_1
199           relationship: org.openecomp.relationships.AttachesTo
200     jsa_security_group2:
201       type: org.openecomp.resource.nodes.heat.network.neutron.SecurityRules
202       properties:
203         name:
204           get_input: security_group_name
205         description: ems security group
206         rules:
207         - protocol: tcp
208           ethertype: IPv4
209           port_range_max: 65535
210           remote_ip_prefix: 0.0.0.0/0
211           direction: egress
212           port_range_min: 1
213         - protocol: udp
214           ethertype: IPv4
215           port_range_max: 65535
216           remote_ip_prefix: 0.0.0.0/0
217           direction: egress
218           port_range_min: 1
219         - protocol: icmp
220           ethertype: IPv4
221           remote_ip_prefix: 0.0.0.0/0
222           direction: egress
223         - protocol: tcp
224           ethertype: IPv6
225           port_range_max: 65535
226           remote_ip_prefix: ::/0
227           direction: egress
228           port_range_min: 1
229         - protocol: udp
230           ethertype: IPv6
231           port_range_max: 65535
232           remote_ip_prefix: ::/0
233           direction: egress
234           port_range_min: 1
235         - protocol: icmp
236           ethertype: IPv6
237           remote_ip_prefix: ::/0
238           direction: egress
239         - protocol: tcp
240           ethertype: IPv4
241           port_range_max: 65535
242           remote_ip_prefix: 0.0.0.0/0
243           direction: ingress
244           port_range_min: 1
245         - protocol: udp
246           ethertype: IPv4
247           port_range_max: 65535
248           remote_ip_prefix: 0.0.0.0/0
249           direction: ingress
250           port_range_min: 1
251         - protocol: icmp
252           ethertype: IPv4
253           remote_ip_prefix: 0.0.0.0/0
254           direction: ingress
255         - protocol: tcp
256           ethertype: IPv6
257           port_range_max: 65535
258           remote_ip_prefix: ::/0
259           direction: ingress
260           port_range_min: 1
261         - protocol: udp
262           ethertype: IPv6
263           port_range_max: 65535
264           remote_ip_prefix: ::/0
265           direction: ingress
266           port_range_min: 1
267         - protocol: icmp
268           ethertype: IPv6
269           remote_ip_prefix: ::/0
270           direction: ingress
271       requirements:
272       - port:
273           capability: tosca.capabilities.Attachment
274           node: cmaui_port_1
275           relationship: org.openecomp.relationships.AttachesTo
276     cmaui_port_1:
277       type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
278       properties:
279         replacement_policy: AUTO
280         security_groups:
281         - get_input: security_group_id1
282         - get_input: security_group_id2
283         fixed_ips:
284         - ip_address:
285             get_input:
286             - cmaui_oam_ips
287             - 0
288         network:
289           get_input: shared_network_id
290       requirements:
291       - binding:
292           capability: tosca.capabilities.network.Bindable
293           node: server_cmaui
294           relationship: tosca.relationships.network.BindsTo
295     cmaui_port_0:
296       type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
297       properties:
298         replacement_policy: AUTO
299         security_groups:
300         - get_input: security_group_id1
301         fixed_ips:
302         - ip_address:
303             get_input:
304             - cmaui_oam_ips
305             - 0
306         network:
307           get_input: shared_network_id
308       requirements:
309       - binding:
310           capability: tosca.capabilities.network.Bindable
311           node: server_cmaui
312           relationship: tosca.relationships.network.BindsTo
313   groups:
314     addOn:
315       type: org.openecomp.groups.heat.HeatStack
316       properties:
317         heat_file: ../Artifacts/addOn.yml
318         description: cmaui server template for vMMSC
319       members:
320       - cmaui_port_2
321       - server_cmaui
322       - cmaui_port_1
323       - cmaui_port_0
324     main:
325       type: org.openecomp.groups.heat.HeatStack
326       properties:
327         heat_file: ../Artifacts/main.yml
328         description: |
329           Version 2.0 02-09-2016 (Authors: John Doe, user PROD)
330       members:
331       - jsa_security_group1
332       - jsa_security_group2