push addional code
[sdc.git] / openecomp-be / lib / openecomp-sdc-translator-lib / openecomp-sdc-translator-core / src / test / resources / mock / services / heattotosca / contrail2serviceinstance / sharedNetworkMulti / expectedoutputfiles / MainServiceTemplate.yaml
1 tosca_definitions_version: tosca_simple_yaml_1_0_0
2 metadata:
3   template_name: Main
4 imports:
5   ContrailComputeGlobalTypes:
6     file: ContrailComputeGlobalTypesServiceTemplate.yaml
7   CinderVolumeGlobalTypes:
8     file: CinderVolumeGlobalTypesServiceTemplate.yaml
9   ContrailVirtualNetworkGlobalType:
10     file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
11   AbstractSubstituteGlobalTypes:
12     file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
13   ContrailPortGlobalTypes:
14     file: ContrailPortGlobalTypesServiceTemplate.yaml
15   GlobalSubstitutionTypes:
16     file: GlobalSubstitutionTypesServiceTemplate.yaml
17   NeutronPortGlobalTypes:
18     file: NeutronPortGlobalTypesServiceTemplate.yaml
19   NeutronNetGlobalTypes:
20     file: NeutronNetGlobalTypesServiceTemplate.yaml
21   CommonGlobalTypes:
22     file: CommonGlobalTypesServiceTemplate.yaml
23   ContrailAbstractSubstituteGlobalTypes:
24     file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
25   ContrailNetworkRuleGlobalType:
26     file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
27   NeutronSecurityRulesGlobalTypes:
28     file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
29   NovaServerGlobalTypes:
30     file: NovaServerGlobalTypesServiceTemplate.yaml
31   ContrailV2VirtualMachineInterfaceGlobalType:
32     file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
33 topology_template:
34   inputs:
35     Internal1_shared:
36       hidden: false
37       immutable: false
38       type: string
39     service_policy_name:
40       hidden: false
41       immutable: false
42       type: string
43       description: Policy Name
44     st_static_routes_list:
45       hidden: false
46       immutable: false
47       type: string
48       description: List of static routes enabled-disabled
49     st_type:
50       hidden: false
51       immutable: false
52       type: string
53       description: service type
54     Internal2_forwarding_mode:
55       hidden: false
56       immutable: false
57       type: string
58     st_service_interface_type_list:
59       hidden: false
60       immutable: false
61       type: string
62       description: List of interface types
63     st_mode:
64       hidden: false
65       immutable: false
66       type: string
67       description: service mode
68     Cricket_OCS_protected_net_id:
69       hidden: false
70       immutable: false
71       type: string
72       description: Name of Cricket OCS network
73     oam_mgmt_net_0_id:
74       hidden: false
75       immutable: false
76       type: string
77       description: Name of OAM network
78     start_dst_ports:
79       hidden: false
80       immutable: false
81       type: float
82       description: Start of dst port
83     st_flavor:
84       hidden: false
85       immutable: false
86       type: string
87       description: Flavor
88     availability_zone_1:
89       hidden: false
90       immutable: false
91       type: string
92       description: availability zone
93     Internal2_shared:
94       hidden: false
95       immutable: false
96       type: string
97     service_instance_name:
98       hidden: false
99       immutable: false
100       type: string
101       description: Service instance name
102     st_scaling:
103       hidden: false
104       immutable: false
105       type: string
106       description: Indicates whether service scaling is enabled
107     max_num_fw_instances:
108       hidden: false
109       immutable: false
110       type: float
111       description: maximum number of firewall instances for scaling
112     Internal1_net_name:
113       hidden: false
114       immutable: false
115       type: string
116     start_src_ports:
117       hidden: false
118       immutable: false
119       type: float
120       description: Start of src port
121     service_policy_direction:
122       hidden: false
123       immutable: false
124       type: string
125       description: Direction of Policy
126     st_name:
127       hidden: false
128       immutable: false
129       type: string
130       description: Name of service template
131     Internal2_net_name:
132       hidden: false
133       immutable: false
134       type: string
135     hsl_direct_net3:
136       hidden: false
137       immutable: false
138       type: string
139     hsl_direct_net4:
140       hidden: false
141       immutable: false
142       type: string
143     HSL_direct_net_gateway:
144       hidden: false
145       immutable: false
146       type: string
147       description: HSL (Logging) network gateway address
148     hsl_direct_net1:
149       hidden: false
150       immutable: false
151       type: string
152     hsl_direct_net2:
153       hidden: false
154       immutable: false
155       type: string
156     st_image:
157       hidden: false
158       immutable: false
159       type: string
160       description: Name of the image
161     st_shared_ip_list:
162       hidden: false
163       immutable: false
164       type: string
165       description: List of shared ip enabled-disabled
166     Cricket_OCS_direct_net_id:
167       hidden: false
168       immutable: false
169       type: string
170       description: Name of Cricket OCS network
171     Internal1_forwarding_mode:
172       hidden: false
173       immutable: false
174       type: string
175     end_src_ports:
176       hidden: false
177       immutable: false
178       type: float
179       description: End of src port
180     end_dst_ports:
181       hidden: false
182       immutable: false
183       type: float
184       description: End of dst port
185     HSL_direct_net_id:
186       hidden: false
187       immutable: false
188       type: string
189       description: Name of HSL (Logging) network
190     HSL_direct_net_cidr:
191       hidden: false
192       immutable: false
193       type: string
194       description: HSL (Logging) network address (CIDR notation)
195   node_templates:
196     Internal2-net:
197       type: org.openecomp.resource.vl.nodes.heat.network.contrail.VirtualNetwork
198       properties:
199         shared:
200           get_input: Internal1_shared
201         forwarding_mode:
202           get_input: Internal1_forwarding_mode
203         network_name:
204           get_input: Internal2_net_name
205     Internal1-net:
206       type: org.openecomp.resource.vl.nodes.heat.network.contrail.VirtualNetwork
207       properties:
208         shared:
209           get_input: Internal1_shared
210         forwarding_mode:
211           get_input: Internal1_forwarding_mode
212         network_name:
213           get_input: Internal1_net_name
214     Internal3-net:
215       type: org.openecomp.resource.vl.nodes.heat.network.contrail.VirtualNetwork
216       properties:
217         shared:
218           get_input: Internal1_shared
219         forwarding_mode:
220           get_input: Internal1_forwarding_mode
221         network_name:
222           get_input: Internal2_net_name
223     hsl_direct_net:
224       type: org.openecomp.resource.vl.nodes.heat.network.contrail.VirtualNetwork
225       properties:
226         network_name:
227           get_input: HSL_direct_net_id
228         subnets:
229           hsl_ip_subnet:
230             cidr:
231               get_input: HSL_direct_net_cidr
232             gateway_ip:
233               get_input: HSL_direct_net_gateway
234     service_instance:
235       type: org.openecomp.resource.abstract.nodes.heat.service_template
236       directives:
237       - substitutable
238       properties:
239         flavor:
240           get_input: st_flavor
241         availability_zone:
242           get_input: availability_zone_1
243         image_name:
244           get_input: st_image
245         service_template_filter:
246           substitute_service_template: service_instanceServiceTemplate.yaml
247           count:
248             get_input: max_num_fw_instances
249           scaling_enabled:
250             get_input: st_scaling
251           mandatory: false
252         service_type:
253           get_input: st_type
254         static_routes_list:
255         - token:
256           - get_input: st_static_routes_list
257           - ','
258           - 0
259         - token:
260           - get_input: st_static_routes_list
261           - ','
262           - 1
263         - token:
264           - get_input: st_static_routes_list
265           - ','
266           - 2
267         - token:
268           - get_input: st_static_routes_list
269           - ','
270           - 3
271         - token:
272           - get_input: st_static_routes_list
273           - ','
274           - 4
275         service_template_name:
276           get_input: st_name
277         service_interface_type_list:
278         - token:
279           - get_input: st_service_interface_type_list
280           - ','
281           - 0
282         - token:
283           - get_input: st_service_interface_type_list
284           - ','
285           - 1
286         - token:
287           - get_input: st_service_interface_type_list
288           - ','
289           - 2
290         - token:
291           - get_input: st_service_interface_type_list
292           - ','
293           - 3
294         - token:
295           - get_input: st_service_interface_type_list
296           - ','
297           - 4
298         interface_list:
299         - virtual_network:
300             get_input: hsl_direct_net1
301         - virtual_network:
302             get_input: hsl_direct_net2
303         - virtual_network:
304             get_input: hsl_direct_net3
305         - virtual_network:
306             get_input: hsl_direct_net4
307         - virtual_network: hsl_direct_net
308         service_instance_name:
309           get_input: service_instance_name
310         service_mode:
311           get_input: st_mode
312         shared_ip_list:
313         - token:
314           - get_input: st_shared_ip_list
315           - ','
316           - 0
317         - token:
318           - get_input: st_shared_ip_list
319           - ','
320           - 1
321         - token:
322           - get_input: st_shared_ip_list
323           - ','
324           - 2
325         - token:
326           - get_input: st_shared_ip_list
327           - ','
328           - 3
329         - token:
330           - get_input: st_shared_ip_list
331           - ','
332           - 4
333       requirements:
334       - link_port_0:
335           capability: tosca.capabilities.network.Linkable
336           node: Internal1-net
337           relationship: tosca.relationships.network.LinksTo
338       - link_port_1:
339           capability: tosca.capabilities.network.Linkable
340           node: Internal2-net
341           relationship: tosca.relationships.network.LinksTo
342       - link_port_2:
343           capability: tosca.capabilities.network.Linkable
344           node: Internal3-net
345           relationship: tosca.relationships.network.LinksTo
346       - link_port_4:
347           capability: tosca.capabilities.network.Linkable
348           node: hsl_direct_net
349           relationship: tosca.relationships.network.LinksTo
350       - dependency:
351           capability: tosca.capabilities.Node
352           node: hsl_direct_net
353           relationship: tosca.relationships.DependsOn
354     service_policy:
355       type: org.openecomp.resource.vfc.rules.nodes.heat.network.contrail.NetworkRules
356       properties:
357         entries:
358           policy_rule:
359           - src_ports:
360             - start_port:
361                 get_input: start_src_ports
362               end_port:
363                 get_input: end_src_ports
364             protocol: any
365             action_list:
366               apply_service:
367               - service_instance
368             dst_addresses:
369             - virtual_network:
370                 get_input: Cricket_OCS_direct_net_id
371             dst_ports:
372             - start_port:
373                 get_input: start_dst_ports
374               end_port:
375                 get_input: end_dst_ports
376             src_addresses:
377             - virtual_network:
378                 get_input: Cricket_OCS_protected_net_id
379             direction:
380               get_input: service_policy_direction
381         name:
382           get_input: service_policy_name
383       requirements:
384       - dependency:
385           capability: tosca.capabilities.Node
386           node: service_instance
387           relationship: tosca.relationships.DependsOn
388   groups:
389     OCS-fw:
390       type: org.openecomp.groups.heat.HeatStack
391       properties:
392         heat_file: ../Artifacts/OCS-fw.yml
393         description: |
394           Based on the following reference for the HOT-DMZ-FW template: Version 3.5 8-10-2015 (Authors: Art Mishurov,am254u & Johhny Chen, jc3066) - HOT-DMZ-FW template that creates two DMZ networks (direct and protected) with a scaled out firewall service between the two.
395       members:
396       - hsl_direct_net
397       - service_instance
398       - service_policy
399     network_base:
400       type: org.openecomp.groups.heat.HeatStack
401       properties:
402         heat_file: ../Artifacts/network_base.yml
403         description: ASC External Networks Template
404       members:
405       - Internal2-net
406       - Internal1-net
407       - Internal3-net