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