[SDC-29] Amdocs OnBoard 1707 initial commit.
[sdc.git] / openecomp-be / backend / openecomp-sdc-vendor-software-product-manager / src / test / resources / extractServiceComposition / componentsWithPort / 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_port_1:
224       type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
225       properties:
226         security_groups:
227         - get_input: security_group_name
228         fixed_ips:
229         - ip_address:
230             get_input: oam_net_ip
231         network:
232           get_input: oam_net_name
233       requirements:
234       - binding:
235           capability: tosca.capabilities.network.Bindable
236           node: server_pcm
237           relationship: tosca.relationships.network.BindsTo
238     FSB1_Internal2:
239       type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
240       properties:
241         mac_address:
242           get_input: fsb1-Internal2-mac
243         network: Internal2-net
244       requirements:
245       - binding:
246           capability: tosca.capabilities.network.Bindable
247           node: FSB2
248           relationship: tosca.relationships.network.BindsTo
249     FSB1_Internal1:
250       type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
251       properties:
252         mac_address:
253           get_input: fsb1-Internal1-mac
254         network: Internal1-net
255       requirements:
256       - link:
257           capability: tosca.capabilities.network.Linkable
258           node: Internal1-net
259           relationship: tosca.relationships.network.LinksTo
260       - binding:
261           capability: tosca.capabilities.network.Bindable
262           node: FSB1
263           relationship: tosca.relationships.network.BindsTo
264     FSB1_OAM:
265       type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
266       properties:
267         fixed_ips:
268         - ip_address:
269             get_input: fsb1-oam-ip
270         network:
271           get_input: oam_net_id
272       requirements:
273       - binding:
274           capability: tosca.capabilities.network.Bindable
275           node: FSB1
276           relationship: tosca.relationships.network.BindsTo
277     psm01_port_0:
278       type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
279       properties:
280         security_groups:
281         - get_input: pcrf_security_group_name
282         fixed_ips:
283         - ip_address:
284             get_input: pcrf_cps_net_ip
285         network:
286           get_input: pcrf_cps_net_name
287       requirements:
288       - binding:
289           capability: tosca.capabilities.network.Bindable
290           node: pcrf_server_psm
291           relationship: tosca.relationships.network.BindsTo
292     pcm_port_0:
293       type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
294       properties:
295         security_groups:
296         - get_input: security_group_name
297         fixed_ips:
298         - ip_address:
299             get_input: cps_net_ip
300         network:
301           get_input: cps_net_name
302       requirements:
303       - binding:
304           capability: tosca.capabilities.network.Bindable
305           node: server_pcm
306           relationship: tosca.relationships.network.BindsTo
307     server_pcm:
308       type: org.openecomp.resource.vfc.nodes.heat.pcm
309       properties:
310         flavor:
311           get_input: pcm_flavor_name
312         availability_zone:
313           get_input: availabilityzone_name
314         image:
315           get_input: pcm_image_name
316         config_drive: true
317         user_data_format: RAW
318         name:
319           get_input: pcm_server_name
320         user_data: UNSUPPORTED_RESOURCE_server_init
321     pcrf_server_psm:
322       type: org.openecomp.resource.vfc.nodes.heat.pcrf_psm
323       properties:
324         flavor:
325           get_input: pcrf_psm_flavor_name
326         availability_zone:
327           get_input: availabilityzone_name
328         image:
329           get_input: pcrf_psm_image_name
330         config_drive: true
331         metadata:
332           vnf_id:
333             get_input: pcrf_vnf_id
334         user_data_format: RAW
335         name:
336           get_input: pcrf_psm_server_name
337         user_data: UNSUPPORTED_RESOURCE_pcrf_server_init
338     FSB2:
339       type: org.openecomp.resource.vfc.nodes.heat.nova.Server
340       properties:
341         flavor:
342           get_input: fsb1-flavor
343         availability_zone:
344           get_input: fsb_zone
345         name:
346           get_input: fsb1-name
347     template_Vlan_1:
348       type: org.openecomp.resource.cp.nodes.heat.network.contrailV2.VLANSubInterface
349       properties:
350         virtual_machine_interface_refs:
351         - cmaui_port_1
352         name:
353           str_replace:
354             template: $NAME$VLAN
355             params:
356               $NAME:
357                 get_input: subinterface_name_prefix
358               $VLAN:
359                 get_input:
360                 - vlan_ids
361                 - get_input: subinterface_instance_index
362         virtual_network_refs:
363         - jsa_net1
364         virtual_machine_interface_properties:
365           virtual_machine_interface_properties_sub_interface_vlan_tag:
366             get_input: lb_st_vlan_type_oam
367         virtual_machine_interface_allowed_address_pairs:
368           virtual_machine_interface_allowed_address_pairs_allowed_address_pair:
369           - virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode: active-standby
370             virtual_machine_interface_allowed_address_pairs_allowed_address_pair_mac:
371               get_input: mac_address
372             virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip:
373               virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len: 32
374               virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix:
375                 get_input: virtual_ip_address
376           - virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode: active-standby
377             virtual_machine_interface_allowed_address_pairs_allowed_address_pair_mac:
378               get_input: mac_address
379             virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip:
380               virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len: 128
381               virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix:
382                 get_input: virtual_ipv6_address
383         virtual_machine_interface_mac_addresses:
384           virtual_machine_interface_mac_addresses_mac_address:
385           - get_input: mac_address
386       requirements:
387       - binding:
388           capability: tosca.capabilities.network.Bindable
389           node: pcm_port_1
390           relationship: tosca.relationships.network.BindsTo
391     template_Vlan_2:
392       type: org.openecomp.resource.cp.nodes.heat.network.contrailV2.VLANSubInterface
393       properties:
394         virtual_machine_interface_refs:
395         - list_join:
396           - ':'
397           - get_attribute:
398             - template_VMInt_OAM_lb_2
399             - fq_name
400         name:
401           str_replace:
402             template: $NAME$VLAN
403             params:
404               $NAME:
405                 get_input: subinterface_name_prefix
406               $VLAN:
407                 get_input:
408                 - vlan_ids
409                 - get_input: subinterface_instance_index
410         virtual_network_refs:
411         - list_join:
412           - ':'
413           - get_attribute:
414             - jsa_net2
415             - fq_name
416         virtual_machine_interface_properties:
417           virtual_machine_interface_properties_sub_interface_vlan_tag:
418             get_input: lb_st_vlan_type_oam
419         virtual_machine_interface_allowed_address_pairs:
420           virtual_machine_interface_allowed_address_pairs_allowed_address_pair:
421           - virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode: active-standby
422             virtual_machine_interface_allowed_address_pairs_allowed_address_pair_mac:
423               get_input: mac_address
424             virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip:
425               virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len: 32
426               virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix:
427                 get_input: virtual_ip_address
428           - virtual_machine_interface_allowed_address_pairs_allowed_address_pair_address_mode: active-standby
429             virtual_machine_interface_allowed_address_pairs_allowed_address_pair_mac:
430               get_input: mac_address
431             virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip:
432               virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix_len: 128
433               virtual_machine_interface_allowed_address_pairs_allowed_address_pair_ip_ip_prefix:
434                 get_input: virtual_ipv6_address
435         virtual_machine_interface_mac_addresses:
436           virtual_machine_interface_mac_addresses_mac_address:
437           - get_input: mac_address
438       requirements:
439       - binding:
440           capability: tosca.capabilities.network.Bindable
441           node: template_VMInt_OAM_lb_2
442           relationship: tosca.relationships.network.BindsTo
443     template_VMInt_OAM_lb_2:
444       type: org.openecomp.resource.cp.nodes.heat.contrailV2.VirtualMachineInterface
445       properties:
446         security_group_refs:
447         - get_input: oam_sec_group_name
448         virtual_network_refs:
449         - list_join:
450           - ':'
451           - get_attribute:
452             - jsa_net2
453             - fq_name
454         virtual_machine_interface_properties:
455           virtual_machine_interface_properties_service_interface_type:
456             get_input: lb_st_interface_type_oam
457         port_tuple_refs:
458         - get_input: template_PortTuple_LB1
459       requirements:
460       - binding:
461           capability: tosca.capabilities.network.Bindable
462           node: FSB2
463           relationship: tosca.relationships.network.BindsTo
464     FSB1:
465       type: org.openecomp.resource.vfc.nodes.heat.nova.Server
466       properties:
467         flavor:
468           get_input: fsb1-flavor
469         availability_zone:
470           get_input: fsb_zone
471         metadata:
472           write_files:
473           - path: /etc/sysconfig/network-scripts/ifcfg-eth0
474             permissions: '0644'
475             content:
476               str_replace:
477                 template:
478                   get_artifact:
479                   - SELF
480                   - nimbus-ethernet
481                 params:
482                   $dev: eth0
483                   $netmask:
484                     get_input: cps_net_mask
485                   $ip:
486                     get_input: cps_net_ip
487           - path: /etc/sysconfig/network-scripts/ifcfg-eth1
488             permissions: '0644'
489             content:
490               str_replace:
491                 template:
492                   get_artifact:
493                   - SELF
494                   - nimbus-ethernet-gw
495                 params:
496                   $dev: eth1
497                   $netmask:
498                     get_input: oam_net_mask
499                   $gateway:
500                     get_input: oam_net_gw
501                   $ip:
502                     get_input: oam_net_ip
503         name:
504           get_input: fsb1-name
505       artifacts:
506         nimbus-ethernet-gw:
507           type: tosca.artifacts.Deployment
508           file: ../Artifacts/nimbus-ethernet-gw
509         nimbus-ethernet:
510           type: tosca.artifacts.Deployment
511           file: ../Artifacts/nimbus-ethernet
512   groups:
513     ep-jsa_net:
514       type: org.openecomp.groups.heat.HeatStack
515       properties:
516         heat_file: ../Artifacts/ep-jsa_net.yaml
517         description: |
518           Version 2.0 02-09-2016 (Authors: John Doe, user PROD)
519       members:
520       - pcm_port_1
521       - FSB1_Internal2
522       - FSB1_Internal1
523       - FSB1_OAM
524       - psm01_port_0
525       - pcm_port_0
526       - server_pcm
527       - pcrf_server_psm
528       - FSB2
529       - FSB1