push addional code
[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   ContrailComputeGlobalTypes:
6     file: ContrailComputeGlobalTypesServiceTemplate.yaml
7   CinderVolumeGlobalTypes:
8     file: CinderVolumeGlobalTypesServiceTemplate.yaml
9   ContrailVirtualNetworkGlobalType:
10     file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
11   AbstractSubstituteGlobalTypes:
12     file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
13   ContrailPortGlobalTypes:
14     file: ContrailPortGlobalTypesServiceTemplate.yaml
15   GlobalSubstitutionTypes:
16     file: GlobalSubstitutionTypesServiceTemplate.yaml
17   NeutronPortGlobalTypes:
18     file: NeutronPortGlobalTypesServiceTemplate.yaml
19   NeutronNetGlobalTypes:
20     file: NeutronNetGlobalTypesServiceTemplate.yaml
21   CommonGlobalTypes:
22     file: CommonGlobalTypesServiceTemplate.yaml
23   ContrailAbstractSubstituteGlobalTypes:
24     file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
25   ContrailNetworkRuleGlobalType:
26     file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
27   NeutronSecurityRulesGlobalTypes:
28     file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
29   NovaServerGlobalTypes:
30     file: NovaServerGlobalTypesServiceTemplate.yaml
31   ContrailV2VirtualMachineInterfaceGlobalType:
32     file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
33 topology_template:
34   inputs:
35     service_policy_name:
36       hidden: false
37       immutable: false
38       type: string
39       description: Policy Name
40     st_static_routes_list:
41       hidden: false
42       immutable: false
43       type: string
44       description: List of static routes enabled-disabled
45     st_type:
46       hidden: false
47       immutable: false
48       type: string
49       description: service type
50     st_service_interface_type_list:
51       hidden: false
52       immutable: false
53       type: string
54       description: List of interface types
55     st_mode:
56       hidden: false
57       immutable: false
58       type: string
59       description: service mode
60     Cricket_OCS_protected_net_id:
61       hidden: false
62       immutable: false
63       type: string
64       description: Name of Cricket OCS network
65     oam_mgmt_net_0_id:
66       hidden: false
67       immutable: false
68       type: string
69       description: Name of OAM network
70     start_dst_ports:
71       hidden: false
72       immutable: false
73       type: float
74       description: Start of dst port
75     st_flavor:
76       hidden: false
77       immutable: false
78       type: string
79       description: Flavor
80     availability_zone_1:
81       hidden: false
82       immutable: false
83       type: string
84       description: availability zone
85     service_instance_name:
86       hidden: false
87       immutable: false
88       type: string
89       description: Service instance name
90     st_scaling:
91       hidden: false
92       immutable: false
93       type: string
94       description: Indicates whether service scaling is enabled
95     max_num_fw_instances:
96       hidden: false
97       immutable: false
98       type: float
99       description: maximum number of firewall instances for scaling
100     start_src_ports:
101       hidden: false
102       immutable: false
103       type: float
104       description: Start of src port
105     service_policy_direction:
106       hidden: false
107       immutable: false
108       type: string
109       description: Direction of Policy
110     st_name:
111       hidden: false
112       immutable: false
113       type: string
114       description: Name of service template
115     HSL_direct_net_gateway:
116       hidden: false
117       immutable: false
118       type: string
119       description: HSL (Logging) network gateway address
120     st_image:
121       hidden: false
122       immutable: false
123       type: string
124       description: Name of the image
125     st_shared_ip_list:
126       hidden: false
127       immutable: false
128       type: string
129       description: List of shared ip enabled-disabled
130     prefix_0:
131       hidden: false
132       immutable: false
133       type: string
134     Cricket_OCS_direct_net_id:
135       hidden: false
136       immutable: false
137       type: string
138       description: Name of Cricket OCS network
139     oam_mgmt_net_1_id:
140       hidden: false
141       immutable: false
142       type: string
143       description: Name of OAM network
144     prefix_1:
145       hidden: false
146       immutable: false
147       type: string
148     end_src_ports:
149       hidden: false
150       immutable: false
151       type: float
152       description: End of src port
153     prefix_2:
154       hidden: false
155       immutable: false
156       type: string
157     end_dst_ports:
158       hidden: false
159       immutable: false
160       type: float
161       description: End of dst port
162     st_image_name:
163       hidden: false
164       immutable: false
165       type: string
166       description: Name of the image
167     HSL_direct_net_id:
168       hidden: false
169       immutable: false
170       type: string
171       description: Name of HSL (Logging) network
172     HSL_direct_net_cidr:
173       hidden: false
174       immutable: false
175       type: string
176       description: HSL (Logging) network address (CIDR notation)
177   node_templates:
178     service_instance_1:
179       type: org.openecomp.resource.abstract.nodes.heat.service_template
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
189         service_template_filter:
190           substitute_service_template: service_instance_1ServiceTemplate.yaml
191           count: 1
192           scaling_enabled:
193             get_input: st_scaling
194           mandatory: true
195         service_type:
196           get_input: st_type
197         static_routes_list:
198         - token:
199           - get_input: st_static_routes_list
200           - ','
201           - 0
202         - token:
203           - get_input: st_static_routes_list
204           - ','
205           - 1
206         - token:
207           - get_input: st_static_routes_list
208           - ','
209           - 2
210         - token:
211           - get_input: st_static_routes_list
212           - ','
213           - 3
214         service_template_name:
215           get_input: st_name
216         service_interface_type_list:
217         - token:
218           - management,left,right,other
219           - ','
220           - 0
221         - token:
222           - management,left,right,other
223           - ','
224           - 1
225         - token:
226           - management,left,right,other
227           - ','
228           - 2
229         - token:
230           - management,left,right,other
231           - ','
232           - 3
233         interface_list:
234         - virtual_network:
235             get_input: oam_mgmt_net_0_id
236         - virtual_network:
237             get_input: Cricket_OCS_direct_net_id
238         - virtual_network: hsl_direct_net1
239         - static_routes:
240           - prefix:
241               get_input: prefix_0
242           - prefix:
243               get_input: prefix_1
244           - prefix:
245               get_input: prefix_2
246           virtual_network:
247             get_input: oam_mgmt_net_1_id
248         service_instance_name:
249           get_input: service_instance_name
250         service_mode:
251           get_input: st_mode
252         shared_ip_list:
253         - token:
254           - get_input: st_shared_ip_list
255           - ','
256           - 0
257         - token:
258           - get_input: st_shared_ip_list
259           - ','
260           - 1
261         - token:
262           - get_input: st_shared_ip_list
263           - ','
264           - 2
265         - token:
266           - get_input: st_shared_ip_list
267           - ','
268           - 3
269       requirements:
270       - link_port_2:
271           capability: tosca.capabilities.network.Linkable
272           node: hsl_direct_net1
273           relationship: tosca.relationships.network.LinksTo
274       - dependency:
275           capability: tosca.capabilities.Node
276           node: hsl_direct_net1
277           relationship: tosca.relationships.DependsOn
278     service_instance_2:
279       type: org.openecomp.resource.abstract.nodes.heat.service_template
280       directives:
281       - substitutable
282       properties:
283         flavor:
284           get_input: st_flavor
285         availability_zone:
286           get_input: availability_zone_1
287         image_name:
288           get_input: st_image
289         service_template_filter:
290           substitute_service_template: service_instance_2ServiceTemplate.yaml
291           count:
292             get_input: max_num_fw_instances
293           scaling_enabled:
294             get_input: st_scaling
295           mandatory: false
296         service_type:
297           get_input: st_type
298         static_routes_list:
299         - token:
300           - get_input: st_static_routes_list
301           - ','
302           - 0
303         - token:
304           - get_input: st_static_routes_list
305           - ','
306           - 1
307         - token:
308           - get_input: st_static_routes_list
309           - ','
310           - 2
311         - token:
312           - get_input: st_static_routes_list
313           - ','
314           - 3
315         service_template_name:
316           get_input: st_name
317         service_interface_type_list:
318         - token:
319           - management,left,right,other
320           - ','
321           - 0
322         - token:
323           - management,left,right,other
324           - ','
325           - 1
326         - token:
327           - management,left,right,other
328           - ','
329           - 2
330         - token:
331           - management,left,right,other
332           - ','
333           - 3
334         interface_list:
335         - virtual_network:
336             get_input: oam_mgmt_net_0_id
337         - virtual_network:
338             get_input: Cricket_OCS_direct_net_id
339         - virtual_network: hsl_direct_net2
340         - static_routes:
341           - prefix:
342               get_input: prefix_0
343           - prefix:
344               get_input: prefix_1
345           - prefix:
346               get_input: prefix_2
347           virtual_network:
348             get_input: oam_mgmt_net_1_id
349         service_instance_name:
350           get_input: service_instance_name
351         service_mode:
352           get_input: st_mode
353         shared_ip_list:
354         - token:
355           - get_input: st_shared_ip_list
356           - ','
357           - 0
358         - token:
359           - get_input: st_shared_ip_list
360           - ','
361           - 1
362         - token:
363           - get_input: st_shared_ip_list
364           - ','
365           - 2
366         - token:
367           - get_input: st_shared_ip_list
368           - ','
369           - 3
370       requirements:
371       - link_port_2:
372           capability: tosca.capabilities.network.Linkable
373           node: hsl_direct_net2
374           relationship: tosca.relationships.network.LinksTo
375       - dependency:
376           capability: tosca.capabilities.Node
377           node: hsl_direct_net1
378           relationship: tosca.relationships.DependsOn
379     hsl_direct_net1:
380       type: org.openecomp.resource.vl.nodes.heat.network.contrail.VirtualNetwork
381       properties:
382         network_name:
383           get_input: HSL_direct_net_id
384         subnets:
385           hsl_ip_subnet:
386             cidr:
387               get_input: HSL_direct_net_cidr
388             gateway_ip:
389               get_input: HSL_direct_net_gateway
390     hsl_direct_net2:
391       type: org.openecomp.resource.vl.nodes.heat.network.contrail.VirtualNetwork
392       properties:
393         network_name:
394           get_input: HSL_direct_net_id
395     service_policy:
396       type: org.openecomp.resource.vfc.rules.nodes.heat.network.contrail.NetworkRules
397       properties:
398         entries:
399           policy_rule:
400           - src_ports:
401             - start_port:
402                 get_input: start_src_ports
403               end_port:
404                 get_input: end_src_ports
405             protocol: any
406             action_list:
407               apply_service:
408               - service_instance_1
409             dst_addresses:
410             - virtual_network:
411                 get_input: Cricket_OCS_direct_net_id
412             dst_ports:
413             - start_port:
414                 get_input: start_dst_ports
415               end_port:
416                 get_input: end_dst_ports
417             src_addresses:
418             - virtual_network:
419                 get_input: Cricket_OCS_protected_net_id
420             direction:
421               get_input: service_policy_direction
422         name:
423           get_input: service_policy_name
424       requirements:
425       - dependency:
426           capability: tosca.capabilities.Node
427           node: service_instance_1
428           relationship: tosca.relationships.DependsOn
429   groups:
430     OCS-fw:
431       type: org.openecomp.groups.heat.HeatStack
432       properties:
433         heat_file: ../Artifacts/OCS-fw.yml
434         description: |
435           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.
436       members:
437       - service_instance_1
438       - service_instance_2
439       - hsl_direct_net1
440       - hsl_direct_net2
441       - service_policy