push addional code
[sdc.git] / openecomp-be / lib / openecomp-sdc-translator-lib / openecomp-sdc-translator-core / src / test / resources / mock / services / heattotosca / contrail2serviceinstance / sharedNetworkNested / expectedoutputfiles / OCS-fwServiceTemplate.yaml
1 tosca_definitions_version: tosca_simple_yaml_1_0_0
2 metadata:
3   template_name: OCS-fw
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_net3:
116       hidden: false
117       immutable: false
118       type: string
119     hsl_direct_net4:
120       hidden: false
121       immutable: false
122       type: string
123     HSL_direct_net_gateway:
124       hidden: false
125       immutable: false
126       type: string
127       description: HSL (Logging) network gateway address
128     hsl_direct_net1:
129       hidden: false
130       immutable: false
131       type: string
132     hsl_direct_net2:
133       hidden: false
134       immutable: false
135       type: string
136     st_image:
137       hidden: false
138       immutable: false
139       type: string
140       description: Name of the image
141     st_shared_ip_list:
142       hidden: false
143       immutable: false
144       type: string
145       description: List of shared ip enabled-disabled
146     Cricket_OCS_direct_net_id:
147       hidden: false
148       immutable: false
149       type: string
150       description: Name of Cricket OCS network
151     network_param:
152       hidden: false
153       immutable: false
154       type: string
155     end_src_ports:
156       hidden: false
157       immutable: false
158       type: float
159       description: End of src port
160     end_dst_ports:
161       hidden: false
162       immutable: false
163       type: float
164       description: End of dst port
165     HSL_direct_net_id:
166       hidden: false
167       immutable: false
168       type: string
169       description: Name of HSL (Logging) network
170     HSL_direct_net_cidr:
171       hidden: false
172       immutable: false
173       type: string
174       description: HSL (Logging) network address (CIDR notation)
175   node_templates:
176     hsl_direct_net:
177       type: org.openecomp.resource.vl.nodes.heat.network.contrail.VirtualNetwork
178       properties:
179         network_name:
180           get_input: HSL_direct_net_id
181         subnets:
182           hsl_ip_subnet:
183             cidr:
184               get_input: HSL_direct_net_cidr
185             gateway_ip:
186               get_input: HSL_direct_net_gateway
187     service_instance:
188       type: org.openecomp.resource.abstract.nodes.heat.service_template
189       directives:
190       - substitutable
191       properties:
192         flavor:
193           get_input: st_flavor
194         availability_zone:
195           get_input: availability_zone_1
196         image_name:
197           get_input: st_image
198         service_template_filter:
199           substitute_service_template: service_instanceServiceTemplate.yaml
200           count:
201             get_input: max_num_fw_instances
202           mandatory: false
203         service_type:
204           get_input: st_type
205         static_routes_list:
206         - token:
207           - get_input: st_static_routes_list
208           - ','
209           - 0
210         service_template_name:
211           get_input: st_name
212         service_interface_type_list:
213         - token:
214           - get_input: st_service_interface_type_list
215           - ','
216           - 0
217         interface_list:
218         - virtual_network:
219             get_input: network_param
220         service_instance_name:
221           get_input: service_instance_name
222         service_mode:
223           get_input: st_mode
224         shared_ip_list:
225         - token:
226           - get_input: st_shared_ip_list
227           - ','
228           - 0
229       requirements:
230       - dependency:
231           capability: tosca.capabilities.Node
232           node: hsl_direct_net
233           relationship: tosca.relationships.DependsOn
234     service_policy:
235       type: org.openecomp.resource.vfc.rules.nodes.heat.network.contrail.NetworkRules
236       properties:
237         entries:
238           policy_rule:
239           - src_ports:
240             - start_port:
241                 get_input: start_src_ports
242               end_port:
243                 get_input: end_src_ports
244             protocol: any
245             action_list:
246               apply_service:
247               - service_instance
248             dst_addresses:
249             - virtual_network:
250                 get_input: Cricket_OCS_direct_net_id
251             dst_ports:
252             - start_port:
253                 get_input: start_dst_ports
254               end_port:
255                 get_input: end_dst_ports
256             src_addresses:
257             - virtual_network:
258                 get_input: Cricket_OCS_protected_net_id
259             direction:
260               get_input: service_policy_direction
261         name:
262           get_input: service_policy_name
263       requirements:
264       - dependency:
265           capability: tosca.capabilities.Node
266           node: service_instance
267           relationship: tosca.relationships.DependsOn
268   groups:
269     OCS-fw:
270       type: org.openecomp.groups.heat.HeatStack
271       properties:
272         heat_file: ../Artifacts/OCS-fw.yml
273         description: |
274           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.
275       members:
276       - hsl_direct_net
277       - service_instance
278       - service_policy
279   substitution_mappings:
280     node_type: org.openecomp.resource.abstract.nodes.heat.OCS-fw
281     capabilities:
282       link_hsl_direct_net:
283       - hsl_direct_net
284       - link
285       attachment_hsl_direct_net:
286       - hsl_direct_net
287       - attachment
288     requirements:
289       network_service_policy:
290       - service_policy
291       - network
292       link_port_0_service_instance:
293       - service_instance
294       - link_port_0