[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 / diffServiceTemplate / 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     count:
92       hidden: false
93       immutable: false
94     HSL_direct_net_gateway:
95       hidden: false
96       immutable: false
97       type: string
98       description: HSL (Logging) network gateway address
99     st_image:
100       hidden: false
101       immutable: false
102       type: string
103       description: Name of the image
104     st_shared_ip_list:
105       hidden: false
106       immutable: false
107       type: string
108       description: List of shared ip enabled-disabled
109     prefix_0:
110       hidden: false
111       immutable: false
112       type: string
113     Cricket_OCS_direct_net_id:
114       hidden: false
115       immutable: false
116       type: string
117       description: Name of Cricket OCS network
118     oam_mgmt_net_1_id:
119       hidden: false
120       immutable: false
121       type: string
122       description: Name of OAM network
123     prefix_1:
124       hidden: false
125       immutable: false
126       type: string
127     end_src_ports:
128       hidden: false
129       immutable: false
130       type: float
131       description: End of src port
132     prefix_2:
133       hidden: false
134       immutable: false
135       type: string
136     end_dst_ports:
137       hidden: false
138       immutable: false
139       type: float
140       description: End of dst port
141     st_image_name:
142       hidden: false
143       immutable: false
144       type: string
145       description: Name of the image
146     HSL_direct_net_id:
147       hidden: false
148       immutable: false
149       type: string
150       description: Name of HSL (Logging) network
151     HSL_direct_net_cidr:
152       hidden: false
153       immutable: false
154       type: string
155       description: HSL (Logging) network address (CIDR notation)
156   node_templates:
157     service_instance_1:
158       type: org.openecomp.resource.abstract.nodes.heat.service_template_1
159       directives:
160       - substitutable
161       properties:
162         flavor:
163           get_input: st_flavor
164         availability_zone:
165           get_input: availability_zone_1
166         image_name:
167           get_input: st_image
168         service_template_filter:
169           substitute_service_template: OCS-fw_service_instance_1ServiceTemplate.yaml
170           count:
171             get_input: max_num_fw_instances
172           scaling_enabled: false
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         - token:
190           - get_input: st_static_routes_list
191           - ','
192           - 3
193         service_template_name:
194           get_input: st_name
195         service_interface_type_list:
196         - token:
197           - management,left,right,other
198           - ','
199           - 0
200         - token:
201           - management,left,right,other
202           - ','
203           - 1
204         - token:
205           - management,left,right,other
206           - ','
207           - 2
208         - token:
209           - management,left,right,other
210           - ','
211           - 3
212         service_instance_name:
213           get_input: service_instance_name
214         interface_list:
215         - virtual_network:
216             get_input: oam_mgmt_net_0_id
217         - virtual_network:
218             get_input: Cricket_OCS_direct_net_id
219         - virtual_network: hsl_direct_net
220         - static_routes:
221           - prefix:
222               get_input: prefix_0
223           - prefix:
224               get_input: prefix_1
225           - prefix:
226               get_input: prefix_2
227           virtual_network:
228             get_input: oam_mgmt_net_1_id
229         service_mode:
230           get_input: st_mode
231         shared_ip_list:
232         - token:
233           - get_input: st_shared_ip_list
234           - ','
235           - 0
236         - token:
237           - get_input: st_shared_ip_list
238           - ','
239           - 1
240         - token:
241           - get_input: st_shared_ip_list
242           - ','
243           - 2
244         - token:
245           - get_input: st_shared_ip_list
246           - ','
247           - 3
248       requirements:
249       - link_port_2:
250           capability: tosca.capabilities.network.Linkable
251           node: hsl_direct_net
252           relationship: tosca.relationships.network.LinksTo
253       - dependency:
254           capability: tosca.capabilities.Node
255           node: hsl_direct_net
256           relationship: tosca.relationships.DependsOn
257     service_instance_2:
258       type: org.openecomp.resource.abstract.nodes.heat.service_template_2
259       directives:
260       - substitutable
261       properties:
262         flavor:
263           get_input: st_flavor
264         availability_zone:
265           get_input: availability_zone_1
266         image_name:
267           get_input: st_image_name
268         service_template_filter:
269           substitute_service_template: OCS-fw_service_instance_2ServiceTemplate.yaml
270           count: 9
271           mandatory: true
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         service_template_name:
284           get_input: st_name
285         service_interface_type_list:
286         - token:
287           - get_input: st_service_interface_type_list
288           - ','
289           - 0
290         - token:
291           - get_input: st_service_interface_type_list
292           - ','
293           - 1
294         service_instance_name:
295           get_input: service_instance_name
296         interface_list:
297         - virtual_network:
298             get_input: oam_mgmt_net_0_id
299         - virtual_network:
300             get_input: Cricket_OCS_direct_net_id
301         service_mode:
302           get_input: st_mode
303         shared_ip_list:
304         - token:
305           - get_input: st_shared_ip_list
306           - ','
307           - 0
308         - token:
309           - get_input: st_shared_ip_list
310           - ','
311           - 1
312       requirements:
313       - dependency:
314           capability: tosca.capabilities.Node
315           node: hsl_direct_net
316           relationship: tosca.relationships.DependsOn
317     hsl_direct_net:
318       type: org.openecomp.resource.vl.nodes.heat.network.contrail.VirtualNetwork
319       properties:
320         network_name:
321           get_input: HSL_direct_net_id
322         subnets:
323           hsl_ip_subnet:
324             cidr:
325               get_input: HSL_direct_net_cidr
326             gateway_ip:
327               get_input: HSL_direct_net_gateway
328     service_policy:
329       type: org.openecomp.resource.vfc.rules.nodes.heat.network.contrail.NetworkRules
330       properties:
331         entries:
332           policy_rule:
333           - src_ports:
334             - start_port:
335                 get_input: start_src_ports
336               end_port:
337                 get_input: end_src_ports
338             protocol: any
339             metadata:
340               get_attribute:
341               - service_instance_2
342               - service_instance_name
343             action_list:
344               apply_service:
345               - service_instance_1
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_instance_1
365           relationship: tosca.relationships.DependsOn
366   groups:
367     OCS-fw_group:
368       type: org.openecomp.groups.heat.HeatStack
369       properties:
370         heat_file: ../Artifacts/OCS-fw.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_instance_1
375       - service_instance_2
376       - hsl_direct_net
377       - service_policy