[SDC-29] Amdocs OnBoard 1707 initial commit.
[sdc.git] / openecomp-be / backend / openecomp-sdc-vendor-software-product-manager / src / test / resources / extractServiceComposition / fullComposition / 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 node_types:
8   org.openecomp.resource.vfc.nodes.heat.pcrf_psm:
9     derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
10   org.openecomp.resource.vfc.nodes.heat.pcm:
11     derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
12 topology_template:
13   inputs:
14     Internal2_name:
15       label: Internal2_name
16       hidden: false
17       immutable: false
18       type: string
19       description: Internal2_name
20     Internal1_shared:
21       label: Internal1_shared
22       hidden: false
23       immutable: false
24       type: string
25       description: Internal1_shared
26     FSB1_volume_name:
27       label: FSB1_volume
28       hidden: false
29       immutable: false
30       type: string
31       description: FSB1_volume_1
32     jsa_cidr:
33       label: jsa_cidr
34       hidden: false
35       immutable: false
36       type: string
37       description: jsa_cidr
38       default: 107.243.7.128/26
39     availabilityzone_name:
40       label: availabilityzone_name
41       hidden: false
42       immutable: false
43       type: string
44       description: availabilityzone_name
45     fsb1-name:
46       label: FSB1_name
47       hidden: false
48       immutable: false
49       type: string
50       description: FSB1_name
51     pcm_image_name:
52       label: pcm_image_name
53       hidden: false
54       immutable: false
55       type: string
56       description: pcm_image_name
57     Internal2_external:
58       label: Internal2_external
59       hidden: false
60       immutable: false
61       type: string
62       description: Internal2_external
63     Internal2_forwarding_mode:
64       label: Internal2_forwarding_mode
65       hidden: false
66       immutable: false
67       type: string
68       description: Internal2_forwarding_mode
69     pcrf_psm_flavor_name:
70       label: pcrf_psm_flavor_name
71       hidden: false
72       immutable: false
73       type: string
74       description: pcrf_psm_flavor_name
75     pcrf_psm_image_name:
76       label: pcrf_psm_image_name
77       hidden: false
78       immutable: false
79       type: string
80       description: pcrf_psm_image_name
81     FSB_1_image:
82       label: MME_FSB1
83       hidden: false
84       immutable: false
85       type: string
86       description: MME_FSB1_15B-CP04-r5a01
87     volume_size:
88       label: volume size
89       hidden: false
90       immutable: false
91       type: float
92       description: my volume size 320GB
93     fsb1-Internal1-mac:
94       label: FSB1_internal_mac
95       hidden: false
96       immutable: false
97       type: string
98       description: FSB1_internal_mac
99     Internal2_shared:
100       label: Internal2_shared
101       hidden: false
102       immutable: false
103       type: string
104       description: Internal2_shared
105     pcm_server_name:
106       label: pcm_server_name
107       hidden: false
108       immutable: false
109       type: string
110       description: pcm_server_name
111     Internal1_net_name:
112       label: Internal1_net_name
113       hidden: false
114       immutable: false
115       type: string
116       description: Internal1_net_name
117     oam_net_name:
118       label: oam_net_name
119       hidden: false
120       immutable: false
121       type: string
122       description: oam_net_name
123     fsb1-flavor:
124       label: FSB1_flavor
125       hidden: false
126       immutable: false
127       type: string
128       description: FSB1_flavor
129     fsb1-Internal2-mac:
130       label: FSB1_internal_mac
131       hidden: false
132       immutable: false
133       type: string
134       description: FSB1_internal_mac
135     volume_type:
136       label: volume type
137       hidden: false
138       immutable: false
139       type: string
140       description: volume type Gold
141     fsb1-zone:
142       label: FSB1_zone
143       hidden: false
144       immutable: false
145       type: string
146       description: FSB1_zone
147     fsb_zone:
148       label: FSB1_zone
149       hidden: false
150       immutable: false
151       type: string
152       description: FSB1_zone
153     security_group_name:
154       hidden: false
155       immutable: false
156       type: list
157       description: CMAUI1, CMAUI2 server names
158       entry_schema:
159         type: String
160     jsa_net_name:
161       label: jsa_net_name
162       hidden: false
163       immutable: false
164       type: string
165       description: jsa_net_name
166       default: jsa_log_net_0
167     pcrf_psm_server_name:
168       label: pcrf_psm_server_name
169       hidden: false
170       immutable: false
171       type: string
172       description: pcrf_psm_server_name
173     pcm_flavor_name:
174       label: pcm_flavor_name
175       hidden: false
176       immutable: false
177       type: string
178       description: pcm_flavor_name
179     oam_net_id:
180       label: oam_net_id
181       hidden: false
182       immutable: false
183       type: string
184       description: oam_net_id
185     fsb2-Internal1-mac:
186       label: FSB1_internal_mac
187       hidden: false
188       immutable: false
189       type: string
190       description: FSB1_internal_mac
191     Internal1_forwarding_mode:
192       label: Internal1_forwarding_mode
193       hidden: false
194       immutable: false
195       type: string
196       description: Internal1_forwarding_mode
197     pcrf_cps_net_name:
198       label: pcrf_cps_net_name
199       hidden: false
200       immutable: false
201       type: string
202       description: pcrf_cps_net_name
203     cps_net_name:
204       label: cps_net_name
205       hidden: false
206       immutable: false
207       type: string
208       description: cps_net_name
209     pcrf_security_group_name:
210       hidden: false
211       immutable: false
212       type: list
213       description: CMAUI1, CMAUI2 server names
214       entry_schema:
215         type: String
216     Internal1_external:
217       label: Internal1_external
218       hidden: false
219       immutable: false
220       type: string
221       description: Internal1_external
222   node_templates:
223     pcm_vol_02:
224       type: org.openecomp.resource.vfc.nodes.heat.cinder.Volume
225       properties:
226         image:
227           get_input: FSB_1_image
228         volume_type:
229           get_input: volume_type
230         size: '(get_input : volume_size) * 1024'
231         read_only: true
232         name:
233           get_input: FSB1_volume_name
234     Internal2-net:
235       type: org.openecomp.resource.vl.nodes.heat.network.contrail.VirtualNetwork
236       properties:
237         shared:
238           get_input: Internal2_shared
239         forwarding_mode:
240           get_input: Internal2_forwarding_mode
241         external:
242           get_input: Internal2_external
243         network_name:
244           get_input: Internal2_name
245     pcm_port_1:
246       type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
247       properties:
248         security_groups:
249         - get_input: security_group_name
250         fixed_ips:
251         - ip_address:
252             get_input: oam_net_ip
253         network:
254           get_input: oam_net_name
255       requirements:
256       - binding:
257           capability: tosca.capabilities.network.Bindable
258           node: server_pcm
259           relationship: tosca.relationships.network.BindsTo
260     server_VolumeTest_snapshot02:
261       type: org.openecomp.resource.vfc.nodes.heat.cinder.Volume
262       properties:
263         snapshot_id:
264           get_input: snapshot02
265     FSB1_Internal2_port:
266       type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
267       properties:
268         mac_address:
269           get_input: fsb1-Internal2-mac
270         network: Internal2-net
271       requirements:
272       - link:
273           capability: tosca.capabilities.network.Linkable
274           node: Internal2-net
275           relationship: tosca.relationships.network.LinksTo
276       - binding:
277           capability: tosca.capabilities.network.Bindable
278           node: FSB1
279           relationship: tosca.relationships.network.BindsTo
280     server_VolumeTest_snapshot01:
281       type: org.openecomp.resource.vfc.nodes.heat.cinder.Volume
282       properties:
283         snapshot_id:
284           get_input: snapshot01
285     FSB1_Internal1_port:
286       type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
287       properties:
288         mac_address:
289           get_input: fsb1-Internal1-mac
290         network: Internal1-net
291       requirements:
292       - link:
293           capability: tosca.capabilities.network.Linkable
294           node: Internal1-net
295           relationship: tosca.relationships.network.LinksTo
296       - binding:
297           capability: tosca.capabilities.network.Bindable
298           node: FSB1
299           relationship: tosca.relationships.network.BindsTo
300     FSB1_OAM_Port:
301       type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
302       properties:
303         fixed_ips:
304         - ip_address:
305             get_input: fsb1-oam-ip
306         network:
307           get_input: oam_net_id
308       requirements:
309       - binding:
310           capability: tosca.capabilities.network.Bindable
311           node: FSB1
312           relationship: tosca.relationships.network.BindsTo
313     psm01_port_0:
314       type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
315       properties:
316         security_groups:
317         - get_input: pcrf_security_group_name
318         fixed_ips:
319         - ip_address:
320             get_input: pcrf_cps_net_ip
321         network:
322           get_input: pcrf_cps_net_name
323       requirements:
324       - binding:
325           capability: tosca.capabilities.network.Bindable
326           node: pcrf_server_psm
327           relationship: tosca.relationships.network.BindsTo
328     pcm_port_0:
329       type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
330       properties:
331         security_groups:
332         - get_input: security_group_name
333         fixed_ips:
334         - ip_address:
335             get_input: cps_net_ip
336         network:
337           get_input: cps_net_name
338       requirements:
339       - binding:
340           capability: tosca.capabilities.network.Bindable
341           node: server_pcm
342           relationship: tosca.relationships.network.BindsTo
343     network:
344       type: org.openecomp.resource.vl.nodes.heat.network.contrail.VirtualNetwork
345       properties:
346         network_name:
347           get_input: Internal1_net_name
348     server_pcm:
349       type: org.openecomp.resource.vfc.nodes.heat.pcm
350       properties:
351         flavor:
352           get_input: pcm_flavor_name
353         availability_zone:
354           get_input: availabilityzone_name
355         image:
356           get_input: pcm_image_name
357         config_drive: true
358         user_data_format: RAW
359         name:
360           get_input: pcm_server_name
361         user_data: UNSUPPORTED_RESOURCE_server_init
362     Internal1-net:
363       type: org.openecomp.resource.vl.nodes.heat.network.contrail.VirtualNetwork
364       properties:
365         shared:
366           get_input: Internal1_shared
367         forwarding_mode:
368           get_input: Internal1_forwarding_mode
369         external:
370           get_input: Internal1_external
371         network_name:
372           get_input: Internal1_net_name
373     pcrf_server_psm:
374       type: org.openecomp.resource.vfc.nodes.heat.pcrf_psm
375       properties:
376         flavor:
377           get_input: pcrf_psm_flavor_name
378         availability_zone:
379           get_input: availabilityzone_name
380         image:
381           get_input: pcrf_psm_image_name
382         config_drive: true
383         metadata:
384           vnf_id:
385             get_input: pcrf_vnf_id
386         user_data_format: RAW
387         name:
388           get_input: pcrf_psm_server_name
389         user_data: UNSUPPORTED_RESOURCE_pcrf_server_init
390     template_Vlan_1:
391       type: org.openecomp.resource.cp.nodes.heat.network.contrailV2.VLANSubInterface
392       properties:
393         virtual_machine_interface_refs:
394         - cmaui_port_1
395         name:
396           str_replace:
397             template: $NAME$VLAN
398             params:
399               $NAME:
400                 get_input: subinterface_name_prefix
401               $VLAN:
402                 get_input:
403                 - vlan_ids
404                 - get_input: subinterface_instance_index
405         virtual_network_refs:
406         - jsa_net1
407         virtual_machine_interface_properties:
408           virtual_machine_interface_properties_sub_interface_vlan_tag:
409             get_input: lb_st_vlan_type_oam
410         virtual_machine_interface_allowed_address_pairs:
411           virtual_machine_interface_allowed_address_pairs_allowed_address_pair:
412           - virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode: active-standby
413             virtual_machine_interface_allowed_address_pairs_allowed_address_pair_mac:
414               get_input: mac_address
415             virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip:
416               virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len: 32
417               virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix:
418                 get_input: virtual_ip_address
419           - virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode: active-standby
420             virtual_machine_interface_allowed_address_pairs_allowed_address_pair_mac:
421               get_input: mac_address
422             virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip:
423               virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len: 128
424               virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix:
425                 get_input: virtual_ipv6_address
426         virtual_machine_interface_mac_addresses:
427           virtual_machine_interface_mac_addresses_mac_address:
428           - get_input: mac_address
429       requirements:
430       - link:
431           capability: tosca.capabilities.network.Linkable
432           node: jsa_net1
433           relationship: tosca.relationships.network.LinksTo
434       - binding:
435           capability: tosca.capabilities.network.Bindable
436           node: pcm_port_1
437           relationship: tosca.relationships.network.BindsTo
438     jsa_net1:
439       type: org.openecomp.resource.vl.nodes.heat.network.contrailV2.VirtualNetwork
440       properties:
441         network_ipam_refs_data:
442         - network_ipam_refs_data_ipam_subnets:
443           - network_ipam_refs_data_ipam_subnets_subnet:
444               network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len:
445                 get_input: network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_len_2
446               network_ipam_refs_data_ipam_subnets_subnet_ip_prefix:
447                 get_input: network_ipam_refs_data_ipam_subnets_subnet_ip_prefix_2
448             network_ipam_refs_data_ipam_subnets_addr_from_start:
449               get_input: network_ipam_refs_data_ipam_subnets_addr_from_start_true
450         network_name: aaa
451     template_Vlan_2:
452       type: org.openecomp.resource.cp.nodes.heat.network.contrailV2.VLANSubInterface
453       properties:
454         virtual_machine_interface_refs:
455         - list_join:
456           - ':'
457           - get_attribute:
458             - template_VMInt_OAM_lb_2
459             - fq_name
460         name:
461           str_replace:
462             template: $NAME$VLAN
463             params:
464               $NAME:
465                 get_input: subinterface_name_prefix
466               $VLAN:
467                 get_input:
468                 - vlan_ids
469                 - get_input: subinterface_instance_index
470         virtual_network_refs:
471         - list_join:
472           - ':'
473           - get_attribute:
474             - jsa_net2
475             - fq_name
476         virtual_machine_interface_properties:
477           virtual_machine_interface_properties_sub_interface_vlan_tag:
478             get_input: lb_st_vlan_type_oam
479         virtual_machine_interface_allowed_address_pairs:
480           virtual_machine_interface_allowed_address_pairs_allowed_address_pair:
481           - virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode: active-standby
482             virtual_machine_interface_allowed_address_pairs_allowed_address_pair_mac:
483               get_input: mac_address
484             virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip:
485               virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len: 32
486               virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix:
487                 get_input: virtual_ip_address
488           - virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode: active-standby
489             virtual_machine_interface_allowed_address_pairs_allowed_address_pair_mac:
490               get_input: mac_address
491             virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip:
492               virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len: 128
493               virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix:
494                 get_input: virtual_ipv6_address
495         virtual_machine_interface_mac_addresses:
496           virtual_machine_interface_mac_addresses_mac_address:
497           - get_input: mac_address
498       requirements:
499       - link:
500           capability: tosca.capabilities.network.Linkable
501           node: jsa_net1
502           relationship: tosca.relationships.network.LinksTo
503       - binding:
504           capability: tosca.capabilities.network.Bindable
505           node: template_VMInt_OAM_lb_2
506           relationship: tosca.relationships.network.BindsTo
507     template_VMInt_OAM_lb_2:
508       type: org.openecomp.resource.cp.nodes.heat.contrailV2.VirtualMachineInterface
509       properties:
510         security_group_refs:
511         - get_input: oam_sec_group_name
512         virtual_network_refs:
513         - list_join:
514           - ':'
515           - get_attribute:
516             - jsa_net2
517             - fq_name
518         virtual_machine_interface_properties:
519           virtual_machine_interface_properties_service_interface_type:
520             get_input: lb_st_interface_type_oam
521         port_tuple_refs:
522         - get_input: template_PortTuple_LB1
523       requirements:
524       - link:
525           capability: tosca.capabilities.network.Linkable
526           node: jsa_net1
527           relationship: tosca.relationships.network.LinksTo
528       - binding:
529           capability: tosca.capabilities.network.Bindable
530           node: FSB1
531           relationship: tosca.relationships.network.BindsTo
532     FSB1:
533       type: org.openecomp.resource.vfc.nodes.heat.nova.Server
534       properties:
535         flavor:
536           get_input: fsb1-flavor
537         availability_zone:
538           get_input: fsb_zone
539         metadata:
540           write_files:
541           - path: /etc/sysconfig/network-scripts/ifcfg-eth0
542             permissions: '0644'
543             content:
544               str_replace:
545                 template:
546                   get_artifact:
547                   - SELF
548                   - nimbus-ethernet
549                 params:
550                   $dev: eth0
551                   $netmask:
552                     get_input: cps_net_mask
553                   $ip:
554                     get_input: cps_net_ip
555           - path: /etc/sysconfig/network-scripts/ifcfg-eth1
556             permissions: '0644'
557             content:
558               str_replace:
559                 template:
560                   get_artifact:
561                   - SELF
562                   - nimbus-ethernet-gw
563                 params:
564                   $dev: eth1
565                   $netmask:
566                     get_input: oam_net_mask
567                   $gateway:
568                     get_input: oam_net_gw
569                   $ip:
570                     get_input: oam_net_ip
571         name:
572           get_input: fsb1-name
573       artifacts:
574         nimbus-ethernet-gw:
575           type: tosca.artifacts.Deployment
576           file: ../Artifacts/nimbus-ethernet-gw
577         nimbus-ethernet:
578           type: tosca.artifacts.Deployment
579           file: ../Artifacts/nimbus-ethernet
580   groups:
581     ep-jsa_net:
582       type: org.openecomp.groups.heat.HeatStack
583       properties:
584         heat_file: ../Artifacts/ep-jsa_net.yaml
585         description: |
586           Version 2.0 02-09-2016 (Authors: John Doe, user PROD)
587       members:
588       - pcm_vol_02
589       - Internal2-net
590       - pcm_port_1
591       - FSB1_Internal2_port
592       - FSB1_Internal1_port
593       - FSB1_OAM_Port
594       - psm01_port_0
595       - pcm_port_0
596       - server_pcm
597       - Internal1-net
598       - pcrf_server_psm
599       - FSB1