b164684390b5e9d51e6b15f473a494696230a1e2
[sdc.git] /
1 tosca_definitions_version: tosca_simple_yaml_1_0_0
2 metadata:
3   template_name: OCS-fw3
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_3:
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_3:
163             cidr:
164               get_input: HSL_direct_net_cidr
165             gateway_ip:
166               get_input: HSL_direct_net_gateway
167     service_instance4:
168       type: org.openecomp.resource.abstract.nodes.heat.service_template_3
169       directives:
170       - substitutable
171       properties:
172         flavor:
173           get_input: st_flavor
174         availability_zone:
175           get_input: availability_zone_1
176         image_name:
177           get_input: st_image_name
178         service_template_filter:
179           substitute_service_template: OCS-fw3_service_instance4ServiceTemplate.yaml
180           count:
181             get_input: max_num_fw_instances
182           scaling_enabled:
183             get_input: st_scaling
184           mandatory: false
185         service_type:
186           get_input: st_type
187         static_routes_list:
188         - token:
189           - get_input: st_static_routes_list
190           - ','
191           - 0
192         - token:
193           - get_input: st_static_routes_list
194           - ','
195           - 1
196         - token:
197           - get_input: st_static_routes_list
198           - ','
199           - 2
200         service_template_name:
201           get_input: st_name
202         service_interface_type_list:
203         - token:
204           - get_input: st_service_interface_type_list
205           - ','
206           - 0
207         - token:
208           - get_input: st_service_interface_type_list
209           - ','
210           - 1
211         - token:
212           - get_input: st_service_interface_type_list
213           - ','
214           - 2
215         service_instance_name:
216           get_input: service_instance_name
217         interface_list:
218         - virtual_network:
219             get_input: network_param1
220         - virtual_network:
221             get_input: network_param1
222         - virtual_network:
223             get_input: network_param2
224         service_mode:
225           get_input: st_mode
226         shared_ip_list:
227         - token:
228           - get_input: st_shared_ip_list
229           - ','
230           - 0
231         - token:
232           - get_input: st_shared_ip_list
233           - ','
234           - 1
235         - token:
236           - get_input: st_shared_ip_list
237           - ','
238           - 2
239       requirements:
240       - dependency:
241           capability: tosca.capabilities.Node
242           node: hsl_direct_net_3
243           relationship: tosca.relationships.DependsOn
244     service_policy_3:
245       type: org.openecomp.resource.vfc.rules.nodes.heat.network.contrail.NetworkRules
246       properties:
247         entries:
248           policy_rule:
249           - src_ports:
250             - start_port:
251                 get_input: start_src_ports
252               end_port:
253                 get_input: end_src_ports
254             protocol: any
255             action_list:
256               apply_service:
257               - service_instance4
258             dst_addresses:
259             - virtual_network:
260                 get_input: Cricket_OCS_direct_net_id
261             dst_ports:
262             - start_port:
263                 get_input: start_dst_ports
264               end_port:
265                 get_input: end_dst_ports
266             src_addresses:
267             - virtual_network:
268                 get_input: Cricket_OCS_protected_net_id
269             direction:
270               get_input: service_policy_direction
271         name:
272           get_input: service_policy_name
273       requirements:
274       - dependency:
275           capability: tosca.capabilities.Node
276           node: service_instance4
277           relationship: tosca.relationships.DependsOn
278   groups:
279     OCS-fw3_group:
280       type: org.openecomp.groups.heat.HeatStack
281       properties:
282         heat_file: ../Artifacts/OCS-fw3.yml
283         description: |
284           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.
285       members:
286       - hsl_direct_net_3
287       - service_instance4
288       - service_policy_3
289   substitution_mappings:
290     node_type: org.openecomp.resource.abstract.nodes.heat.OCS-fw3
291     capabilities:
292       end_point_hsl_direct_net_3:
293       - hsl_direct_net_3
294       - end_point
295       link_hsl_direct_net_3:
296       - hsl_direct_net_3
297       - link
298       feature_service_instance4:
299       - service_instance4
300       - feature
301       feature_hsl_direct_net_3:
302       - hsl_direct_net_3
303       - feature
304       feature_service_policy_3:
305       - service_policy_3
306       - feature
307       attachment_hsl_direct_net_3:
308       - hsl_direct_net_3
309       - attachment
310     requirements:
311       dependency_service_instance4:
312       - service_instance4
313       - dependency
314       network_service_policy_3:
315       - service_policy_3
316       - network
317       link_port_0_service_instance4:
318       - service_instance4
319       - link_port_0
320       link_port_1_service_instance4:
321       - service_instance4
322       - link_port_1
323       dependency_service_policy_3:
324       - service_policy_3
325       - dependency
326       dependency_hsl_direct_net_3:
327       - hsl_direct_net_3
328       - dependency
329       link_port_2_service_instance4:
330       - service_instance4
331       - link_port_2