push addional code
[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   NeutronPortGlobalTypes:
6     file: NeutronPortGlobalTypesServiceTemplate.yaml
7   NeutronNetGlobalTypes:
8     file: NeutronNetGlobalTypesServiceTemplate.yaml
9   CommonGlobalTypes:
10     file: CommonGlobalTypesServiceTemplate.yaml
11   CinderVolumeGlobalTypes:
12     file: CinderVolumeGlobalTypesServiceTemplate.yaml
13   ContrailNetworkRuleGlobalType:
14     file: ContrailNetworkRuleGlobalTypeServiceTemplate.yaml
15   NeutronSecurityRulesGlobalTypes:
16     file: NeutronSecurityRulesGlobalTypesServiceTemplate.yaml
17   NovaServerGlobalTypes:
18     file: NovaServerGlobalTypesServiceTemplate.yaml
19   ContrailVirtualNetworkGlobalType:
20     file: ContrailVirtualNetworkGlobalTypeServiceTemplate.yaml
21   AbstractSubstituteGlobalTypes:
22     file: AbstractSubstituteGlobalTypesServiceTemplate.yaml
23 node_types:
24   org.openecomp.resource.vfc.nodes.heat.pcrf_psm:
25     derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
26   org.openecomp.resource.vfc.nodes.heat.pcm:
27     derived_from: org.openecomp.resource.vfc.nodes.heat.nova.Server
28 topology_template:
29   inputs:
30     Internal2_name:
31       label: Internal2_name
32       hidden: false
33       immutable: false
34       type: string
35       description: Internal2_name
36     Internal1_shared:
37       label: Internal1_shared
38       hidden: false
39       immutable: false
40       type: string
41       description: Internal1_shared
42     FSB1_volume_name:
43       label: FSB1_volume
44       hidden: false
45       immutable: false
46       type: string
47       description: FSB1_volume_1
48     jsa_cidr:
49       label: jsa_cidr
50       hidden: false
51       immutable: false
52       type: string
53       description: jsa_cidr
54       default: 107.243.7.128/26
55     availabilityzone_name:
56       label: availabilityzone_name
57       hidden: false
58       immutable: false
59       type: string
60       description: availabilityzone_name
61     fsb1-name:
62       label: FSB1_name
63       hidden: false
64       immutable: false
65       type: string
66       description: FSB1_name
67     pcm_image_name:
68       label: pcm_image_name
69       hidden: false
70       immutable: false
71       type: string
72       description: pcm_image_name
73     Internal2_external:
74       label: Internal2_external
75       hidden: false
76       immutable: false
77       type: string
78       description: Internal2_external
79     Internal2_forwarding_mode:
80       label: Internal2_forwarding_mode
81       hidden: false
82       immutable: false
83       type: string
84       description: Internal2_forwarding_mode
85     pcrf_psm_flavor_name:
86       label: pcrf_psm_flavor_name
87       hidden: false
88       immutable: false
89       type: string
90       description: pcrf_psm_flavor_name
91     pcrf_psm_image_name:
92       label: pcrf_psm_image_name
93       hidden: false
94       immutable: false
95       type: string
96       description: pcrf_psm_image_name
97     FSB_1_image:
98       label: MME_FSB1
99       hidden: false
100       immutable: false
101       type: string
102       description: MME_FSB1_15B-CP04-r5a01
103     volume_size:
104       label: volume size
105       hidden: false
106       immutable: false
107       type: float
108       description: my volume size 320GB
109     fsb1-Internal1-mac:
110       label: FSB1_internal_mac
111       hidden: false
112       immutable: false
113       type: string
114       description: FSB1_internal_mac
115     Internal2_shared:
116       label: Internal2_shared
117       hidden: false
118       immutable: false
119       type: string
120       description: Internal2_shared
121     pcm_server_name:
122       label: pcm_server_name
123       hidden: false
124       immutable: false
125       type: string
126       description: pcm_server_name
127     Internal1_net_name:
128       label: Internal1_net_name
129       hidden: false
130       immutable: false
131       type: string
132       description: Internal1_net_name
133     oam_net_name:
134       label: oam_net_name
135       hidden: false
136       immutable: false
137       type: string
138       description: oam_net_name
139     fsb1-flavor:
140       label: FSB1_flavor
141       hidden: false
142       immutable: false
143       type: string
144       description: FSB1_flavor
145     fsb1-Internal2-mac:
146       label: FSB1_internal_mac
147       hidden: false
148       immutable: false
149       type: string
150       description: FSB1_internal_mac
151     volume_type:
152       label: volume type
153       hidden: false
154       immutable: false
155       type: string
156       description: volume type Gold
157     fsb1-zone:
158       label: FSB1_zone
159       hidden: false
160       immutable: false
161       type: string
162       description: FSB1_zone
163     fsb_zone:
164       label: FSB1_zone
165       hidden: false
166       immutable: false
167       type: string
168       description: FSB1_zone
169     security_group_name:
170       hidden: false
171       immutable: false
172       type: list
173       description: CMAUI1, CMAUI2 server names
174       entry_schema:
175         type: String
176     jsa_net_name:
177       label: jsa_net_name
178       hidden: false
179       immutable: false
180       type: string
181       description: jsa_net_name
182       default: jsa_log_net_0
183     pcrf_psm_server_name:
184       label: pcrf_psm_server_name
185       hidden: false
186       immutable: false
187       type: string
188       description: pcrf_psm_server_name
189     pcm_flavor_name:
190       label: pcm_flavor_name
191       hidden: false
192       immutable: false
193       type: string
194       description: pcm_flavor_name
195     oam_net_id:
196       label: oam_net_id
197       hidden: false
198       immutable: false
199       type: string
200       description: oam_net_id
201     fsb2-Internal1-mac:
202       label: FSB1_internal_mac
203       hidden: false
204       immutable: false
205       type: string
206       description: FSB1_internal_mac
207     Internal1_forwarding_mode:
208       label: Internal1_forwarding_mode
209       hidden: false
210       immutable: false
211       type: string
212       description: Internal1_forwarding_mode
213     pcrf_cps_net_name:
214       label: pcrf_cps_net_name
215       hidden: false
216       immutable: false
217       type: string
218       description: pcrf_cps_net_name
219     cps_net_name:
220       label: cps_net_name
221       hidden: false
222       immutable: false
223       type: string
224       description: cps_net_name
225     pcrf_security_group_name:
226       hidden: false
227       immutable: false
228       type: list
229       description: CMAUI1, CMAUI2 server names
230       entry_schema:
231         type: String
232     Internal1_external:
233       label: Internal1_external
234       hidden: false
235       immutable: false
236       type: string
237       description: Internal1_external
238   node_templates:
239     pcm_vol_02:
240       type: org.openecomp.resource.vfc.nodes.heat.cinder.Volume
241       properties:
242         image:
243           get_input: FSB_1_image
244         volume_type:
245           get_input: volume_type
246         size: '(get_input : volume_size) * 1024'
247         read_only: true
248         name:
249           get_input: FSB1_volume_name
250     Internal2-net:
251       type: org.openecomp.resource.vl.nodes.heat.network.contrail.VirtualNetwork
252       properties:
253         shared:
254           get_input: Internal2_shared
255         forwarding_mode:
256           get_input: Internal2_forwarding_mode
257         external:
258           get_input: Internal2_external
259         network_name:
260           get_input: Internal2_name
261     pcm_port_1:
262       type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
263       properties:
264         security_groups:
265         - get_input: security_group_name
266         fixed_ips:
267         - ip_address:
268             get_input: oam_net_ip
269         network:
270           get_input: oam_net_name
271       requirements:
272       - binding:
273           capability: tosca.capabilities.network.Bindable
274           node: server_pcm
275           relationship: tosca.relationships.network.BindsTo
276     server_VolumeTest_snapshot02:
277       type: org.openecomp.resource.vfc.nodes.heat.cinder.Volume
278       properties:
279         snapshot_id:
280           get_input: snapshot02
281     FSB1_Internal2_port:
282       type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
283       properties:
284         mac_address:
285           get_input: fsb1-Internal2-mac
286         network: Internal2-net
287       requirements:
288       - link:
289           capability: tosca.capabilities.network.Linkable
290           node: Internal2-net
291           relationship: tosca.relationships.network.LinksTo
292       - binding:
293           capability: tosca.capabilities.network.Bindable
294           node: FSB1
295           relationship: tosca.relationships.network.BindsTo
296     server_VolumeTest_snapshot01:
297       type: org.openecomp.resource.vfc.nodes.heat.cinder.Volume
298       properties:
299         snapshot_id:
300           get_input: snapshot01
301     FSB1_Internal1_port:
302       type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
303       properties:
304         mac_address:
305           get_input: fsb1-Internal1-mac
306         network: Internal1-net
307       requirements:
308       - link:
309           capability: tosca.capabilities.network.Linkable
310           node: Internal1-net
311           relationship: tosca.relationships.network.LinksTo
312       - binding:
313           capability: tosca.capabilities.network.Bindable
314           node: FSB1
315           relationship: tosca.relationships.network.BindsTo
316     FSB1_OAM_Port:
317       type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
318       properties:
319         fixed_ips:
320         - ip_address:
321             get_input: fsb1-oam-ip
322         network:
323           get_input: oam_net_id
324       requirements:
325       - binding:
326           capability: tosca.capabilities.network.Bindable
327           node: FSB1
328           relationship: tosca.relationships.network.BindsTo
329     psm01_port_0:
330       type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
331       properties:
332         security_groups:
333         - get_input: pcrf_security_group_name
334         fixed_ips:
335         - ip_address:
336             get_input: pcrf_cps_net_ip
337         network:
338           get_input: pcrf_cps_net_name
339       requirements:
340       - binding:
341           capability: tosca.capabilities.network.Bindable
342           node: pcrf_server_psm
343           relationship: tosca.relationships.network.BindsTo
344     pcm_port_0:
345       type: org.openecomp.resource.cp.nodes.heat.network.neutron.Port
346       properties:
347         security_groups:
348         - get_input: security_group_name
349         fixed_ips:
350         - ip_address:
351             get_input: cps_net_ip
352         network:
353           get_input: cps_net_name
354       requirements:
355       - binding:
356           capability: tosca.capabilities.network.Bindable
357           node: server_pcm
358           relationship: tosca.relationships.network.BindsTo
359     network:
360       type: org.openecomp.resource.vl.nodes.heat.network.contrail.VirtualNetwork
361       properties:
362         network_name:
363           get_input: Internal1_net_name
364     server_pcm:
365       type: org.openecomp.resource.vfc.nodes.heat.pcm
366       properties:
367         flavor:
368           get_input: pcm_flavor_name
369         availability_zone:
370           get_input: availabilityzone_name
371         image:
372           get_input: pcm_image_name
373         config_drive: 'True'
374         user_data_format: RAW
375         name:
376           get_input: pcm_server_name
377         user_data: UNSUPPORTED_RESOURCE_server_init
378     Internal1-net:
379       type: org.openecomp.resource.vl.nodes.heat.network.contrail.VirtualNetwork
380       properties:
381         shared:
382           get_input: Internal1_shared
383         forwarding_mode:
384           get_input: Internal1_forwarding_mode
385         external:
386           get_input: Internal1_external
387         network_name:
388           get_input: Internal1_net_name
389     pcrf_server_psm:
390       type: org.openecomp.resource.vfc.nodes.heat.pcrf_psm
391       properties:
392         flavor:
393           get_input: pcrf_psm_flavor_name
394         availability_zone:
395           get_input: availabilityzone_name
396         image:
397           get_input: pcrf_psm_image_name
398         config_drive: 'True'
399         metadata:
400           vnf_id:
401             get_input: pcrf_vnf_id
402         user_data_format: RAW
403         name:
404           get_input: pcrf_psm_server_name
405         user_data: UNSUPPORTED_RESOURCE_pcrf_server_init
406     FSB1:
407       type: org.openecomp.resource.vfc.nodes.heat.nova.Server
408       properties:
409         flavor:
410           get_input: fsb1-flavor
411         availability_zone:
412           get_input: fsb_zone
413         metadata:
414           write_files:
415           - path: /etc/sysconfig/network-scripts/ifcfg-eth0
416             permissions: '0644'
417             content:
418               str_replace:
419                 template:
420                   get_artifact:
421                   - SELF
422                   - nimbus-ethernet
423                 params:
424                   $dev: eth0
425                   $netmask:
426                     get_input: cps_net_mask
427                   $ip:
428                     get_input: cps_net_ip
429           - path: /etc/sysconfig/network-scripts/ifcfg-eth1
430             permissions: '0644'
431             content:
432               str_replace:
433                 template:
434                   get_artifact:
435                   - SELF
436                   - nimbus-ethernet-gw
437                 params:
438                   $dev: eth1
439                   $netmask:
440                     get_input: oam_net_mask
441                   $gateway:
442                     get_input: oam_net_gw
443                   $ip:
444                     get_input: oam_net_ip
445         name:
446           get_input: fsb1-name
447       artifacts:
448         nimbus-ethernet-gw:
449           type: tosca.artifacts.Deployment
450           file: ../Artifacts/nimbus-ethernet-gw
451         nimbus-ethernet:
452           type: tosca.artifacts.Deployment
453           file: ../Artifacts/nimbus-ethernet
454   groups:
455     ep-jsa_net:
456       type: org.openecomp.groups.heat.HeatStack
457       properties:
458         heat_file: ../Artifacts/ep-jsa_net.yaml
459         description: |
460           Version 2.0 02-09-2016 (Authors: John Doe, user PROD)
461       members:
462       - pcm_vol_02
463       - Internal2-net
464       - pcm_port_1
465       - FSB1_Internal2_port
466       - FSB1_Internal1_port
467       - FSB1_OAM_Port
468       - psm01_port_0
469       - pcm_port_0
470       - server_pcm
471       - Internal1-net
472       - pcrf_server_psm
473       - FSB1