d4561914627795fdc186488973971443a59a6fd3
[sdc.git] /
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     hsl_direct_net_2:
157       type: org.openecomp.resource.vl.nodes.heat.network.contrail.VirtualNetwork
158       properties:
159         network_name:
160           get_input: HSL_direct_net_id
161         subnets:
162           hsl_ip_subnet_2:
163             cidr:
164               get_input: HSL_direct_net_cidr
165             gateway_ip:
166               get_input: HSL_direct_net_gateway
167     test_nested3:
168       type: org.openecomp.resource.abstract.nodes.heat.OCS-fw3
169       directives:
170       - substitutable
171       properties:
172         network_param2:
173           get_input: network_param1
174         service_template_filter:
175           substitute_service_template: OCS-fw3ServiceTemplate.yaml
176         network_param1:
177           get_input: network_param1
178     service_instance3:
179       type: org.openecomp.resource.abstract.nodes.heat.service_template_2
180       directives:
181       - substitutable
182       properties:
183         flavor:
184           get_input: st_flavor
185         availability_zone:
186           get_input: availability_zone_1
187         image_name:
188           get_input: st_image_name
189         service_template_filter:
190           substitute_service_template: OCS-fw2_service_instance3ServiceTemplate.yaml
191           count:
192             get_input: max_num_fw_instances
193           scaling_enabled:
194             get_input: st_scaling
195           mandatory: false
196         service_type:
197           get_input: st_type
198         static_routes_list:
199         - token:
200           - get_input: st_static_routes_list
201           - ','
202           - 0
203         - token:
204           - get_input: st_static_routes_list
205           - ','
206           - 1
207         - token:
208           - get_input: st_static_routes_list
209           - ','
210           - 2
211         service_template_name:
212           get_input: st_name
213         service_interface_type_list:
214         - token:
215           - get_input: st_service_interface_type_list
216           - ','
217           - 0
218         - token:
219           - get_input: st_service_interface_type_list
220           - ','
221           - 1
222         - token:
223           - get_input: st_service_interface_type_list
224           - ','
225           - 2
226         service_instance_name:
227           get_input: service_instance_name
228         interface_list:
229         - virtual_network:
230             get_input: network_param1
231         - virtual_network:
232             get_input: network_param1
233         - virtual_network:
234             get_input: network_param2
235         service_mode:
236           get_input: st_mode
237         shared_ip_list:
238         - token:
239           - get_input: st_shared_ip_list
240           - ','
241           - 0
242         - token:
243           - get_input: st_shared_ip_list
244           - ','
245           - 1
246         - token:
247           - get_input: st_shared_ip_list
248           - ','
249           - 2
250       requirements:
251       - dependency:
252           capability: tosca.capabilities.Node
253           node: hsl_direct_net_2
254           relationship: tosca.relationships.DependsOn
255     service_policy_2:
256       type: org.openecomp.resource.vfc.rules.nodes.heat.network.contrail.NetworkRules
257       properties:
258         entries:
259           policy_rule:
260           - src_ports:
261             - start_port:
262                 get_input: start_src_ports
263               end_port:
264                 get_input: end_src_ports
265             protocol: any
266             action_list:
267               apply_service:
268               - service_instance3
269             dst_addresses:
270             - virtual_network:
271                 get_input: Cricket_OCS_direct_net_id
272             dst_ports:
273             - start_port:
274                 get_input: start_dst_ports
275               end_port:
276                 get_input: end_dst_ports
277             src_addresses:
278             - virtual_network:
279                 get_input: Cricket_OCS_protected_net_id
280             direction:
281               get_input: service_policy_direction
282         name:
283           get_input: service_policy_name
284       requirements:
285       - dependency:
286           capability: tosca.capabilities.Node
287           node: service_instance3
288           relationship: tosca.relationships.DependsOn
289     service_instance21:
290       type: org.openecomp.resource.abstract.nodes.heat.service_template_2
291       directives:
292       - substitutable
293       properties:
294         flavor:
295           get_input: st_flavor
296         availability_zone:
297           get_input: availability_zone_1
298         image_name:
299           get_input: st_image_name
300         service_template_filter:
301           substitute_service_template: OCS-fw2_service_instance21ServiceTemplate.yaml
302           count:
303             get_input: max_num_fw_instances
304           scaling_enabled:
305             get_input: st_scaling
306           mandatory: false
307         service_type:
308           get_input: st_type
309         static_routes_list:
310         - token:
311           - get_input: st_static_routes_list
312           - ','
313           - 0
314         - token:
315           - get_input: st_static_routes_list
316           - ','
317           - 1
318         - token:
319           - get_input: st_static_routes_list
320           - ','
321           - 2
322         service_template_name:
323           get_input: st_name
324         service_interface_type_list:
325         - token:
326           - get_input: st_service_interface_type_list
327           - ','
328           - 0
329         - token:
330           - get_input: st_service_interface_type_list
331           - ','
332           - 1
333         - token:
334           - get_input: st_service_interface_type_list
335           - ','
336           - 2
337         service_instance_name:
338           get_input: service_instance_name
339         interface_list:
340         - virtual_network:
341             get_input: network_param2
342         - virtual_network:
343             get_input: network_param1
344         - virtual_network:
345             get_input: network_param2
346         service_mode:
347           get_input: st_mode
348         shared_ip_list:
349         - token:
350           - get_input: st_shared_ip_list
351           - ','
352           - 0
353         - token:
354           - get_input: st_shared_ip_list
355           - ','
356           - 1
357         - token:
358           - get_input: st_shared_ip_list
359           - ','
360           - 2
361       requirements:
362       - dependency:
363           capability: tosca.capabilities.Node
364           node: hsl_direct_net_2
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       - hsl_direct_net_2
375       - test_nested3
376       - service_instance3
377       - service_policy_2
378       - service_instance21
379   substitution_mappings:
380     node_type: org.openecomp.resource.abstract.nodes.heat.OCS-fw2
381     capabilities:
382       feature_service_instance21:
383       - service_instance21
384       - feature
385       feature_service_instance3:
386       - service_instance3
387       - feature
388       feature_hsl_direct_net_2:
389       - hsl_direct_net_2
390       - feature
391       feature_service_policy_2:
392       - service_policy_2
393       - feature
394       feature_service_policy_3_test_nested3:
395       - test_nested3
396       - feature_service_policy_3
397       end_point_hsl_direct_net_3_test_nested3:
398       - test_nested3
399       - end_point_hsl_direct_net_3
400       feature_service_instance4_test_nested3:
401       - test_nested3
402       - feature_service_instance4
403       feature_hsl_direct_net_3_test_nested3:
404       - test_nested3
405       - feature_hsl_direct_net_3
406       link_hsl_direct_net_2:
407       - hsl_direct_net_2
408       - link
409       link_hsl_direct_net_3_test_nested3:
410       - test_nested3
411       - link_hsl_direct_net_3
412       feature_test_nested3:
413       - test_nested3
414       - feature
415       end_point_hsl_direct_net_2:
416       - hsl_direct_net_2
417       - end_point
418       attachment_hsl_direct_net_3_test_nested3:
419       - test_nested3
420       - attachment_hsl_direct_net_3
421       attachment_hsl_direct_net_2:
422       - hsl_direct_net_2
423       - attachment
424     requirements:
425       dependency_service_instance3:
426       - service_instance3
427       - dependency
428       network_service_policy_2:
429       - service_policy_2
430       - network
431       link_port_0_service_instance3:
432       - service_instance3
433       - link_port_0
434       dependency_hsl_direct_net_3_test_nested3:
435       - test_nested3
436       - dependency_hsl_direct_net_3
437       link_port_2_service_instance21:
438       - service_instance21
439       - link_port_2
440       link_port_0_service_instance4_test_nested3:
441       - test_nested3
442       - link_port_0_service_instance4
443       dependency_hsl_direct_net_2:
444       - hsl_direct_net_2
445       - dependency
446       link_port_2_service_instance3:
447       - service_instance3
448       - link_port_2
449       link_port_1_service_instance21:
450       - service_instance21
451       - link_port_1
452       dependency_service_policy_3_test_nested3:
453       - test_nested3
454       - dependency_service_policy_3
455       link_port_0_service_instance21:
456       - service_instance21
457       - link_port_0
458       link_port_2_service_instance4_test_nested3:
459       - test_nested3
460       - link_port_2_service_instance4
461       dependency_service_instance21:
462       - service_instance21
463       - dependency
464       dependency_test_nested3:
465       - test_nested3
466       - dependency
467       dependency_service_instance4_test_nested3:
468       - test_nested3
469       - dependency_service_instance4
470       link_port_1_service_instance3:
471       - service_instance3
472       - link_port_1
473       link_port_1_service_instance4_test_nested3:
474       - test_nested3
475       - link_port_1_service_instance4
476       dependency_service_policy_2:
477       - service_policy_2
478       - dependency
479       network_service_policy_3_test_nested3:
480       - test_nested3
481       - network_service_policy_3