[SDC-29] Amdocs OnBoard 1707 initial commit.
[sdc.git] / openecomp-be / lib / openecomp-sdc-translator-lib / openecomp-sdc-translator-core / src / test / resources / mock / services / heattotosca / subInterfaceToInterfaceConnection / vTSBC_AIC / expectedoutputfiles / perimeta_ha_sw_aServiceTemplate.yaml
1 tosca_definitions_version: tosca_simple_yaml_1_0_0
2 metadata:
3   template_name: perimeta_ha_sw_a
4 imports:
5 - CommonGlobalTypes:
6     file: CommonGlobalTypesServiceTemplate.yaml
7 - NovaServerGlobalTypes:
8     file: NovaServerGlobalTypesServiceTemplate.yaml
9 - NeutronPortGlobalTypes:
10     file: NeutronPortGlobalTypesServiceTemplate.yaml
11 - NeutronSecurityRulesGlobalTypes:
12     file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
13 - NeutronNetGlobalTypes:
14     file: NeutronNetGlobalTypesServiceTemplate.yaml
15 - CinderVolumeGlobalTypes:
16     file: CinderVolumeGlobalTypesServiceTemplate.yaml
17 - ContrailVirtualNetworkGlobalType:
18     file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
19 - ContrailNetworkRuleGlobalType:
20     file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
21 - AbstractSubstituteGlobalTypes:
22     file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
23 - ContrailV2VirtualMachineInterfaceGlobalType:
24     file: ContrailV2VirtualMachineInterfaceGlobalTypeServiceTemplate.yaml
25 - ContrailComputeGlobalTypes:
26     file: ContrailComputeGlobalTypesServiceTemplate.yaml
27 - ContrailPortGlobalTypes:
28     file: ContrailPortGlobalTypesServiceTemplate.yaml
29 - ContrailAbstractSubstituteGlobalTypes:
30     file: ContrailAbstractSubstituteGlobalTypesServiceTemplate.yaml
31 - ContrailV2VirtualNetworkGlobalType:
32     file: ContrailV2VirtualNetworkGlobalTypeServiceTemplate.yaml
33 - ContrailV2NetworkRuleGlobalType:
34     file: ContrailV2NetworkRuleGlobalTypeServiceTemplate.yaml
35 - ContrailV2VLANSubInterfaceGlobalType:
36     file: ContrailV2VLANSubInterfaceGlobalTypeServiceTemplate.yaml
37 - GlobalSubstitutionTypes:
38     file: GlobalSubstitutionTypesServiceTemplate.yaml
39 node_types:
40   org.openecomp.resource.vfc.nodes.heat.vm_a:
41     derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
42 topology_template:
43   inputs:
44     vf_module_id:
45       hidden: false
46       immutable: false
47       type: string
48       description: Unique ID for this VF Module instance
49     untrusted_net_id:
50       hidden: false
51       immutable: false
52       type: string
53       description: Service network 2 network UUID
54       constraints: [
55         ]
56     mgmt_net_plen:
57       hidden: false
58       immutable: false
59       type: string
60       description: Prefix length of management network
61     perimeta_config:
62       hidden: false
63       immutable: false
64       type: string
65       description: Orchestration template configuration for instance.
66     vm_a_names:
67       hidden: false
68       immutable: false
69       type: list
70       description: List of names of Perimeta VM A instances, indexed by perimeta_instance_index
71       entry_schema:
72         type: string
73     untrusted_b_ips:
74       hidden: false
75       immutable: false
76       type: list
77       description: List of fixed IP addresses to use as untrusted fixed IPs of B instances.
78       entry_schema:
79         type: string
80     ha_net_id:
81       hidden: false
82       immutable: false
83       type: string
84       description: HA network id
85       constraints: [
86         ]
87     perimeta_param_server_group:
88       hidden: false
89       immutable: false
90       type: string
91       description: Server group to use for these VMs - ignored
92     untrusted_vlan_networks:
93       hidden: false
94       immutable: false
95       type: list
96       description: List of Contrail VLAN networks to use on the untrusted/access network.   The order and number of these must match the VLAN ID list.
97       entry_schema:
98         type: string
99     mgmt_sec_groups:
100       hidden: false
101       immutable: false
102       type: list
103       description: List of security groups to add on management interfaces.
104       entry_schema:
105         type: string
106     perimeta_instance_index:
107       hidden: false
108       immutable: false
109       type: float
110       description: Index of instance among multiple instances.  Use to retrieve correct parameter for this instance when passed all parameters for all instances.
111     untrusted_vlan_ids:
112       hidden: false
113       immutable: false
114       type: list
115       description: List of VLAN IDs to use on the untrusted/access network
116       entry_schema:
117         type: string
118     perimeta_keypair:
119       hidden: false
120       immutable: false
121       type: string
122       description: Keypair to use for accessing this Perimeta instance
123       constraints: [
124         ]
125     mgmt_vips:
126       hidden: false
127       immutable: false
128       type: list
129       description: List of management virtual IP addresses for all instances.
130       entry_schema:
131         type: string
132     untrusted_vips:
133       hidden: false
134       immutable: false
135       type: list
136       description: List of service network 2 virtual IP addresses for all instances.
137       entry_schema:
138         type: string
139     vnf_id:
140       hidden: false
141       immutable: false
142       type: string
143       description: VNF ID of this deployment
144     availability_zone_0:
145       hidden: false
146       immutable: false
147       type: string
148       description: Availability zone for A instances.
149     availability_zone_1:
150       hidden: false
151       immutable: false
152       type: string
153       description: Availability zone for B instances.  May be the same as A instance.
154     ha_a_ips:
155       hidden: false
156       immutable: false
157       type: list
158       description: List of fixed IP addresses to use as HA IPs of A instances.
159       entry_schema:
160         type: string
161     untrusted_v6_vips:
162       hidden: false
163       immutable: false
164       type: list
165       description: List of service network 2 alternate virtual IP addresses for all instances.
166       entry_schema:
167         type: string
168     ha_sec_groups:
169       hidden: false
170       immutable: false
171       type: list
172       description: List of security groups to add on HA interfaces.
173       entry_schema:
174         type: string
175     trusted_a_ips:
176       hidden: false
177       immutable: false
178       type: list
179       description: List of fixed IP addresses to use as trusted fixed IPs of A instances.
180       entry_schema:
181         type: string
182     untrusted_num_vlans:
183       hidden: false
184       immutable: false
185       type: float
186       description: Number of VLANs to connect to on the untrusted/access network
187     system_names:
188       hidden: false
189       immutable: false
190       type: list
191       description: List of system names of Perimeta instances.  Name of a specific instance is indexed by perimeta_instance_index
192       entry_schema:
193         type: string
194     vm_b_names:
195       hidden: false
196       immutable: false
197       type: list
198       description: List of names of Perimeta VM A instances, indexed by perimeta_instance_index
199       entry_schema:
200         type: string
201     trusted_sec_groups:
202       hidden: false
203       immutable: false
204       type: list
205       description: List of security groups to add on trusted interfaces.
206       entry_schema:
207         type: string
208     trusted_vips:
209       hidden: false
210       immutable: false
211       type: list
212       description: List of service network 1 virtual IP addresses for all instances.
213       entry_schema:
214         type: string
215     trusted_net_id:
216       hidden: false
217       immutable: false
218       type: string
219       description: Service network 1 network UUID
220       constraints: [
221         ]
222     ha_b_ips:
223       hidden: false
224       immutable: false
225       type: list
226       description: List of fixed IP addresses to use as HA IPs of B instances.
227       entry_schema:
228         type: string
229     untrusted_a_v6_ips:
230       hidden: false
231       immutable: false
232       type: list
233       description: List of fixed IP addresses to use as untrusted alternate fixed IPs of A instances.
234       entry_schema:
235         type: string
236     untrusted_b_v6_ips:
237       hidden: false
238       immutable: false
239       type: list
240       description: List of fixed IP addresses to use as untrusted alternate fixed IPs of B instances.
241       entry_schema:
242         type: string
243     mgmt_a_ips:
244       hidden: false
245       immutable: false
246       type: list
247       description: List of fixed IP addresses to use as management IPs of A instances.
248       entry_schema:
249         type: string
250     vm_role:
251       hidden: false
252       immutable: false
253       type: string
254       description: Role of these VMs
255     trusted_b_ips:
256       hidden: false
257       immutable: false
258       type: list
259       description: List of fixed IP addresses to use as trusted fixed IPs of B instances.
260       entry_schema:
261         type: string
262     perimeta_image_name:
263       hidden: false
264       immutable: false
265       type: string
266       description: Glance image for Perimeta instance
267       constraints: [
268         ]
269     mgmt_net_default_gateway:
270       hidden: false
271       immutable: false
272       type: string
273       description: IP address of management default gateway
274     untrusted_a_ips:
275       hidden: false
276       immutable: false
277       type: list
278       description: List of fixed IP addresses to use as untrusted fixed IPs of A instances.
279       entry_schema:
280         type: string
281     untrusted_sec_groups:
282       hidden: false
283       immutable: false
284       type: list
285       description: List of security groups to add on untrusted interfaces.
286       entry_schema:
287         type: string
288     mgmt_net_id:
289       hidden: false
290       immutable: false
291       type: string
292       description: Management network id
293       constraints: [
294         ]
295     perimeta_flavor_name:
296       hidden: false
297       immutable: false
298       type: string
299       description: Flavor to use for creating VM instances
300       constraints: [
301         ]
302     ha_network_plen:
303       hidden: false
304       immutable: false
305       type: float
306       constraints:
307       - in_range:
308         - 0
309         - 32
310     mgmt_b_ips:
311       hidden: false
312       immutable: false
313       type: list
314       description: List of fixed IP addresses to use as management IPs of B instances.
315       entry_schema:
316         type: string
317   node_templates:
318     perimeta_a_untrusted_0_vlan_ports:
319       type: org.openecomp.resource.abstract.nodes.heat.vlan_subinterface_dual
320       directives:
321       - substitutable
322       properties:
323         vlan_ids:
324           get_input: untrusted_vlan_ids
325         service_template_filter:
326           substitute_service_template: vlan_subinterface_dualServiceTemplate.yaml
327           count:
328             get_input: untrusted_num_vlans
329           mandatory: false
330         parent_interface: perimeta_a_untrusted_0_port
331         virtual_ipv6_address:
332           get_input:
333           - untrusted_v6_vips
334           - get_input: perimeta_instance_index
335         virtual_ip_address:
336           get_input:
337           - untrusted_vips
338           - get_input: perimeta_instance_index
339         mac_address:
340           get_attribute:
341           - perimeta_a_untrusted_0_port
342           - mac_address
343         ipv6_address:
344           get_input:
345           - untrusted_a_v6_ips
346           - get_input: perimeta_instance_index
347         subinterface_name_prefix:
348           str_replace:
349             template: $VM_untrusted_port_vlan_
350             params:
351               $VM:
352                 get_input:
353                 - vm_a_names
354                 - get_input: perimeta_instance_index
355         subinterface_instance_index:
356           get_property:
357           - SELF
358           - service_template_filter
359           - index_value
360         ip_address:
361           get_input:
362           - untrusted_a_ips
363           - get_input: perimeta_instance_index
364         vlan_networks:
365           get_input: untrusted_vlan_networks
366       requirements:
367       - binding_contrail_vmi_subinterface:
368           capability: tosca.capabilities.network.Bindable
369           node: perimeta_a_untrusted_0_port
370           relationship: tosca.relationships.network.BindsTo
371     perimeta_a_server_0:
372       type: org.openecomp.resource.vfc.nodes.heat.vm_a
373       properties:
374         flavor:
375           get_input: perimeta_flavor_name
376         key_name:
377           get_input: perimeta_keypair
378         availability_zone:
379           get_input: availability_zone_0
380         image:
381           get_input: perimeta_image_name
382         metadata:
383           vf_module_id:
384             get_input: vf_module_id
385           vm_role:
386             str_replace:
387               template: $ROLE_a
388               params:
389                 $ROLE:
390                   get_input: vm_role
391           vnf_id:
392             get_input: vnf_id
393         config_drive: true
394         personality:
395           /opt/MetaSwitch/init/custom.ini:
396             get_artifact:
397             - SELF
398             - custom
399         user_data_format: RAW
400         name:
401           get_input:
402           - vm_a_names
403           - get_input: perimeta_instance_index
404         scheduler_hints:
405           group:
406             get_input: perimeta_param_server_group
407       artifacts:
408         custom:
409           type: tosca.artifacts.Deployment
410           file: ../Artifacts/custom.ini
411     perimeta_a_mgmt_0_port:
412       type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
413       properties:
414         security_groups:
415           get_input: mgmt_sec_groups
416         fixed_ips:
417         - ip_address:
418             get_input:
419             - mgmt_a_ips
420             - get_input: perimeta_instance_index
421         allowed_address_pairs:
422         - ip_address:
423             get_input:
424             - mgmt_vips
425             - get_input: perimeta_instance_index
426         name:
427           str_replace:
428             template: $VM_mgmt_port
429             params:
430               $VM:
431                 get_input:
432                 - vm_a_names
433                 - get_input: perimeta_instance_index
434         network:
435           get_input: mgmt_net_id
436       requirements:
437       - binding:
438           capability: tosca.capabilities.network.Bindable
439           node: perimeta_a_server_0
440           relationship: tosca.relationships.network.BindsTo
441     perimeta_a_ha_0_port:
442       type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
443       properties:
444         security_groups:
445           get_input: ha_sec_groups
446         fixed_ips:
447         - ip_address:
448             get_input:
449             - ha_a_ips
450             - get_input: perimeta_instance_index
451         name:
452           str_replace:
453             template: $VM_ha_port
454             params:
455               $VM:
456                 get_input:
457                 - vm_a_names
458                 - get_input: perimeta_instance_index
459         network:
460           get_input: ha_net_id
461       requirements:
462       - binding:
463           capability: tosca.capabilities.network.Bindable
464           node: perimeta_a_server_0
465           relationship: tosca.relationships.network.BindsTo
466     perimeta_a_trusted_0_port:
467       type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
468       properties:
469         security_groups:
470           get_input: trusted_sec_groups
471         fixed_ips:
472         - ip_address:
473             get_input:
474             - trusted_a_ips
475             - get_input: perimeta_instance_index
476         allowed_address_pairs:
477         - ip_address:
478             get_input:
479             - trusted_vips
480             - get_input: perimeta_instance_index
481         name:
482           str_replace:
483             template: $VM_trusted_port
484             params:
485               $VM:
486                 get_input:
487                 - vm_a_names
488                 - get_input: perimeta_instance_index
489         network:
490           get_input: trusted_net_id
491       requirements:
492       - binding:
493           capability: tosca.capabilities.network.Bindable
494           node: perimeta_a_server_0
495           relationship: tosca.relationships.network.BindsTo
496     perimeta_a_untrusted_0_port:
497       type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
498       properties:
499         security_groups:
500           get_input: untrusted_sec_groups
501         fixed_ips:
502         - ip_address:
503             get_input:
504             - untrusted_a_ips
505             - get_input: perimeta_instance_index
506         - ip_address:
507             get_input:
508             - untrusted_a_v6_ips
509             - get_input: perimeta_instance_index
510         allowed_address_pairs:
511         - ip_address:
512             get_input:
513             - untrusted_vips
514             - get_input: perimeta_instance_index
515         - ip_address:
516             get_input:
517             - untrusted_v6_vips
518             - get_input: perimeta_instance_index
519         name:
520           str_replace:
521             template: $VM_untrusted_port
522             params:
523               $VM:
524                 get_input:
525                 - vm_a_names
526                 - get_input: perimeta_instance_index
527         network:
528           get_input: untrusted_net_id
529       requirements:
530       - binding:
531           capability: tosca.capabilities.network.Bindable
532           node: perimeta_a_server_0
533           relationship: tosca.relationships.network.BindsTo
534   groups:
535     perimeta_ha_sw_a_group:
536       type: org.openecomp.groups.heat.HeatStack
537       properties:
538         heat_file: ../Artifacts/perimeta_ha_sw_a.yaml
539         description: |
540           HOT template to instantiate a Perimeta 1+1 HA instance with 4vNICs as part of a nested template
541       members:
542       - perimeta_a_untrusted_0_vlan_ports
543       - perimeta_a_server_0
544       - perimeta_a_mgmt_0_port
545       - perimeta_a_ha_0_port
546       - perimeta_a_trusted_0_port
547       - perimeta_a_untrusted_0_port
548   outputs:
549     server_group_used:
550       description: Server group used for these VMs
551       value:
552         get_input: perimeta_param_server_group
553   substitution_mappings:
554     node_type: org.openecomp.resource.abstract.nodes.heat.perimeta_ha_sw_a
555     capabilities:
556       scalable_perimeta_a_server_0:
557       - perimeta_a_server_0
558       - scalable
559       attachment_perimeta_a_mgmt_0_port:
560       - perimeta_a_mgmt_0_port
561       - attachment
562       binding_perimeta_a_server_0:
563       - perimeta_a_server_0
564       - binding
565       host_perimeta_a_server_0:
566       - perimeta_a_server_0
567       - host
568       attachment_perimeta_a_trusted_0_port:
569       - perimeta_a_trusted_0_port
570       - attachment
571       attachment_perimeta_a_untrusted_0_port:
572       - perimeta_a_untrusted_0_port
573       - attachment
574       attachment_perimeta_a_ha_0_port:
575       - perimeta_a_ha_0_port
576       - attachment
577       binding_perimeta_a_mgmt_0_port:
578       - perimeta_a_mgmt_0_port
579       - binding
580       binding_perimeta_a_trusted_0_port:
581       - perimeta_a_trusted_0_port
582       - binding
583       binding_perimeta_a_untrusted_0_port:
584       - perimeta_a_untrusted_0_port
585       - binding
586       endpoint_perimeta_a_server_0:
587       - perimeta_a_server_0
588       - endpoint
589       binding_perimeta_a_ha_0_port:
590       - perimeta_a_ha_0_port
591       - binding
592       os_perimeta_a_server_0:
593       - perimeta_a_server_0
594       - os
595     requirements:
596       link_perimeta_a_trusted_0_port:
597       - perimeta_a_trusted_0_port
598       - link
599       link_perimeta_a_mgmt_0_port:
600       - perimeta_a_mgmt_0_port
601       - link
602       link_contrail_vmi_subinterface_perimeta_a_untrusted_0_vlan_ports:
603       - perimeta_a_untrusted_0_vlan_ports
604       - link_contrail_vmi_subinterface
605       link_perimeta_a_untrusted_0_port:
606       - perimeta_a_untrusted_0_port
607       - link
608       link_perimeta_a_ha_0_port:
609       - perimeta_a_ha_0_port
610       - link
611       local_storage_perimeta_a_server_0:
612       - perimeta_a_server_0
613       - local_storage