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