[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 / sameServiceTemplate / 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     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     service_policy_direction:
82       hidden: false
83       immutable: false
84       type: string
85       description: Direction of Policy
86     st_name:
87       hidden: false
88       immutable: false
89       type: string
90       description: Name of service template
91     HSL_direct_net_gateway:
92       hidden: false
93       immutable: false
94       type: string
95       description: HSL (Logging) network gateway address
96     st_image:
97       hidden: false
98       immutable: false
99       type: string
100       description: Name of the image
101     st_shared_ip_list:
102       hidden: false
103       immutable: false
104       type: string
105       description: List of shared ip enabled-disabled
106     prefix_0:
107       hidden: false
108       immutable: false
109       type: string
110     Cricket_OCS_direct_net_id:
111       hidden: false
112       immutable: false
113       type: string
114       description: Name of Cricket OCS network
115     oam_mgmt_net_1_id:
116       hidden: false
117       immutable: false
118       type: string
119       description: Name of OAM network
120     prefix_1:
121       hidden: false
122       immutable: false
123       type: string
124     end_src_ports:
125       hidden: false
126       immutable: false
127       type: float
128       description: End of src port
129     prefix_2:
130       hidden: false
131       immutable: false
132       type: string
133     end_dst_ports:
134       hidden: false
135       immutable: false
136       type: float
137       description: End of dst port
138     st_image_name:
139       hidden: false
140       immutable: false
141       type: string
142       description: Name of the image
143     HSL_direct_net_id:
144       hidden: false
145       immutable: false
146       type: string
147       description: Name of HSL (Logging) network
148     HSL_direct_net_cidr:
149       hidden: false
150       immutable: false
151       type: string
152       description: HSL (Logging) network address (CIDR notation)
153   node_templates:
154     service_instance_1:
155       type: org.openecomp.resource.abstract.nodes.heat.service_template
156       directives:
157       - substitutable
158       properties:
159         flavor:
160           get_input: st_flavor
161         availability_zone:
162           get_input: availability_zone_1
163         image_name:
164           get_input: st_image
165         service_template_filter:
166           substitute_service_template: OCS-fw_service_instance_1ServiceTemplate.yaml
167           count: 1
168           scaling_enabled:
169             get_input: st_scaling
170           mandatory: true
171         service_type:
172           get_input: st_type
173         static_routes_list:
174         - token:
175           - get_input: st_static_routes_list
176           - ','
177           - 0
178         - token:
179           - get_input: st_static_routes_list
180           - ','
181           - 1
182         - token:
183           - get_input: st_static_routes_list
184           - ','
185           - 2
186         - token:
187           - get_input: st_static_routes_list
188           - ','
189           - 3
190         service_template_name:
191           get_input: st_name
192         service_interface_type_list:
193         - token:
194           - management,left,right,other
195           - ','
196           - 0
197         - token:
198           - management,left,right,other
199           - ','
200           - 1
201         - token:
202           - management,left,right,other
203           - ','
204           - 2
205         - token:
206           - management,left,right,other
207           - ','
208           - 3
209         service_instance_name:
210           get_input: service_instance_name
211         interface_list:
212         - virtual_network:
213             get_input: oam_mgmt_net_0_id
214         - virtual_network:
215             get_input: Cricket_OCS_direct_net_id
216         - virtual_network: hsl_direct_net1
217         - static_routes:
218           - prefix:
219               get_input: prefix_0
220           - prefix:
221               get_input: prefix_1
222           - prefix:
223               get_input: prefix_2
224           virtual_network:
225             get_input: oam_mgmt_net_1_id
226         service_mode:
227           get_input: st_mode
228         shared_ip_list:
229         - token:
230           - get_input: st_shared_ip_list
231           - ','
232           - 0
233         - token:
234           - get_input: st_shared_ip_list
235           - ','
236           - 1
237         - token:
238           - get_input: st_shared_ip_list
239           - ','
240           - 2
241         - token:
242           - get_input: st_shared_ip_list
243           - ','
244           - 3
245       requirements:
246       - link_port_2:
247           capability: tosca.capabilities.network.Linkable
248           node: hsl_direct_net1
249           relationship: tosca.relationships.network.LinksTo
250       - dependency:
251           capability: tosca.capabilities.Node
252           node: hsl_direct_net1
253           relationship: tosca.relationships.DependsOn
254     service_instance_2:
255       type: org.openecomp.resource.abstract.nodes.heat.service_template
256       directives:
257       - substitutable
258       properties:
259         flavor:
260           get_input: st_flavor
261         availability_zone:
262           get_input: availability_zone_1
263         image_name:
264           get_input: st_image
265         service_template_filter:
266           substitute_service_template: OCS-fw_service_instance_2ServiceTemplate.yaml
267           count:
268             get_input: max_num_fw_instances
269           scaling_enabled:
270             get_input: st_scaling
271           mandatory: false
272         service_type:
273           get_input: st_type
274         static_routes_list:
275         - token:
276           - get_input: st_static_routes_list
277           - ','
278           - 0
279         - token:
280           - get_input: st_static_routes_list
281           - ','
282           - 1
283         - token:
284           - get_input: st_static_routes_list
285           - ','
286           - 2
287         - token:
288           - get_input: st_static_routes_list
289           - ','
290           - 3
291         service_template_name:
292           get_input: st_name
293         service_interface_type_list:
294         - token:
295           - management,left,right,other
296           - ','
297           - 0
298         - token:
299           - management,left,right,other
300           - ','
301           - 1
302         - token:
303           - management,left,right,other
304           - ','
305           - 2
306         - token:
307           - management,left,right,other
308           - ','
309           - 3
310         service_instance_name:
311           get_input: service_instance_name
312         interface_list:
313         - virtual_network:
314             get_input: oam_mgmt_net_0_id
315         - virtual_network:
316             get_input: Cricket_OCS_direct_net_id
317         - virtual_network: hsl_direct_net2
318         - static_routes:
319           - prefix:
320               get_input: prefix_0
321           - prefix:
322               get_input: prefix_1
323           - prefix:
324               get_input: prefix_2
325           virtual_network:
326             get_input: oam_mgmt_net_1_id
327         service_mode:
328           get_input: st_mode
329         shared_ip_list:
330         - token:
331           - get_input: st_shared_ip_list
332           - ','
333           - 0
334         - token:
335           - get_input: st_shared_ip_list
336           - ','
337           - 1
338         - token:
339           - get_input: st_shared_ip_list
340           - ','
341           - 2
342         - token:
343           - get_input: st_shared_ip_list
344           - ','
345           - 3
346       requirements:
347       - link_port_2:
348           capability: tosca.capabilities.network.Linkable
349           node: hsl_direct_net2
350           relationship: tosca.relationships.network.LinksTo
351       - dependency:
352           capability: tosca.capabilities.Node
353           node: hsl_direct_net1
354           relationship: tosca.relationships.DependsOn
355     hsl_direct_net1:
356       type: org.openecomp.resource.vl.nodes.heat.network.contrail.VirtualNetwork
357       properties:
358         network_name:
359           get_input: HSL_direct_net_id
360         subnets:
361           hsl_ip_subnet:
362             cidr:
363               get_input: HSL_direct_net_cidr
364             gateway_ip:
365               get_input: HSL_direct_net_gateway
366     hsl_direct_net2:
367       type: org.openecomp.resource.vl.nodes.heat.network.contrail.VirtualNetwork
368       properties:
369         network_name:
370           get_input: HSL_direct_net_id
371     service_policy:
372       type: org.openecomp.resource.vfc.rules.nodes.heat.network.contrail.NetworkRules
373       properties:
374         entries:
375           policy_rule:
376           - src_ports:
377             - start_port:
378                 get_input: start_src_ports
379               end_port:
380                 get_input: end_src_ports
381             protocol: any
382             action_list:
383               apply_service:
384               - service_instance_1
385             dst_addresses:
386             - virtual_network:
387                 get_input: Cricket_OCS_direct_net_id
388             dst_ports:
389             - start_port:
390                 get_input: start_dst_ports
391               end_port:
392                 get_input: end_dst_ports
393             src_addresses:
394             - virtual_network:
395                 get_input: Cricket_OCS_protected_net_id
396             direction:
397               get_input: service_policy_direction
398         name:
399           get_input: service_policy_name
400       requirements:
401       - dependency:
402           capability: tosca.capabilities.Node
403           node: service_instance_1
404           relationship: tosca.relationships.DependsOn
405   groups:
406     OCS-fw_group:
407       type: org.openecomp.groups.heat.HeatStack
408       properties:
409         heat_file: ../Artifacts/OCS-fw.yml
410         description: |
411           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.
412       members:
413       - service_instance_1
414       - service_instance_2
415       - hsl_direct_net1
416       - hsl_direct_net2
417       - service_policy