Nested Dependency issues
[sdc.git] / openecomp-be / lib / openecomp-sdc-translator-lib / openecomp-sdc-translator-core / src / test / resources / mock / services / heattotosca / subInterfaceToInterfaceConnection / inoutattr / expectedoutputfiles / MainServiceTemplate.yaml
1 tosca_definitions_version: tosca_simple_yaml_1_0_0
2 metadata:
3   template_name: Main
4 imports:
5 - openecomp_heat_index:
6     file: openecomp-heat/_index.yml
7 - GlobalSubstitutionTypes:
8     file: GlobalSubstitutionTypesServiceTemplate.yaml
9 node_types:
10   org.openecomp.resource.vfc.nodes.heat.vdbe:
11     derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
12 topology_template:
13   inputs:
14     vf_module_id:
15       hidden: false
16       immutable: false
17       annotations:
18         source:
19           type: org.openecomp.annotations.Source
20           properties:
21             vf_module_label:
22             - main
23             source_type: HEAT
24             param_name: vf_module_id
25       type: string
26       description: Unique ID for this VF module inst
27     control_int_net_rpf:
28       hidden: false
29       immutable: false
30       annotations:
31         source:
32           type: org.openecomp.annotations.Source
33           properties:
34             vf_module_label:
35             - main
36             source_type: HEAT
37             param_name: control_int_net_rpf
38       type: string
39       description: Reverse Path Filtering enable or disable for the control virtual network
40     control_int_net_forwarding_mode:
41       hidden: false
42       immutable: false
43       annotations:
44         source:
45           type: org.openecomp.annotations.Source
46           properties:
47             vf_module_label:
48             - main
49             source_type: HEAT
50             param_name: control_int_net_forwarding_mode
51       type: string
52       description: forwarding mode of the control virtual network
53     vnf_name:
54       hidden: false
55       immutable: false
56       annotations:
57         source:
58           type: org.openecomp.annotations.Source
59           properties:
60             vf_module_label:
61             - main
62             source_type: HEAT
63             param_name: vnf_name
64       type: string
65       description: Unique name for this VF instance
66     vdbe_untrusted_ip_1:
67       hidden: false
68       immutable: false
69       annotations:
70         source:
71           type: org.openecomp.annotations.Source
72           properties:
73             vf_module_label:
74             - main
75             source_type: HEAT
76             param_name: vdbe_untrusted_ip_1
77       type: string
78       description: IPV4 address of the secondary vDBE VM on the VAN untrusted network
79     vdbe_aap_untrusted_ip_prefix_len:
80       hidden: false
81       immutable: false
82       annotations:
83         source:
84           type: org.openecomp.annotations.Source
85           properties:
86             vf_module_label:
87             - main
88             source_type: HEAT
89             param_name: vdbe_aap_untrusted_ip_prefix_len
90       type: string
91       description: ip prefix length for the primary vDBE VM on the VAN untrusted network
92     untrusted_num_vn:
93       hidden: false
94       immutable: false
95       annotations:
96         source:
97           type: org.openecomp.annotations.Source
98           properties:
99             vf_module_label:
100             - main
101             source_type: HEAT
102             param_name: untrusted_num_vn
103       type: float
104       description: Number of vDBE subinterface virtual Networks
105       constraints:
106       - in_range:
107         - 1
108         - 77
109     aap_address_mode:
110       hidden: false
111       immutable: false
112       annotations:
113         source:
114           type: org.openecomp.annotations.Source
115           properties:
116             vf_module_label:
117             - main
118             source_type: HEAT
119             param_name: aap_address_mode
120       type: string
121       description: Address mode for the vDBE cluster IP
122     control_int_net_shared:
123       hidden: false
124       immutable: false
125       annotations:
126         source:
127           type: org.openecomp.annotations.Source
128           properties:
129             vf_module_label:
130             - main
131             source_type: HEAT
132             param_name: control_int_net_shared
133       type: boolean
134       description: control virtual network shared
135     vdbe_untrusted_v6_ip_1:
136       hidden: false
137       immutable: false
138       annotations:
139         source:
140           type: org.openecomp.annotations.Source
141           properties:
142             vf_module_label:
143             - main
144             source_type: HEAT
145             param_name: vdbe_untrusted_v6_ip_1
146       type: string
147       description: IPV6 address of the secondary vDBE VM on the VAN untrusted network
148     vdbe_untrusted_vmac_address:
149       hidden: false
150       immutable: false
151       annotations:
152         source:
153           type: org.openecomp.annotations.Source
154           properties:
155             vf_module_label:
156             - main
157             source_type: HEAT
158             param_name: vdbe_untrusted_vmac_address
159       type: string
160       description: Virtual MAC of the primary vDBE VM on the VAN untrusted network
161     control_int_net_flood_unknown_unicast:
162       hidden: false
163       immutable: false
164       annotations:
165         source:
166           type: org.openecomp.annotations.Source
167           properties:
168             vf_module_label:
169             - main
170             source_type: HEAT
171             param_name: control_int_net_flood_unknown_unicast
172       type: boolean
173       description: forwarding mode of the control virtual network
174     vdbe_aap_sec_untrusted_ip_prefix:
175       hidden: false
176       immutable: false
177       annotations:
178         source:
179           type: org.openecomp.annotations.Source
180           properties:
181             vf_module_label:
182             - main
183             source_type: HEAT
184             param_name: vdbe_aap_sec_untrusted_ip_prefix
185       type: string
186       description: ip prefix for secondary vDBE VM aap on the VAN untrusted network
187     vnf_id:
188       hidden: false
189       immutable: false
190       annotations:
191         source:
192           type: org.openecomp.annotations.Source
193           properties:
194             vf_module_label:
195             - main
196             source_type: HEAT
197             param_name: vnf_id
198       type: string
199       description: Unique ID for this VF inst
200     vdbe_name_1:
201       hidden: false
202       immutable: false
203       annotations:
204         source:
205           type: org.openecomp.annotations.Source
206           properties:
207             vf_module_label:
208             - main
209             source_type: HEAT
210             param_name: vdbe_name_1
211       type: string
212       description: VM Name for this vdbe node 1
213     availability_zone_1:
214       hidden: false
215       immutable: false
216       annotations:
217         source:
218           type: org.openecomp.annotations.Source
219           properties:
220             vf_module_label:
221             - main
222             source_type: HEAT
223             param_name: availability_zone_1
224       type: string
225       description: The availability zone of secondary node1 vDBE vm in the local HA pair.
226     untrusted_vn_networks:
227       hidden: false
228       immutable: false
229       annotations:
230         source:
231           type: org.openecomp.annotations.Source
232           properties:
233             vf_module_label:
234             - main
235             source_type: HEAT
236             param_name: untrusted_vn_networks
237       type: list
238       description: List of subinterface virtual networks
239       entry_schema:
240         type: string
241     vdbe_image_name:
242       hidden: false
243       immutable: false
244       annotations:
245         source:
246           type: org.openecomp.annotations.Source
247           properties:
248             vf_module_label:
249             - main
250             source_type: HEAT
251             param_name: vdbe_image_name
252       type: string
253       description: Image to use for vDBE
254     oam_net_name:
255       hidden: false
256       immutable: false
257       annotations:
258         source:
259           type: org.openecomp.annotations.Source
260           properties:
261             vf_module_label:
262             - main
263             source_type: HEAT
264             param_name: oam_net_name
265       type: string
266       description: Name of NSDNet network from which the management IP addresses will be allocated
267     vdbe_aap_sec_untrusted_ip_prefix_len:
268       hidden: false
269       immutable: false
270       annotations:
271         source:
272           type: org.openecomp.annotations.Source
273           properties:
274             vf_module_label:
275             - main
276             source_type: HEAT
277             param_name: vdbe_aap_sec_untrusted_ip_prefix_len
278       type: string
279       description: ip prefix length for the secondary DBE VM aap on the VAN untrusted network
280     vdbe_aap_untrusted_v6_ip_prefix:
281       hidden: false
282       immutable: false
283       annotations:
284         source:
285           type: org.openecomp.annotations.Source
286           properties:
287             vf_module_label:
288             - main
289             source_type: HEAT
290             param_name: vdbe_aap_untrusted_v6_ip_prefix
291       type: string
292       description: ipv6 prefix for the primary vDBE VM on the VAN untrusted network
293     vdbe_aap_untrusted_v6_ip_prefix_len:
294       hidden: false
295       immutable: false
296       annotations:
297         source:
298           type: org.openecomp.annotations.Source
299           properties:
300             vf_module_label:
301             - main
302             source_type: HEAT
303             param_name: vdbe_aap_untrusted_v6_ip_prefix_len
304       type: string
305       description: ipv6 prefix length for the primary vDBE VM on the VAN untrusted network
306     untrusted_vlan_tags:
307       hidden: false
308       immutable: false
309       annotations:
310         source:
311           type: org.openecomp.annotations.Source
312           properties:
313             vf_module_label:
314             - main
315             source_type: HEAT
316             param_name: untrusted_vlan_tags
317       type: list
318       description: List of subinterface vlan tags
319       entry_schema:
320         type: string
321     vdbe_flavor_name:
322       hidden: false
323       immutable: false
324       annotations:
325         source:
326           type: org.openecomp.annotations.Source
327           properties:
328             vf_module_label:
329             - main
330             source_type: HEAT
331             param_name: vdbe_flavor_name
332       type: string
333       description: Flavor to use for vDBE
334     vdbe_hw_untr_mac_1:
335       hidden: false
336       immutable: false
337       annotations:
338         source:
339           type: org.openecomp.annotations.Source
340           properties:
341             vf_module_label:
342             - main
343             source_type: HEAT
344             param_name: vdbe_hw_untr_mac_1
345       type: string
346       description: Secondary MAC address of the secondary vDBE VM on the VAN untrusted network
347     untrusted_net_name:
348       hidden: false
349       immutable: false
350       annotations:
351         source:
352           type: org.openecomp.annotations.Source
353           properties:
354             vf_module_label:
355             - main
356             source_type: HEAT
357             param_name: untrusted_net_name
358       type: string
359       description: Name of public untrusted network into which this vDBE HA cluster is deployed
360     vdbe_device_name:
361       hidden: false
362       immutable: false
363       annotations:
364         source:
365           type: org.openecomp.annotations.Source
366           properties:
367             vf_module_label:
368             - main
369             source_type: HEAT
370             param_name: vdbe_device_name
371       type: string
372       description: VDBE device Name for this vdbe VNF
373     vdbe_aap_untrusted_ip_prefix:
374       hidden: false
375       immutable: false
376       annotations:
377         source:
378           type: org.openecomp.annotations.Source
379           properties:
380             vf_module_label:
381             - main
382             source_type: HEAT
383             param_name: vdbe_aap_untrusted_ip_prefix
384       type: string
385       description: ip prefix for primary vDBE VM on the VAN untrusted network
386   node_templates:
387     vdbe_node_1:
388       type: org.openecomp.resource.vfc.nodes.heat.vdbe
389       properties:
390         flavor:
391           get_input: vdbe_flavor_name
392         availability_zone:
393           get_input: availability_zone_1
394         image:
395           get_input: vdbe_image_name
396         metadata:
397           vf_module_id:
398             get_input: vf_module_id
399           vnf_id:
400             get_input: vnf_id
401           vnf_name:
402             get_input: vnf_name
403         name:
404           get_input: vdbe_name_1
405     vdbe_untr_vmi:
406       type: org.openecomp.resource.cp.nodes.heat.contrailV2.VirtualMachineInterface
407       properties:
408         name:
409           str_replace:
410             template: VM_NAMEDBE001p1n004
411             params:
412               DBE:
413                 get_input: vdbe_device_name
414               VM_NAME:
415                 get_input: vdbe_name_1
416         virtual_network_refs:
417         - get_input: untrusted_net_name
418         virtual_machine_interface_allowed_address_pairs:
419           allowed_address_pair:
420           - address_mode:
421               get_input: aap_address_mode
422             ip:
423               ip_prefix:
424                 get_input: vdbe_aap_untrusted_ip_prefix
425               ip_prefix_len:
426                 get_input: vdbe_aap_untrusted_ip_prefix_len
427             mac:
428               get_input: vdbe_untrusted_vmac_address
429           - address_mode:
430               get_input: aap_address_mode
431             ip:
432               ip_prefix:
433                 get_input: vdbe_aap_sec_untrusted_ip_prefix
434               ip_prefix_len:
435                 get_input: vdbe_aap_sec_untrusted_ip_prefix_len
436             mac:
437               get_input: vdbe_hw_untr_mac_1
438           - address_mode:
439               get_input: aap_address_mode
440             ip:
441               ip_prefix:
442                 get_input: vdbe_aap_untrusted_v6_ip_prefix
443               ip_prefix_len:
444                 get_input: vdbe_aap_untrusted_v6_ip_prefix_len
445             mac:
446               get_input: vdbe_untrusted_vmac_address
447         virtual_machine_interface_mac_addresses:
448         - get_input: vdbe_hw_untr_mac_1
449       requirements:
450       - binding:
451           capability: tosca.capabilities.network.Bindable
452           node: vdbe_node_1
453           relationship: tosca.relationships.network.BindsTo
454     vdbe_untr_1_subports:
455       type: org.openecomp.resource.abstract.nodes.heat.subinterface.nested
456       directives:
457       - substitutable
458       properties:
459         aap_untrusted_ip_prefix:
460           get_input: vdbe_aap_untrusted_ip_prefix
461         attr_test:
462           get_attribute:
463           - vdbe_untr_vmi
464           - name
465         aap_sec_untrusted_ip_prefix:
466           get_input: vdbe_aap_sec_untrusted_ip_prefix
467         vdbe_subport_network: control_int_net
468         ip_v6_address:
469           get_input: vdbe_untrusted_v6_ip_1
470         counter:
471           get_input: vnf_id
472         ip_address:
473           get_input: vdbe_untrusted_ip_1
474         subinterfaces_name_prefix:
475           str_replace:
476             template: VM_NAMEDBE001p1n004
477             params:
478               DBE:
479                 get_input: vdbe_device_name
480               VM_NAME:
481                 get_input: vdbe_name_1
482         aap_address_mode:
483           get_input: aap_address_mode
484         service_template_filter:
485           substitute_service_template: nestedServiceTemplate.yaml
486           count:
487             get_input: untrusted_num_vn
488           mandatory: false
489         aap_untrusted_v6_ip_prefix:
490           get_input: vdbe_aap_untrusted_v6_ip_prefix
491         parent_interface: vdbe_untr_vmi
492         mac_address:
493           get_input: vdbe_hw_untr_mac_1
494         vlan_tag_list:
495           get_input: untrusted_vlan_tags
496         aap_sec_untrusted_ip_prefix_len:
497           get_input: vdbe_aap_sec_untrusted_ip_prefix_len
498         vmac_address:
499           get_input: vdbe_untrusted_vmac_address
500         aap_untrusted_v6_ip_prefix_len:
501           get_input: vdbe_aap_untrusted_v6_ip_prefix_len
502         aap_untrusted_ip_prefix_len:
503           get_input: vdbe_aap_untrusted_ip_prefix_len
504       requirements:
505       - subinterface_link_vdbe_0_subint_untr_vmi_0:
506           capability: tosca.capabilities.network.Linkable
507           node: control_int_net
508           relationship: tosca.relationships.network.LinksTo
509       - binding_vdbe_0_subint_untr_vmi_0:
510           capability: tosca.capabilities.network.Bindable
511           node: vdbe_untr_vmi
512           relationship: tosca.relationships.network.BindsTo
513     control_int_net:
514       type: org.openecomp.resource.vl.nodes.heat.network.contrailV2.VirtualNetwork
515       properties:
516         network_name:
517           str_replace:
518             template: VNF_NAME_control_net
519             params:
520               VNF_NAME:
521                 get_input: vnf_name
522         network_ipam_refs:
523           get_attribute:
524           - vdbe_untr_1_subports
525           - count
526   groups:
527     main_group:
528       type: org.openecomp.groups.heat.HeatStack
529       properties:
530         heat_file: ../Artifacts/main.yml
531         description: |
532           Version 2.0 02-09-2016 (Authors: John Doe, user PROD)
533       members:
534       - vdbe_node_1
535       - vdbe_untr_vmi
536       - vdbe_untr_1_subports
537       - control_int_net
538   outputs:
539     out1:
540       description: output_test
541       value:
542         get_attribute:
543         - vdbe_untr_1_subports
544         - name