push addional code
[sdc.git] / openecomp-be / lib / openecomp-sdc-translator-lib / openecomp-sdc-translator-core / src / test / resources / mock / services / heattotosca / contrail2serviceinstance / oneServiceInstance / 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     protected_net:
36       hidden: false
37       immutable: false
38       type: string
39     service_policy_name:
40       hidden: false
41       immutable: false
42       type: string
43       description: Policy Name
44       default: MNS-25180-L-02Shared_policy_direct_fw_protected_oam_1
45     oam_direct_net_id:
46       hidden: false
47       immutable: false
48       type: string
49       description: Name of private network to be created
50     st_static_routes_list:
51       hidden: false
52       immutable: false
53       type: string
54       description: List of static routes enabled-disabled
55       default: True,True,True,True
56     st_type:
57       hidden: false
58       immutable: false
59       type: string
60       description: service type
61       default: firewall
62     st_service_interface_type_list:
63       hidden: false
64       immutable: false
65       type: string
66       description: List of interface types
67       default: management,left,right,other
68     oam_protected_net_id:
69       hidden: false
70       immutable: false
71       type: string
72       description: Name of private network to be created
73     st_mode:
74       hidden: false
75       immutable: false
76       type: string
77       description: service mode
78       default: in-network-nat
79     static_prefix_3_1:
80       hidden: false
81       immutable: false
82       type: string
83       description: prefix for static route
84       default: 107.239.80.0/21
85     oam_hsl_net_id:
86       hidden: false
87       immutable: false
88       type: string
89       description: Name of private network to be created
90     start_dst_ports:
91       hidden: false
92       immutable: false
93       type: float
94       description: Start of dst port
95       default: -1
96     st_flavor:
97       hidden: false
98       immutable: false
99       type: string
100       description: Flavor
101       default: lc.medium
102     st_scaling:
103       hidden: false
104       immutable: false
105       type: string
106       description: Indicates whether service scaling is enabled
107       default: 'True'
108     service_instance_name:
109       hidden: false
110       immutable: false
111       type: string
112       description: service instance name
113     max_num_fw_instances:
114       hidden: false
115       immutable: false
116       type: float
117       description: maximum number of firewall instances for scaling
118       default: 8
119     start_src_ports:
120       hidden: false
121       immutable: false
122       type: float
123       description: Start of src port
124       default: -1
125     availability_zone:
126       hidden: false
127       immutable: false
128       type: string
129       description: availability zone in form of Zone:Host
130     service_policy_direction:
131       hidden: false
132       immutable: false
133       type: string
134       description: Direction of Policy
135       default: <>
136     st_name:
137       hidden: false
138       immutable: false
139       type: string
140       description: service template name or ID
141       default: MNS-25180-L-02Shared_oam_fw_template_1
142     st_availability_zone_enable_flag:
143       hidden: false
144       immutable: false
145       type: string
146       description: service template availablity_zone feature enable flag
147       default: 'True'
148     st_image:
149       hidden: false
150       immutable: false
151       type: string
152       description: Name of the image
153       default: NIMBUS_SRX_151X49-D303
154     st_shared_ip_list:
155       hidden: false
156       immutable: false
157       type: string
158       description: List of shared ip enabled-disabled
159       default: False,True,False,False
160     oam_mgmt_net_id:
161       hidden: false
162       immutable: false
163       type: string
164       description: Name of private network to be created
165     end_src_ports:
166       hidden: false
167       immutable: false
168       type: float
169       description: End of src port
170       default: -1
171     end_dst_ports:
172       hidden: false
173       immutable: false
174       type: float
175       description: End of dst port
176       default: -1
177   node_templates:
178     service_instance:
179       type: org.openecomp.resource.abstract.nodes.heat.service_template
180       directives:
181       - substitutable
182       properties:
183         availability_zone:
184           get_input: availability_zone
185         static_routes_list:
186         - token:
187           - false;false;false;false
188           - ;
189           - 0
190         - token:
191           - false;false;false;false
192           - ;
193           - 1
194         - token:
195           - false;false;false;false
196           - ;
197           - 2
198         - token:
199           - false;false;false;false
200           - ;
201           - 3
202         availability_zone_enable:
203           get_input: st_availability_zone_enable_flag
204         service_template_name:
205           get_input: st_name
206         ordered_interfaces: true
207         flavor:
208           get_input: st_flavor
209         image_name:
210           get_input: st_image
211         service_template_filter:
212           substitute_service_template: service_instanceServiceTemplate.yaml
213           count: 5
214           scaling_enabled:
215             get_input: st_scaling
216           mandatory: true
217         service_type:
218           get_input: st_type
219         service_interface_type_list:
220         - token:
221           - get_input: st_service_interface_type_list
222           - ','
223           - 0
224         - token:
225           - get_input: st_service_interface_type_list
226           - ','
227           - 1
228         - token:
229           - get_input: st_service_interface_type_list
230           - ','
231           - 2
232         - token:
233           - get_input: st_service_interface_type_list
234           - ','
235           - 3
236         interface_list:
237         - virtual_network:
238             get_input: oam_mgmt_net_id
239         - virtual_network:
240             get_input: oam_protected_net_id
241         - static_routes:
242           - prefix:
243               get_input: static_prefix_3_1
244           virtual_network:
245             get_input: oam_direct_net_id
246         - virtual_network:
247             get_input: oam_hsl_net_id
248         service_instance_name:
249           get_input: service_instance_name
250         service_mode:
251           get_input: st_mode
252         shared_ip_list:
253         - true
254         - true
255         - false
256         - false
257     service_policy:
258       type: org.openecomp.resource.vfc.rules.nodes.heat.network.contrail.NetworkRules
259       properties:
260         entries:
261           policy_rule:
262           - src_ports:
263             - start_port:
264                 get_input: start_src_ports
265               end_port:
266                 get_input: end_src_ports
267             protocol: any
268             action_list:
269               apply_service:
270               - service_instance
271             dst_addresses:
272             - virtual_network:
273                 get_input: oam_direct_net_id
274             dst_ports:
275             - start_port:
276                 get_input: start_dst_ports
277               end_port:
278                 get_input: end_dst_ports
279             src_addresses:
280             - virtual_network:
281                 get_input: protected_net
282             direction:
283               get_input: service_policy_direction
284         name:
285           get_input: service_policy_name
286       requirements:
287       - dependency:
288           capability: tosca.capabilities.Node
289           node: service_instance
290           relationship: tosca.relationships.DependsOn
291   groups:
292     lcp1_mss.oam-fw_si:
293       type: org.openecomp.groups.heat.HeatStack
294       properties:
295         heat_file: ../Artifacts/lcp1_mss.oam-fw_si.yaml
296         description: |
297           Version 2.0 10-14-2015 (Authors: Art Mishurov,am254u & Johhny Chen, jc3066) - HOT-OAM-FW-SI template that creates two OAM networks (direct and protected) with a scaled out firewall service between the two.
298       members:
299       - service_instance
300       - service_policy