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