[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 / connectToNetworkSharedMultiNested / expectedoutputfiles / OCS-fw2ServiceTemplate.yaml
1 tosca_definitions_version: tosca_simple_yaml_1_0_0
2 metadata:
3   template_name: OCS-fw2
4 imports:
5 - openecomp_heat_index:
6     file: openecomp-heat/_index.yml
7 - GlobalSubstitutionTypes:
8     file: GlobalSubstitutionTypesServiceTemplate.yaml
9 topology_template:
10   inputs:
11     service_policy_name:
12       hidden: false
13       immutable: false
14       type: string
15       description: Policy Name
16     st_static_routes_list:
17       hidden: false
18       immutable: false
19       type: string
20       description: List of static routes enabled-disabled
21     st_type:
22       hidden: false
23       immutable: false
24       type: string
25       description: service type
26     st_service_interface_type_list:
27       hidden: false
28       immutable: false
29       type: string
30       description: List of interface types
31     st_mode:
32       hidden: false
33       immutable: false
34       type: string
35       description: service mode
36     Cricket_OCS_protected_net_id:
37       hidden: false
38       immutable: false
39       type: string
40       description: Name of Cricket OCS network
41     oam_mgmt_net_0_id:
42       hidden: false
43       immutable: false
44       type: string
45       description: Name of OAM network
46     start_dst_ports:
47       hidden: false
48       immutable: false
49       type: float
50       description: Start of dst port
51     st_flavor:
52       hidden: false
53       immutable: false
54       type: string
55       description: Flavor
56     availability_zone_1:
57       hidden: false
58       immutable: false
59       type: string
60       description: availability zone
61     service_instance_name:
62       hidden: false
63       immutable: false
64       type: string
65       description: Service instance name
66     st_scaling:
67       hidden: false
68       immutable: false
69       type: string
70       description: Indicates whether service scaling is enabled
71     max_num_fw_instances:
72       hidden: false
73       immutable: false
74       type: float
75       description: maximum number of firewall instances for scaling
76     start_src_ports:
77       hidden: false
78       immutable: false
79       type: float
80       description: Start of src port
81     network_param2:
82       hidden: false
83       immutable: false
84       type: string
85     service_policy_direction:
86       hidden: false
87       immutable: false
88       type: string
89       description: Direction of Policy
90     network_param1:
91       hidden: false
92       immutable: false
93       type: string
94     st_name:
95       hidden: false
96       immutable: false
97       type: string
98       description: Name of service template
99     hsl_direct_net3:
100       hidden: false
101       immutable: false
102       type: string
103     hsl_direct_net4:
104       hidden: false
105       immutable: false
106       type: string
107     HSL_direct_net_gateway:
108       hidden: false
109       immutable: false
110       type: string
111       description: HSL (Logging) network gateway address
112     hsl_direct_net1:
113       hidden: false
114       immutable: false
115       type: string
116     hsl_direct_net2:
117       hidden: false
118       immutable: false
119       type: string
120     st_shared_ip_list:
121       hidden: false
122       immutable: false
123       type: string
124       description: List of shared ip enabled-disabled
125     Cricket_OCS_direct_net_id:
126       hidden: false
127       immutable: false
128       type: string
129       description: Name of Cricket OCS network
130     end_src_ports:
131       hidden: false
132       immutable: false
133       type: float
134       description: End of src port
135     end_dst_ports:
136       hidden: false
137       immutable: false
138       type: float
139       description: End of dst port
140     st_image_name:
141       hidden: false
142       immutable: false
143       type: string
144       description: Name of the image
145     HSL_direct_net_id:
146       hidden: false
147       immutable: false
148       type: string
149       description: Name of HSL (Logging) network
150     HSL_direct_net_cidr:
151       hidden: false
152       immutable: false
153       type: string
154       description: HSL (Logging) network address (CIDR notation)
155   node_templates:
156     service_instance1:
157       type: org.openecomp.resource.abstract.nodes.heat.service_template
158       directives:
159       - substitutable
160       properties:
161         flavor:
162           get_input: st_flavor
163         availability_zone:
164           get_input: availability_zone_1
165         image_name:
166           get_input: st_image_name
167         service_template_filter:
168           substitute_service_template: OCS-fw2_service_instance1ServiceTemplate.yaml
169           count:
170             get_input: max_num_fw_instances
171           scaling_enabled:
172             get_input: st_scaling
173           mandatory: false
174         service_type:
175           get_input: st_type
176         static_routes_list:
177         - token:
178           - get_input: st_static_routes_list
179           - ','
180           - 0
181         - token:
182           - get_input: st_static_routes_list
183           - ','
184           - 1
185         - token:
186           - get_input: st_static_routes_list
187           - ','
188           - 2
189         service_template_name:
190           get_input: st_name
191         service_interface_type_list:
192         - token:
193           - get_input: st_service_interface_type_list
194           - ','
195           - 0
196         - token:
197           - get_input: st_service_interface_type_list
198           - ','
199           - 1
200         - token:
201           - get_input: st_service_interface_type_list
202           - ','
203           - 2
204         service_instance_name:
205           get_input: service_instance_name
206         interface_list:
207         - virtual_network:
208             get_input: network_param2
209         - virtual_network:
210             get_input: network_param1
211         - virtual_network:
212             get_input: network_param2
213         service_mode:
214           get_input: st_mode
215         shared_ip_list:
216         - token:
217           - get_input: st_shared_ip_list
218           - ','
219           - 0
220         - token:
221           - get_input: st_shared_ip_list
222           - ','
223           - 1
224         - token:
225           - get_input: st_shared_ip_list
226           - ','
227           - 2
228       requirements:
229       - dependency:
230           capability: tosca.capabilities.Node
231           node: hsl_direct_net
232           relationship: tosca.relationships.DependsOn
233     test_nested3:
234       type: org.openecomp.resource.abstract.nodes.heat.OCS-fw3
235       directives:
236       - substitutable
237       properties:
238         network_param2:
239           get_input: network_param1
240         service_template_filter:
241           substitute_service_template: OCS-fw3ServiceTemplate.yaml
242         network_param1:
243           get_input: network_param1
244     hsl_direct_net:
245       type: org.openecomp.resource.vl.nodes.heat.network.contrail.VirtualNetwork
246       properties:
247         network_name:
248           get_input: HSL_direct_net_id
249         subnets:
250           hsl_ip_subnet:
251             cidr:
252               get_input: HSL_direct_net_cidr
253             gateway_ip:
254               get_input: HSL_direct_net_gateway
255     service_instance3:
256       type: org.openecomp.resource.abstract.nodes.heat.service_template
257       directives:
258       - substitutable
259       properties:
260         flavor:
261           get_input: st_flavor
262         availability_zone:
263           get_input: availability_zone_1
264         image_name:
265           get_input: st_image_name
266         service_template_filter:
267           substitute_service_template: OCS-fw2_service_instance3ServiceTemplate.yaml
268           count:
269             get_input: max_num_fw_instances
270           scaling_enabled:
271             get_input: st_scaling
272           mandatory: false
273         service_type:
274           get_input: st_type
275         static_routes_list:
276         - token:
277           - get_input: st_static_routes_list
278           - ','
279           - 0
280         - token:
281           - get_input: st_static_routes_list
282           - ','
283           - 1
284         - token:
285           - get_input: st_static_routes_list
286           - ','
287           - 2
288         service_template_name:
289           get_input: st_name
290         service_interface_type_list:
291         - token:
292           - get_input: st_service_interface_type_list
293           - ','
294           - 0
295         - token:
296           - get_input: st_service_interface_type_list
297           - ','
298           - 1
299         - token:
300           - get_input: st_service_interface_type_list
301           - ','
302           - 2
303         service_instance_name:
304           get_input: service_instance_name
305         interface_list:
306         - virtual_network:
307             get_input: network_param1
308         - virtual_network:
309             get_input: network_param1
310         - virtual_network:
311             get_input: network_param2
312         service_mode:
313           get_input: st_mode
314         shared_ip_list:
315         - token:
316           - get_input: st_shared_ip_list
317           - ','
318           - 0
319         - token:
320           - get_input: st_shared_ip_list
321           - ','
322           - 1
323         - token:
324           - get_input: st_shared_ip_list
325           - ','
326           - 2
327       requirements:
328       - dependency:
329           capability: tosca.capabilities.Node
330           node: hsl_direct_net
331           relationship: tosca.relationships.DependsOn
332     service_policy:
333       type: org.openecomp.resource.vfc.rules.nodes.heat.network.contrail.NetworkRules
334       properties:
335         entries:
336           policy_rule:
337           - src_ports:
338             - start_port:
339                 get_input: start_src_ports
340               end_port:
341                 get_input: end_src_ports
342             protocol: any
343             action_list:
344               apply_service:
345               - service_instance3
346             dst_addresses:
347             - virtual_network:
348                 get_input: Cricket_OCS_direct_net_id
349             dst_ports:
350             - start_port:
351                 get_input: start_dst_ports
352               end_port:
353                 get_input: end_dst_ports
354             src_addresses:
355             - virtual_network:
356                 get_input: Cricket_OCS_protected_net_id
357             direction:
358               get_input: service_policy_direction
359         name:
360           get_input: service_policy_name
361       requirements:
362       - dependency:
363           capability: tosca.capabilities.Node
364           node: service_instance3
365           relationship: tosca.relationships.DependsOn
366   groups:
367     OCS-fw2_group:
368       type: org.openecomp.groups.heat.HeatStack
369       properties:
370         heat_file: ../Artifacts/OCS-fw2.yml
371         description: |
372           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.
373       members:
374       - service_instance1
375       - test_nested3
376       - hsl_direct_net
377       - service_instance3
378       - service_policy
379   substitution_mappings:
380     node_type: org.openecomp.resource.abstract.nodes.heat.OCS-fw2
381     capabilities:
382       feature_service_policy_test_nested3:
383       - test_nested3
384       - feature_service_policy
385       feature_service_instance1:
386       - service_instance1
387       - feature
388       feature_service_instance3:
389       - service_instance3
390       - feature
391       attachment_hsl_direct_net:
392       - hsl_direct_net
393       - attachment
394       end_point_hsl_direct_net:
395       - hsl_direct_net
396       - end_point
397       feature_service_instance4_test_nested3:
398       - test_nested3
399       - feature_service_instance4
400       link_hsl_direct_net:
401       - hsl_direct_net
402       - link
403       feature_service_policy:
404       - service_policy
405       - feature
406       feature_hsl_direct_net_test_nested3:
407       - test_nested3
408       - feature_hsl_direct_net
409       link_hsl_direct_net_test_nested3:
410       - test_nested3
411       - link_hsl_direct_net
412       attachment_hsl_direct_net_test_nested3:
413       - test_nested3
414       - attachment_hsl_direct_net
415       feature_test_nested3:
416       - test_nested3
417       - feature
418       feature_hsl_direct_net:
419       - hsl_direct_net
420       - feature
421       end_point_hsl_direct_net_test_nested3:
422       - test_nested3
423       - end_point_hsl_direct_net
424     requirements:
425       link_port_0_service_instance1:
426       - service_instance1
427       - link_port_0
428       dependency_service_instance3:
429       - service_instance3
430       - dependency
431       dependency_hsl_direct_net:
432       - hsl_direct_net
433       - dependency
434       dependency_hsl_direct_net_test_nested3:
435       - test_nested3
436       - dependency_hsl_direct_net
437       link_port_0_service_instance3:
438       - service_instance3
439       - link_port_0
440       network_service_policy:
441       - service_policy
442       - network
443       link_port_2_service_instance1:
444       - service_instance1
445       - link_port_2
446       link_port_0_service_instance4_test_nested3:
447       - test_nested3
448       - link_port_0_service_instance4
449       dependency_service_policy:
450       - service_policy
451       - dependency
452       link_port_2_service_instance3:
453       - service_instance3
454       - link_port_2
455       network_service_policy_test_nested3:
456       - test_nested3
457       - network_service_policy
458       link_port_2_service_instance4_test_nested3:
459       - test_nested3
460       - link_port_2_service_instance4
461       dependency_test_nested3:
462       - test_nested3
463       - dependency
464       dependency_service_instance4_test_nested3:
465       - test_nested3
466       - dependency_service_instance4
467       dependency_service_policy_test_nested3:
468       - test_nested3
469       - dependency_service_policy
470       link_port_1_service_instance3:
471       - service_instance3
472       - link_port_1
473       link_port_1_service_instance1:
474       - service_instance1
475       - link_port_1
476       link_port_1_service_instance4_test_nested3:
477       - test_nested3
478       - link_port_1_service_instance4
479       dependency_service_instance1:
480       - service_instance1
481       - dependency