push addional code
[sdc.git] / openecomp-be / lib / openecomp-sdc-translator-lib / openecomp-sdc-translator-core / src / test / resources / mock / heat / resources / OS_Contrail_VirtualNetwork / inputs / vmme_small.yml
1 heat_template_version: 2013-05-23
2
3 description: >
4   HOT template to create vmme 2 fsb 2 ncb 2 gbp 2 vlc
5
6 parameters:
7   fsb1-oam-ip:
8     type: string
9   fsb2-oam-ip:
10     type: string
11   vlc1-oam-ip:
12     type: string
13   vlc2-oam-ip:
14     type: string
15   Internal1_net_pool_start:
16     type: string
17   Internal1_net_pool_end:
18     type: string
19   Internal2_net_pool_start:
20     type: string
21   Internal2_net_pool_end:
22     type: string
23   Internal1_default_gateway:
24     type: string
25   Internal2_default_gateway:
26     type: string
27   Internal1_shared:
28     type: string
29   Internal1_external:
30     type: string
31   Internal1_net_name:
32     type: string
33   Internal1_subnet_name:
34     type: string
35   Internal1_ipam_name:
36     type: string
37   Internal1_cidr:
38     type: string
39   Internal1_forwarding_mode:
40     type: string
41   Internal1_dhcp:
42     type: string
43   Internal1_name:
44     type: string
45   Internal2_net_name:
46     type: string
47   Internal2_subnet_name:
48     type: string
49   Internal2_ipam_name:
50     type: string
51   Internal2_cidr:
52     type: string
53   Internal2_forwarding_mode:
54     type: string
55   Internal2_dhcp:
56     type: string
57   Internal2_name:
58     type: string
59   Internal2_shared:
60     type: string
61   Internal2_external:
62     type: string
63   vlc1-sctp-a-ip:
64     type: string
65   vlc1-sctp-b-ip:
66     type: string
67   vlc1-gtp-ip:
68     type: string
69   vlc2-sctp-a-ip:
70     type: string
71   vlc2-sctp-b-ip:
72     type: string
73   vlc2-gtp-ip:
74     type: string
75   fsb1-name:
76     type: string
77     description: Name of fsb1
78   fsb2-name:
79     type: string
80     description: Name of fsb1
81   ncb1-name:
82     type: string
83     description: Name of ncb1
84   ncb2-name:
85     type: string
86     description: Name of ncb2
87   vlc1-name:
88     type: string
89     description: Name of vlc1
90   vlc2-name:
91     type: string
92     description: Name of vlc2
93   gpb1-name:
94     type: string
95     description: Name of gpb1
96   gpb2-name:
97     type: string
98     description: Name of gpb2
99   fsb_zone:
100     type: string
101     description: cluster for spawnning fsb instances
102   fsb1-image:
103     type: string
104     description: Name of image to use for server fsb1
105   fsb1-flavor:
106     type: string
107     description: Flavor to use for servers  fsb1
108   oam_net_id:
109     type: string
110     description: uuid of oam network
111   fsb1-Internal1-mac:
112     type: string
113     description: static mac address assigned to fsb1-Internal1
114   fsb1-Internal2-mac:
115     type: string
116     description: static mac address assigned to fsb1-Internal2
117   fsb2-image:
118     type: string
119     description: Name of image to use for server fsb2
120   fsb2-flavor:
121     type: string
122     description: Flavor to use for servers  fsb2
123   fsb2-Internal1-mac:
124     type: string
125     description: static mac address assigned to fsb2-Internal1
126   fsb2-Internal2-mac:
127     type: string
128     description: static mac address assigned to fsb2-Internal2
129   pxe-image:
130     type: string
131     description: Name of image to use for server ncb
132   ncb-flavor:
133     type: string
134     description: Flavor to use for servers ncb
135   ncb_zone:
136     type: string
137     description: cluster for spawnning ncb instances
138   ncb1-Internal1-mac:
139     type: string
140     description: static mac address assigned to ncb1-Internal1
141   ncb1-Internal2-mac:
142     type: string
143     description: static mac address assigned to ncb1-Internal2
144   ncb2-Internal1-mac:
145     type: string
146     description: static mac address assigned to ncb2-Internal1
147   ncb2-Internal2-mac:
148     type: string
149     description: static mac address assigned to ncb2-Internal2
150   gpb-flavor:
151     type: string
152     description: Flavor to use for servers gpb
153   gpb_zone:
154     type: string
155     description: cluster for spawnning gpb instances
156   gpb1-Internal1-ip:
157     type: string
158   gpb1-Internal1-mac:
159     type: string
160     description: static mac address assigned to gpb1-Internal1
161   gpb1-Internal2-mac:
162     type: string
163     description: static mac address assigned to gpb1-Internal2
164   gpb2-Internal1-mac:
165     type: string
166     description: static mac address assigned to gpb2-Internal1
167   gpb2-Internal2-mac:
168     type: string
169     description: static mac address assigned to gpb2-Internal2
170   vlc-flavor:
171     type: string
172     description: Flavor to use for servers vlc
173   vlc_zone:
174     type: string
175     description: cluster for spawnning vlc instances
176   vlc1-Internal1-mac:
177     type: string
178     description: static mac address assigned to vlc1-Internal1
179   vlc1-Internal2-mac:
180     type: string
181     description: static mac address assigned to vlc1-Internal2
182   vlc2-Internal1-mac:
183     type: string
184     description: static mac address assigned to vlc2-Internal1
185   vlc2-Internal2-mac:
186     type: string
187     description: static mac address assigned to vlc2-Internal2
188   epc-sctp-a-net-name:
189     type: string
190     description: epc-sctp-a net name
191   epc-sctp-a-net-rt:
192     type: string
193     description: epc-sctp-a route target
194   epc-sctp-a-net-cidr:
195     type: string
196     description: epc-sctp-a subnet
197   epc-sctp-a-net-gateway:
198     type: string
199     description: epc-sctp-a-net network gateway
200   epc-sctp-a-pool-start:
201     type: string
202     description: epc-sctp-a-net network ip pool start IP address
203   epc-sctp-a-pool-end:
204     type: string
205     description: epc-sctp-a-net network ip pool end IP address
206   epc-sctp-b-net-name:
207     type: string
208     description: epc-sctp-b net name
209   epc-sctp-b-net-rt:
210     type: string
211     description: epc-sctp-b route target
212   epc-sctp-b-net-cidr:
213     type: string
214     description: epc-sctp-b subnet
215   epc-sctp-b-net-gateway:
216     type: string
217     description: epc-sctp-b-net network gateway
218   epc-sctp-b-pool-start:
219     type: string
220     description: epc-sctp-b-net network ip pool start IP address
221   epc-sctp-b-pool-end:
222     type: string
223     description: epc-sctp-b-net network ip pool end IP address
224   epc-gtp-net-name:
225     type: string
226     description:  gtp net name
227   epc-gtp-net-rt:
228     type: string
229     description:  gtp route target
230   epc-gtp-net-cidr:
231     type: string
232     description:  gtp stubnet
233   epc-gtp-net-gateway:
234     type: string
235     description:  gtp network gateway
236   epc-gtp-pool-start:
237     type: string
238     description:  gtp network ip pool start IP address
239   epc-gtp-pool-end:
240     type: string
241     description: gtp network ip pool end IP address
242   static_prefix_sctp_a_1:
243     type: string
244     description: Static Prefix
245   static_prefix_sctp_b_1:
246     type: string
247     description: Static Prefix
248   static_prefix_gtp_1:
249     type: string
250     description: Static Prefix
251   VMME_FSB1_boot_volume:
252     type: string
253   VMME_FSB2_boot_volume:
254     type: string
255   volume_type:
256     type: string
257     description: volume
258   volume_size:
259     type: string
260     description: volume
261   FSB1_volume_name:
262     type: string
263     description: volume name
264   FSB_1_image:
265     type: string
266     description: image name
267   FSB2_volume_name:
268       type: string
269       description: volume name
270   FSB_2_image:
271     type: string
272     description: image name
273   my_instance:
274     type: string
275     description: instance
276   Internal1-net:
277     type: string
278     description: net
279
280 resources:
281   FSB1_volume:
282     type: OS::Cinder::Volume
283     properties:
284       size: 3
285       volume_type: {get_param: volume_type}
286       name: {get_param: FSB1_volume_name}
287       image: {get_param: FSB_1_image}
288
289   FSB2_volume:
290       type: OS::Cinder::Volume
291       properties:
292         size: {get_param: volume_size}
293         volume_type: {get_param: volume_type}
294         name: {get_param: FSB2_volume_name}
295         image: {get_param: FSB_2_image}
296
297   Internal1_ipam:
298     type: OS::Contrail::NetworkIpam
299     properties:
300       name: { get_param: Internal1_ipam_name }
301
302   Internal2_ipam:
303     type: OS::Contrail::NetworkIpam
304     properties:
305       name: { get_param: Internal2_ipam_name }
306
307   Internal1-net:
308     type: OS::Contrail::VirtualNetwork
309     properties:
310       name: { get_param: Internal1_net_name }
311       forwarding_mode: { get_param: Internal1_forwarding_mode }
312       shared: { get_param: Internal1_shared }
313       external: true
314       route_targets: { get_file: 'file:///nimbus-ethernet.sh' }
315   testConvertGetParamFunctions:
316     type: OS::Contrail::VirtualNetwork
317     properties:
318       name: { get_param: Internal1_net_name }
319       forwarding_mode: { get_param: Internal1_forwarding_mode }
320       shared: { get_param: Internal1_shared }
321       external: { get_param: [my_instance, networks, private, 0] }
322 #      route_targets: { "Fn::Split" : [ ",", Ref: route_targets ] }
323   testConvertGetAttributeFunctions:
324     type: OS::Contrail::VirtualNetwork
325     properties:
326       name: { get_param: Internal1_net_name }
327       forwarding_mode: { get_param: Internal1_forwarding_mode }
328       shared: { get_param: Internal1_shared }
329       external: { get_param: Internal1_external }
330 #      route_targets: { "Fn::Split" : [ ",", Ref: route_targets ] }
331
332   Internal1-subnet:
333     type: OS::Neutron::Subnet
334     properties:
335       network_id: { get_resource: Internal1-net }
336       cidr: { get_param: Internal1_cidr }
337       gateway_ip: { get_param: Internal1_default_gateway }
338       enable_dhcp: { get_param: Internal1_dhcp }
339
340   Internal3-subnet:
341     type: OS::Neutron::Subnet
342     properties:
343       network_id: { get_resource: Internal1-net }
344       cidr: { get_param: Internal2_cidr }
345       gateway_ip: { get_param: Internal2_default_gateway }
346       enable_dhcp: { get_param: Internal2_dhcp }
347
348   Internal4-subnet:
349     type: OS::Neutron::Subnet
350     properties:
351       network_id: { get_resource: Internal1-net }
352       cidr: { get_param: Internal1_cidr }
353       gateway_ip: { get_param: Internal1_default_gateway }
354       enable_dhcp: off
355
356 #  Internal1-subnet:
357 #    type: OS::Contrail::VnSubnet
358 #    properties:
359 #      name: { get_param: Internal1_subnet_name  }
360 #      network: { get_resource: Internal1-net }
361 #      ip_prefix: { get_param: Internal1_cidr }
362  #     ipam: { get_resource: Internal1_ipam }
363  #     enable_dhcp: { get_param: Internal1_dhcp }
364  #     default_gateway: { get_param: Internal1_default_gateway }
365  #     allocation_pools:
366   #      - start: { get_param: Internal1_net_pool_start }
367   #        end: { get_param: Internal1_net_pool_end }
368
369
370
371   Internal2-net:
372     type: OS::Contrail::VirtualNetwork
373     properties:
374       name: { get_param: Internal2_name }
375       forwarding_mode: { get_param: Internal2_forwarding_mode }
376       shared: { get_param: Internal2_shared }
377       external: { get_param: Internal2_external }
378 #      route_targets: { "Fn::Split" : [ ",", Ref: route_targets ] }
379
380 #  Internal2-subnet:
381 #    type: OS::Contrail::VnSubnet
382 #    properties:
383 #      name: { get_param: Internal2_subnet_name  }
384 #      network: { get_resource: Internal2-net }
385 #      ip_prefix: { get_param: Internal2_cidr }
386 #      ipam: { get_resource: Internal2_ipam }
387 #      enable_dhcp: { get_param: Internal2_dhcp }
388 #      default_gateway: { get_param: Internal2_default_gateway }
389 #      allocation_pools:
390 #        - start: { get_param: Internal2_net_pool_start }
391 #          end: { get_param: Internal2_net_pool_end }
392
393   Internal2-subnet:
394     type: OS::Neutron::Subnet
395     properties:
396       network_id: { get_resource: Internal2-net }
397       cidr: { get_param: Internal2_cidr }
398       gateway_ip: { get_param: Internal2_default_gateway }
399       enable_dhcp: { get_param: Internal2_dhcp }
400
401   epc-sctp-a-net:
402     type: OS::Contrail::VirtualNetwork
403     properties:
404       name: { get_param: epc-sctp-a-net-name }
405       route_targets: [ get_param: epc-sctp-a-net-rt ]
406
407
408   epc-sctp-a-subnet:
409     type: OS::Neutron::Subnet
410     properties:
411       network_id: { get_resource: epc-sctp-a-net }
412       cidr: { get_param: epc-sctp-a-net-cidr }
413       gateway_ip: { get_param: epc-sctp-a-net-gateway }
414       allocation_pools:
415         - start: { get_param: epc-sctp-a-pool-start }
416           end: { get_param: epc-sctp-a-pool-end }
417
418   epc-sctp-b-net:
419     type: OS::Contrail::VirtualNetwork
420     properties:
421       name: { get_param: epc-sctp-b-net-name }
422       route_targets: [ get_param: epc-sctp-b-net-rt ]
423
424   epc-sctp-b-subnet:
425     type: OS::Neutron::Subnet
426     properties:
427       network_id: { get_resource: epc-sctp-b-net }
428       cidr: { get_param: epc-sctp-b-net-cidr }
429       gateway_ip: { get_param: epc-sctp-b-net-gateway }
430       allocation_pools:
431         - start: { get_param: epc-sctp-b-pool-start }
432           end: { get_param: epc-sctp-b-pool-end }
433
434   epc-gtp-net:
435     type: OS::Contrail::VirtualNetwork
436     properties:
437       name: { get_param: epc-gtp-net-name }
438       route_targets: [ get_param: epc-gtp-net-rt ]
439
440   epc-gtp-subnet:
441     type: OS::Neutron::Subnet
442     properties:
443       network_id: { get_resource: epc-gtp-net }
444       cidr: { get_param: epc-gtp-net-cidr }
445       gateway_ip: { get_param: epc-gtp-net-gateway }
446       allocation_pools:
447         - start: { get_param: epc-gtp-pool-start }
448           end: { get_param: epc-gtp-pool-end }
449
450   FSB1:
451     type: OS::Nova::Server
452     properties:
453       name: { get_param: fsb1-name }
454       block_device_mapping: [{device_name: "vda", volume_id : {get_param: VMME_FSB1_boot_volume }, delete_on_termination: "false" }]
455       flavor: { get_param: fsb1-flavor }
456       availability_zone: { get_param: fsb_zone }
457       networks:
458         - port: { get_resource: FSB1_Internal1 }
459         - port: { get_resource: FSB1_Internal2 }
460         - port: { get_resource: FSB1_OAM }
461
462   FSB1_Internal1:
463     type: OS::Neutron::Port
464     properties:
465       network: { get_resource: Internal1-net }
466       mac_address: { get_param: fsb1-Internal1-mac }
467
468   FSB1_Internal2:
469     type: OS::Neutron::Port
470     properties:
471       network: { get_resource: Internal2-net }
472       mac_address: { get_param: fsb1-Internal2-mac }
473
474   FSB1_OAM:
475     type: OS::Neutron::Port
476     properties:
477       network: { get_param: oam_net_id }
478       fixed_ips:
479         - ip_address: { get_param: fsb1-oam-ip }
480
481   FSB2:
482     type: OS::Nova::Server
483     properties:
484       name: { get_param: fsb2-name }
485       block_device_mapping: [{device_name: "vda", volume_id : {get_param: VMME_FSB2_boot_volume }, delete_on_termination: "false" }]
486       flavor: { get_param: fsb2-flavor }
487       availability_zone: { get_param: fsb_zone }
488       networks:
489         - port: { get_resource: FSB2_Internal1 }
490         - port: { get_resource: FSB2_Internal2 }
491         - port: { get_resource: FSB2_OAM }
492
493   FSB2_Internal1:
494     type: OS::Neutron::Port
495     properties:
496       network: { get_resource: Internal1-net }
497       mac_address: { get_param: fsb2-Internal1-mac }
498
499
500   FSB2_Internal2:
501     type: OS::Neutron::Port
502     properties:
503       network: { get_resource: Internal2-net }
504       mac_address: { get_param: fsb2-Internal2-mac }
505
506   FSB2_OAM:
507     type: OS::Neutron::Port
508     properties:
509       network: { get_param: oam_net_id }
510       fixed_ips:
511         - ip_address: { get_param: fsb2-oam-ip }
512
513   NCB1:
514     type: OS::Nova::Server
515     properties:
516       name: { get_param: ncb1-name }
517       image: { get_param: pxe-image }
518       flavor: { get_param: ncb-flavor }
519       availability_zone: { get_param: ncb_zone }
520       networks:
521         - port: { get_resource: NCB1_Internal1 }
522         - port: { get_resource: NCB1_Internal2 }
523
524   NCB1_Internal1:
525     type: OS::Neutron::Port
526     properties:
527       network: { get_resource: Internal1-net }
528       mac_address: { get_param: ncb1-Internal1-mac }
529
530   NCB1_Internal2:
531     type: OS::Neutron::Port
532     properties:
533       network: { get_resource: Internal2-net }
534       mac_address: { get_param: ncb1-Internal2-mac }
535
536   NCB2:
537     type: OS::Nova::Server
538     properties:
539       name: { get_param: ncb2-name }
540       image: { get_param: pxe-image }
541       flavor: { get_param: ncb-flavor }
542       availability_zone: { get_param: ncb_zone }
543       networks:
544         - port: { get_resource: NCB2_Internal1 }
545         - port: { get_resource: NCB2_Internal2 }
546
547   NCB2_Internal1:
548     type: OS::Neutron::Port
549     properties:
550       network: { get_resource: Internal1-net }
551       mac_address: { get_param: ncb2-Internal1-mac }
552
553   NCB2_Internal2:
554     type: OS::Neutron::Port
555     properties:
556       network: { get_resource: Internal2-net }
557       mac_address: { get_param: ncb2-Internal2-mac }
558
559   GPB1:
560     type: OS::Nova::Server
561     properties:
562       name: { get_param: gpb1-name }
563       image: { get_param: pxe-image }
564       flavor: { get_param: gpb-flavor }
565       availability_zone: { get_param: gpb_zone }
566       networks:
567         - port: { get_resource: GPB1_Internal1 }
568         - port: { get_resource: GPB1_Internal2 }
569
570   GPB1_Internal1:
571     type: OS::Neutron::Port
572     properties:
573       network: { get_resource: Internal1-net }
574       mac_address: { get_param: gpb1-Internal1-mac }
575
576   GPB1_Internal2:
577     type: OS::Neutron::Port
578     properties:
579       network: { get_resource: Internal2-net }
580       mac_address: { get_param: gpb1-Internal2-mac }
581
582   GPB2:
583     type: OS::Nova::Server
584     properties:
585       name: { get_param: gpb2-name }
586       image: { get_param: pxe-image }
587       flavor: { get_param: gpb-flavor }
588       availability_zone: { get_param: gpb_zone }
589       networks:
590         - port: { get_resource: GPB2_Internal1 }
591         - port: { get_resource: GPB2_Internal2 }
592
593   GPB2_Internal1:
594     type: OS::Neutron::Port
595     properties:
596       network: { get_resource: Internal1-net }
597       mac_address: { get_param: gpb2-Internal1-mac }
598
599   GPB2_Internal2:
600     type: OS::Neutron::Port
601     properties:
602       network: { get_resource: Internal2-net }
603       mac_address: { get_param: gpb2-Internal2-mac }
604
605   VLC1:
606     type: OS::Nova::Server
607     properties:
608       name: { get_param: vlc1-name }
609       image: { get_param: pxe-image }
610       flavor: { get_param: vlc-flavor }
611       availability_zone: { get_param: vlc_zone }
612       networks:
613         - port: { get_resource: VLC1_Internal1 }
614         - port: { get_resource: VLC1_Internal2 }
615         - port: { get_resource: VLC1_OAM }
616         - port: { get_resource: VLC1_SCTP_A }
617         - port: { get_resource: VLC1_SCTP_B }
618         - port: { get_resource: VLC1_GTP }
619
620   VLC1_Internal1:
621     type: OS::Neutron::Port
622     properties:
623       network: { get_resource: Internal1-net }
624       mac_address: { get_param: vlc1-Internal1-mac }
625
626   VLC1_Internal2:
627     type: OS::Neutron::Port
628     properties:
629       network: { get_resource: Internal2-net }
630       mac_address: { get_param: vlc1-Internal2-mac }
631
632   VLC1_OAM:
633     type: OS::Neutron::Port
634     properties:
635       network: { get_param: oam_net_id }
636       fixed_ips:
637         - ip_address: { get_param: vlc1-oam-ip }
638
639   VLC1_SCTP_A:
640     type: OS::Neutron::Port
641     properties:
642       network: { get_resource: epc-sctp-a-net }
643       fixed_ips:
644         - ip_address: { get_param: vlc1-sctp-a-ip }
645
646   VLC1_SCTP_B:
647     type: OS::Neutron::Port
648     properties:
649       network: { get_resource: epc-sctp-b-net }
650       fixed_ips:
651         - ip_address: { get_param: vlc1-sctp-b-ip }
652
653   VLC1_GTP:
654     type: OS::Neutron::Port
655     properties:
656       network: { get_resource: epc-gtp-net }
657       fixed_ips:
658         - ip_address: { get_param: vlc1-gtp-ip }
659
660   VLC2:
661     type: OS::Nova::Server
662     properties:
663       name: { get_param: vlc2-name }
664       image: { get_param: pxe-image }
665       flavor: { get_param: vlc-flavor }
666       availability_zone: { get_param: vlc_zone }
667       networks:
668         - port: { get_resource: VLC2_Internal1 }
669         - port: { get_resource: VLC2_Internal2 }
670         - port: { get_resource: VLC2_OAM }
671         - port: { get_resource: VLC2_SCTP_A }
672         - port: { get_resource: VLC2_SCTP_B }
673         - port: { get_resource: VLC2_GTP }
674
675
676   VLC2_Internal1:
677     type: OS::Neutron::Port
678     properties:
679       network: { get_resource: Internal1-net }
680       mac_address: { get_param: vlc2-Internal1-mac }
681
682   VLC2_OAM:
683     type: OS::Neutron::Port
684     properties:
685       network: { get_param: oam_net_id }
686       fixed_ips:
687         - ip_address: { get_param: vlc2-oam-ip }
688
689   VLC2_Internal2:
690     type: OS::Neutron::Port
691     properties:
692       network: { get_resource: Internal2-net }
693       mac_address: { get_param: vlc2-Internal2-mac }
694
695   VLC2_SCTP_A:
696     type: OS::Neutron::Port
697     properties:
698       network: { get_resource: epc-sctp-a-net }
699       fixed_ips:
700         - ip_address: { get_param: vlc2-sctp-a-ip }
701
702   VLC2_SCTP_B:
703     type: OS::Neutron::Port
704     properties:
705       network: { get_resource: epc-sctp-b-net }
706       fixed_ips:
707         - ip_address: { get_param: vlc2-sctp-b-ip }
708
709   VLC2_GTP:
710     type: OS::Neutron::Port
711     properties:
712       network: { get_resource: epc-gtp-net }
713       fixed_ips:
714         - ip_address: { get_param: vlc2-gtp-ip }
715
716   Test-empty-network-in-subnet:
717     type: OS::Neutron::Subnet
718     properties:
719       network_id: { get_param: Internal1-net }
720       cidr: { get_param: Internal1_cidr }
721       gateway_ip: { get_param: Internal1_default_gateway }
722       enable_dhcp: { get_param: Internal1_dhcp }