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 / service_instanceServiceTemplate.yaml
1 tosca_definitions_version: tosca_simple_yaml_1_0_0
2 metadata:
3   template_name: service_instance
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     availability_zone:
36       hidden: false
37       immutable: false
38       type: string
39       description: Availability zone to create servers in
40       required: false
41       status: SUPPORTED
42     static_routes_list:
43       hidden: false
44       immutable: false
45       type: list
46       description: Static routes enabled
47       required: false
48       status: SUPPORTED
49       entry_schema:
50         type: boolean
51     availability_zone_enable:
52       hidden: false
53       immutable: false
54       type: boolean
55       description: Indicates availability zone is enabled
56       required: false
57       default: false
58       status: SUPPORTED
59     service_template_name:
60       hidden: false
61       immutable: false
62       type: string
63       description: Service template name
64       required: false
65       status: SUPPORTED
66     ordered_interfaces:
67       hidden: false
68       immutable: false
69       type: boolean
70       description: Indicates if service interface are ordered
71       required: false
72       default: false
73       status: SUPPORTED
74     flavor:
75       hidden: false
76       immutable: false
77       type: string
78       description: flavor
79       required: false
80       status: SUPPORTED
81     image_name:
82       hidden: false
83       immutable: false
84       type: string
85       description: Image name
86       required: true
87       status: SUPPORTED
88     service_type:
89       hidden: false
90       immutable: false
91       type: string
92       description: Service type
93       required: true
94       status: SUPPORTED
95       constraints:
96       - valid_values:
97         - firewall
98         - analyzer
99         - source-nat
100         - loadbalancer
101     service_interface_type_list:
102       hidden: false
103       immutable: false
104       type: list
105       description: List of interface types
106       required: true
107       status: SUPPORTED
108       entry_schema:
109         type: string
110         constraints:
111         - valid_values:
112           - management
113           - left
114           - right
115           - other
116     service_instance_name:
117       hidden: false
118       immutable: false
119       type: string
120       description: Service instance name
121       required: true
122       status: SUPPORTED
123     interface_list:
124       hidden: false
125       immutable: false
126       type: list
127       description: List of interfaces
128       required: false
129       status: SUPPORTED
130       entry_schema:
131         type: org.openecomp.datatypes.heat.network.contrail.InterfaceData
132     service_mode:
133       hidden: false
134       immutable: false
135       type: string
136       description: Service mode
137       required: true
138       status: SUPPORTED
139       constraints:
140       - valid_values:
141         - transparent
142         - in-network
143         - in-network-nat
144     shared_ip_list:
145       hidden: false
146       immutable: false
147       type: list
148       description: Shared ips enabled
149       required: false
150       status: SUPPORTED
151       entry_schema:
152         type: boolean
153   node_templates:
154     port_0:
155       type: org.openecomp.resource.cp.nodes.heat.network.contrail.Port
156       properties:
157         static_routes:
158           get_input:
159           - interface_list
160           - 0
161           - static_routes
162         virtual_network:
163           get_input:
164           - interface_list
165           - 0
166           - virtual_network
167         static_route:
168           get_input:
169           - static_routes_list
170           - 0
171         allowed_address_pairs:
172           get_input:
173           - interface_list
174           - 0
175           - allowed_address_pairs
176         shared_ip:
177           get_input:
178           - shared_ip_list
179           - 0
180         ip_address:
181           get_input:
182           - interface_list
183           - 0
184           - ip_address
185         interface_type:
186           get_input:
187           - service_interface_type_list
188           - 0
189         order: 0
190       requirements:
191       - binding:
192           capability: tosca.capabilities.network.Bindable
193           node: service_instance
194           relationship: tosca.relationships.network.BindsTo
195     port_1:
196       type: org.openecomp.resource.cp.nodes.heat.network.contrail.Port
197       properties:
198         static_routes:
199           get_input:
200           - interface_list
201           - 1
202           - static_routes
203         virtual_network:
204           get_input:
205           - interface_list
206           - 1
207           - virtual_network
208         static_route:
209           get_input:
210           - static_routes_list
211           - 1
212         allowed_address_pairs:
213           get_input:
214           - interface_list
215           - 1
216           - allowed_address_pairs
217         shared_ip:
218           get_input:
219           - shared_ip_list
220           - 1
221         ip_address:
222           get_input:
223           - interface_list
224           - 1
225           - ip_address
226         interface_type:
227           get_input:
228           - service_interface_type_list
229           - 1
230         order: 1
231       requirements:
232       - binding:
233           capability: tosca.capabilities.network.Bindable
234           node: service_instance
235           relationship: tosca.relationships.network.BindsTo
236     port_2:
237       type: org.openecomp.resource.cp.nodes.heat.network.contrail.Port
238       properties:
239         static_routes:
240           get_input:
241           - interface_list
242           - 2
243           - static_routes
244         virtual_network:
245           get_input:
246           - interface_list
247           - 2
248           - virtual_network
249         static_route:
250           get_input:
251           - static_routes_list
252           - 2
253         allowed_address_pairs:
254           get_input:
255           - interface_list
256           - 2
257           - allowed_address_pairs
258         shared_ip:
259           get_input:
260           - shared_ip_list
261           - 2
262         ip_address:
263           get_input:
264           - interface_list
265           - 2
266           - ip_address
267         interface_type:
268           get_input:
269           - service_interface_type_list
270           - 2
271         order: 2
272       requirements:
273       - binding:
274           capability: tosca.capabilities.network.Bindable
275           node: service_instance
276           relationship: tosca.relationships.network.BindsTo
277     port_3:
278       type: org.openecomp.resource.cp.nodes.heat.network.contrail.Port
279       properties:
280         static_routes:
281           get_input:
282           - interface_list
283           - 3
284           - static_routes
285         virtual_network:
286           get_input:
287           - interface_list
288           - 3
289           - virtual_network
290         static_route:
291           get_input:
292           - static_routes_list
293           - 3
294         allowed_address_pairs:
295           get_input:
296           - interface_list
297           - 3
298           - allowed_address_pairs
299         shared_ip:
300           get_input:
301           - shared_ip_list
302           - 3
303         ip_address:
304           get_input:
305           - interface_list
306           - 3
307           - ip_address
308         interface_type:
309           get_input:
310           - service_interface_type_list
311           - 3
312         order: 3
313       requirements:
314       - binding:
315           capability: tosca.capabilities.network.Bindable
316           node: service_instance
317           relationship: tosca.relationships.network.BindsTo
318     service_instance:
319       type: org.openecomp.resource.vfc.nodes.heat.compute_service_template
320       properties:
321         flavor:
322           get_input: flavor
323         image_name:
324           get_input: image_name
325         availability_zone:
326           get_input: availability_zone
327         service_type:
328           get_input: service_type
329         availability_zone_enable:
330           get_input: availability_zone_enable
331         service_template_name:
332           get_input: service_template_name
333         service_instance_name:
334           get_input: service_instance_name
335         service_mode:
336           get_input: service_mode
337   groups:
338     service_instance:
339       type: org.openecomp.groups.heat.HeatStack
340       properties:
341         heat_file: ../Artifacts/lcp1_mss.oam-fw_si.yaml
342       members:
343       - service_instance
344       - port_0
345       - port_1
346       - port_2
347       - port_3
348   outputs:
349     tenant_id:
350       description: Tenant id of the Service Instance
351       value:
352         get_attribute:
353         - service_instance
354         - tenant_id
355     fq_name:
356       description: The FQ name of the service instance
357       value:
358         get_attribute:
359         - service_instance
360         - fq_name
361     service_template_name:
362       description: Service Template of the Service Instance
363       value:
364         get_attribute:
365         - service_instance
366         - service_template_name
367     show:
368       description: All attributes
369       value:
370         get_attribute:
371         - service_instance
372         - show
373     active_vms:
374       description: Number of service VMs active for this Service Instance
375       value:
376         get_attribute:
377         - service_instance
378         - active_vms
379     service_instance_name:
380       description: The name of the service instance
381       value:
382         get_attribute:
383         - service_instance
384         - service_instance_name
385     virtual_machines:
386       description: Service VMs for the Service Instance
387       value:
388         get_attribute:
389         - service_instance
390         - virtual_machines
391     status:
392       description: Status of the service instance
393       value:
394         get_attribute:
395         - service_instance
396         - status
397   substitution_mappings:
398     node_type: org.openecomp.resource.abstract.nodes.heat.service_template
399     requirements:
400       link_port_0:
401       - port_0
402       - link
403       link_port_1:
404       - port_1
405       - link
406       link_port_2:
407       - port_2
408       - link
409       link_port_3:
410       - port_3
411       - link