summaryrefslogtreecommitdiffstats
path: root/asdc-controller/src/test/resources/resource-examples/mixed.yaml
blob: 9dc4a4208fb0e77598f1a2f593228faa184cf228 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
heat_template_version: 2013-05-23

description: >
  HOT template that creates internal networks, load balancers and servers for vMMSC.

parameters:
  oam_net_name:
    type: string
    description: UID of OAM network
  oam_network_netmask:
    type: string
    label: oam network netmask
    description: oam network gateway
  oam_network_gateway:
    type: string
    label: oam network gateway
    description: oam network gateway
  oam_network_route_1:
    type: string
    label: oam network route 1
    description: oam network route 1
  oam_network_route_2:
    type: string
    label: oam network route 2
    description:  oam network route 2
  external_dns:
    type: string
    label: dns server
    description: dns server for MMSC
  external_ntp:
    type: string
    label: ntp server 
    description: ntp server for MMSC
  lb1_oam_net_ip:
    type: string
    label: management network ip for mmsc
    description: the ip of the management network for mmsc
  lb2_oam_net_ip:
    type: string
    label: management network ip for mmsc
    description: the ip of the management network for mmsc
  dmz_protected_net:
    type: string
    description: UID of dmz_protected network
  dmz_protected_net_local_ip1:
    type: string
    label: mmsc dmz protected network local ip1
    description: the local ip1 of the mmsc dmz protected network
  dmz_protected_net_local_ip2:
    type: string
    label: mmsc dmz protected network local ip2
    description: the local ip2 of the mmsc dmz protected network
  dmz_protected_net_floating_ip:
    type: string
    label: mmsc dmz protected floating ip
    description: mmsc dmz direct floating ip
  cor_direct_net:
    type: string
    label: cor direct net UID
    description: cor direct net
  cor_direct_net_local_ip1:
    type: string  
    label: mmsc cor direct network local ip1
    description: the local ip1 of the mmsc cor direct network
  cor_direct_net_local_ip2:
    type: string
    label: mmsc cor direct network local ip2
    description: the local ip2 of the mmsc cor direct network
  cor_direct_net_floating_ip:
    type: string
    label: mmsc cor direct floating ip
    description: mmsc cor direct floating ip
  mms_traffic_net_name:
    type: string
    description: Name of MMS traffic network
  mms_traffic_net_cidr:
    type: string
    description: MMS traffic network address (CIDR notation)
  mms_traffic_netmask:
    type: string
    description: MMS traffic network subnet mask  
  mms_traffic_net_gateway:
    type: string
    description: MMS traffic network gateway address
  mms_traffic_start:
    type: string
    label: mmsc traffic start IP
    description: mmsc traffic start IP
  mms_traffic_end:
    type: string
    label: mmsc traffic end IP
    description: mmsc traffic end IP
  mms_traffic_net_cidr:
    type: string
    label: mmsc traffic cidr
    description: mmsc traffic cidr
  mms_traffic_net_local_ip1:
    type: string
    label: mmsc traffic network local ip1
    description: the local ip1 of the mmsc traffic network
  mms_traffic_net_local_ip2:
    type: string
    label: mmsc traffic network local ip2
    description: the local ip2 of the mmsc traffic network
  mms_traffic_net_floating_ip:
    type: string
    label: mmsc traffic floating ip
    description: mmsc traffic floating ip
  nems_internal_name:
    type: string
    label: nems internal network name
    description: nems internal network name
  nems_internal_start:
    type: string
    label: nems internal start
    description: nems internal start
  nems_internal_end:
    type: string
    label: nems internal end
    description: nems internal end
  nems_internal_cidr:
    type: string
    label: nems ineternal cidr
    description: nems internal cidr
  nems_internal_netmask:
    type: string
    description: NEMS internal network subnet mask
  nems_internal_gateway:
    type: string
    label: nems internal gw
    description: nems internal gw
  nems_traffic_name:
    type: string
    label: nems traffic name
    description: nems traffic name
  nems_traffic_start:
    type: string
    label: nems traffic start
    description: nems traffic start
  nems_traffic_end:
    type: string
    label: nems traffic end
    description: nems traffic end
  nems_traffic_cidr:
    type: string
    label: nems traffic cidr
    description: nems traffic cidr
  nems_traffic_netmask:
    type: string
    description: NEMS traffic network subnet mask
  nems_traffic_gateway:
    type: string
    description: NEMS traffic network gateway  
  nems_traffic_net_local_ip1:
    type: string
    label: nems traffic network local ip1
    description: the local ip1 of the nems traffic network
  nems_traffic_net_local_ip2:
    type: string
    label: nems traffic network local ip2
    description: the local ip2 of the nems traffic network
  nems_traffic_net_floating_ip:
    type: string
    label: nems traffic floating ip
    description: nems traffic floating ip
  nems_user_web_name:
    type: string
    label: nems user web name
    description: nems user web name
  nems_user_web_start:
    type: string
    label: nems user web start
    description: nems user web end
  nems_user_web_end:
    type: string
    label: nems user web end
    description: nems user web end
  nems_user_web_cidr:
    type: string
    label: nems user web cidr
    description: nems user web cidr
  nems_user_web_netmask:
    type: string
    description: NEMS user web network subnet mask
  nems_user_web_gateway:
    type: string
    description: NEMS user web network gateway
  nems_user_web_net_local_ip1:
    type: string
    label: nems user web network local ip1
    description: the local ip1 of the nems user web network
  nems_user_web_net_local_ip2:
    type: string
    label: nems user web network local ip2
    description: the local ip2 of the nems user web network
  nems_user_web_net_floating_ip:
    type: string
    label: nems user web floating ip
    description: nems user web floating ip 
  nems_imap_name:
    type: string
    label: nems imap name
    description: nems imap name
  nems_imap_netmask:
    type: string
    label: nems imap subnet mask
    description: nems imap subnet mask  
  nems_imap_start:
    type: string
    label: nems imap start
    description: nems imap start
  nems_imap_end:
    type: string
    label: nems imap end
    description: nems imap end
  nems_imap_cidr:
    type: string
    label: nems imap cidr
    description: nems imap cidr
  nems_imap_gateway:
    type: string
    label: nems imap gateway
    description: nems imap gateway  
  eca_traffic_name:
    type: string
    label: eca traffic name
    description: eca traffic name
  eca_traffic_start:
    type: string
    label: eca traffic start
    description: eca traffic start
  eca_traffic_end:
    type: string
    label: eca traffic end
    description: eca traffic end
  eca_traffic_cidr:
    type: string
    label: eca traffic cidr
    description: eca traffic cidr
  eca_traffic_netmask:
    type: string
    description: ECA traffic network subnet mask
  eca_traffic_net_local_ip1:
    type: string
    label: eca traffic network local ip1
    description: the local ip1 of the eca traffic network
  eca_traffic_net_local_ip2:
    type: string
    label: eca traffic network local ip2
    description: the local ip2 of the eca traffic network
  eca_traffic_net_floating_ip:
    type: string
    label: eca traffic floating ip
    description: eca traffic floating ip
  eca_mgmt_name:
    type: string
    label: eca management name
    description: eca management name
  eca_mgmt_start:
    type: string
    label: eca management start
    description: eca management start
  eca_mgmt_end:
    type: string
    label: eca management end
    description: eca management end
  eca_mgmt_cidr:
    type: string
    label: eca management cidr
    description: eca management cidr
  eca_mgmt_netmask:
    type: string
    description: ECA mgmt network subnet mask
  ha_net_name:
    type: string
    label: ha_failover network name
    description: ha_failover network name
  ha_net_start:
    type: string
    label: ha net start
    description: ha net start
  ha_net_end:
    type: string
    label: ha net end
    description: ha net end
  ha_net_cidr:
    type: string
    label: ha net cidr
    description: ha net cidr
  ha_net_local_ip1:
    type: string
    label: ha net network local ip1
    description: the local ip1 of the ha network
  ha_net_local_ip2:
    type: string
    label: ha net network local ip2
    description: the local ip2 of the ha network
  lb1_name:
    type: string
    label: MMSC load balancer instance name
    description: MMSC load balancer instance name
  lb_image_name:
    type: string
    label: MMSC load balancer image name
    description: MMSC load balancer image name
  lb_flavor_name:
    type: string
    label: Load balancer flavor name
    description: the flavor name of MMSC load balancer instance
  lb1_name:
    type: string
    label: MMSC load balancer1 instance name
    description: MMSC load balancer1 instance name
  lb2_name:
    type: string
    label: MMSC load balancer2 instance name
    description: MMSC load balancer2 instance name
  availabilityzone_name:
    type: string
    label: MMSC availabilityzone name
    description: MMSC availabilityzone name
  security_group_name:
    type: string
    label: MMSC security group name
    description: MMSC security group name
  mmsc_image:
    type: string
    description: Image for MMSC server
  mmsc_flavor:
    type: string
    description: Flavor for MMSC server
#  mmsc_cinder_volume_size:
#    type: number
#    label: MMSC Cinder volume size
#    description: the size of the MMSC Cinder volume
  nems_fe_image:
    type: string
    description: Image for NEMS FE server
  nems_fe_flavor:
    type: string
    description: Flavor for NEMS FE server
  nems_be_image:
    type: string
    description: Image for NEMS BE server
  nems_be_flavor:
    type: string
    description: Flavor for NEMS BE server
  eca_trx_image:
    type: string
    description: Image for ECA TRX server
  eca_trx_flavor:
    type: string
    description: Flavor for ECA TRX server
  eca_oam_image:
    type: string
    description: Image for ECA OAM server
  eca_oam_flavor:
    type: string
    description: Flavor for ECA OAM server
  mmsc1_name:
    type: string
    description: MMSC1 server name
  mmsc1_oam_net_ip:
    type: string
    description: OAM_net IP for MMSC1
  mmsc1_mms_traffic_net_ip:
    type: string
    description: mms_traffic_net IP for MMSC1
  mmsc2_name:
    type: string
    description: MMSC2 server name
  mmsc2_oam_net_ip:
    type: string
    description: OAM_net IP for MMSC2
  mmsc2_mms_traffic_net_ip:
    type: string
    description: mms_traffic_net IP for MMSC2
  mmsc3_name:
    type: string
    description: MMSC3 server name
  mmsc3_oam_net_ip:
    type: string
    description: OAM_net IP for MMSC3
  mmsc3_mms_traffic_net_ip:
    type: string
    description: mms_traffic_net IP for MMSC3
  mmsc4_name:
    type: string
    description: MMSC4 server name
  mmsc4_oam_net_ip:
    type: string
    description: OAM_net IP for MMSC4
  mmsc4_mms_traffic_net_ip:
    type: string
    description: mms_traffic_net IP for MMSC4
  mmsc5_name:
    type: string
    description: MMSC5 server name
  mmsc5_oam_net_ip:
    type: string
    description: OAM_net IP for MMSC5
  mmsc5_mms_traffic_net_ip:
    type: string
    description: mms_traffic_net IP for MMSC5
  nems_fe1_name:
    type: string
    description: NEMS_FE1 server name
  nems_fe1_node_role:
    type: string
    label: nems node role
    description: nems node role
  nems_fe1_oam_net_ip:
    type: string
    description: OAM_net IP for NEMS_FE1
  nems_fe1_nems_traffic_net_ip:
    type: string
    description: nems_traffic_net IP for NEMS_FE1
  nems_fe1_nems_user_web_net_ip:
    type: string
    description: nems_web_user_net IP for NEMS_FE1
  nems_fe1_nems_internal_net_ip:
    type: string
    description: nems_internal_net IP for NEMS_FE1
  nems_fe1_nems_imap_net_ip:
    type: string
    description: nems_imap_net IP for NEMS_FE1  
  nems_fe2_name:
    type: string
    description: NEMS_FE2 server name
  nems_fe2_node_role:
    type: string
    label: nems node role
    description: nems node role
  nems_fe2_oam_net_ip:
    type: string
    description: OAM_net IP for NEMS_FE2
  nems_fe2_nems_traffic_net_ip:
    type: string
    description: nems_traffic_net IP for NEMS_FE2
  nems_fe2_nems_user_web_net_ip:
    type: string
    description: nems_web_user_net IP for NEMS_FE2
  nems_fe2_nems_internal_net_ip:
    type: string
    description: nems_internal_net IP for NEMS_FE2
  nems_fe2_nems_internal_net_ip:
    type: string
    description: nems_internal_net IP for NEMS_FE2
  nems_fe2_nems_imap_net_ip:
    type: string
    description: nems_imap_net IP for NEMS_FE2  
  nems_be1_name:
    type: string
    description: NEMS_BE2 server name
  nems_be1_node_role:
    type: string
    label: nems node role
    description: nems node role
  nems_be1_oam_net_ip:
    type: string
    description: OAM_net IP for NEMS_BE1
  nems_be1_nems_internal_net_ip:
    type: string
    description: nems_internal_net IP for NEMS_BE1
  nems_be1_nems_imap_net_ip:
    type: string
    description: nems_imap_net IP for NEMS_BE1  
  nems_be2_name:
    type: string
    description: NEMS_BE2 server name
  nems_be2_node_role:
    type: string
    label: nems node role
    description: nems node role
  nems_be2_oam_net_ip:
    type: string
    description: OAM_net IP for NEMS_BE2
  nems_be2_nems_internal_net_ip:
    type: string
    description: nems_internal_net IP for NEMS_BE2
  nems_be2_nems_imap_net_ip:
    type: string
    description: nems_imap_net IP for NEMS_BE2
  eca_oam1_name:
    type: string
    description: ECA_OAM1 server name
  eca_oam1_oam_net_ip:
    type: string
    description: OAM_net IP for ECA_OAM1
  eca_oam1_eca_mgmt_net_ip:
    type: string
    description: eca_mgmt_net IP for ECA_OAM1
  eca_oam2_name:
    type: string
    description: ECA_OAM2 server name
  eca_oam2_oam_net_ip:
    type: string
    description: OAM_net IP for ECA_OAM2
  eca_oam2_eca_mgmt_net_ip:
    type: string
    description: eca_mgmt_net IP for ECA_OAM2
  eca_trx1_name:
    type: string
    description: ECA_TRX1 server name
  eca_trx1_oam_net_ip:
    type: string
    description: OAM_net IP for ECA_TRX1
  eca_trx1_eca_mgmt_net_ip:
    type: string
    description: eca_mgmt_net IP for ECA_TRX1
  eca_trx1_eca_traffic_net_ip:
    type: string
    description: eca_traffic_net IP for ECA_TRX1

resources:
  mms_security_group:
    type: OS::Neutron::SecurityGroup
    properties:
      description: mmsc security group
      name: {get_param: security_group_name}
      rules: [{"direction": egress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": tcp, "remote_ip_prefix": 0.0.0.0/0},
              {"direction": egress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": udp, "remote_ip_prefix": 0.0.0.0/0},
              {"direction": egress, "ethertype": IPv4, "protocol": icmp, "remote_ip_prefix": 0.0.0.0/0},
              {"direction": ingress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": tcp, "remote_ip_prefix": 0.0.0.0/0},
              {"direction": ingress, "ethertype": IPv4, "port_range_min": 1, "port_range_max": 65535, "protocol": udp, "remote_ip_prefix": 0.0.0.0/0},
              {"direction": ingress, "ethertype": IPv4, "protocol": icmp, "remote_ip_prefix": 0.0.0.0/0}
              ]

  mms_traffic_net:
    type: OS::Contrail::VirtualNetwork
    properties:
      name: { get_param: mms_traffic_net_name }

  mms_traffic_ip_subnet:
    type: OS::Neutron::Subnet
    properties:
      name: {get_param: mms_traffic_net_name}      
      network_id: { get_resource: mms_traffic_net }
      cidr: { get_param: mms_traffic_net_cidr }
      allocation_pools: [{"start": {get_param: mms_traffic_start}, "end": {get_param: mms_traffic_end}}]
      gateway_ip: { get_param: mms_traffic_net_gateway }
      enable_dhcp: false

  nems_internal_net:
    type: OS::Contrail::VirtualNetwork
    properties:
      name: {get_param: nems_internal_name}

  nems_internal_network_ip_subnet:
    type: OS::Neutron::Subnet
    properties:
      name: {get_param: nems_internal_name}
      allocation_pools: [{"start": {get_param: nems_internal_start}, "end": {get_param: nems_internal_end}}]
      cidr: {get_param: nems_internal_cidr}
      enable_dhcp: false
      gateway_ip: null
      network_id: {get_resource: nems_internal_net}

  nems_traffic_net:
    type: OS::Contrail::VirtualNetwork
    properties:
      name: {get_param: nems_traffic_name}

  nems_traffic_network_ip_subnet:
    type: OS::Neutron::Subnet
    properties:
      name: {get_param: nems_traffic_name}
      allocation_pools: [{"start": {get_param: nems_traffic_start}, "end": {get_param: nems_traffic_end}}]
      cidr: {get_param: nems_traffic_cidr}
      enable_dhcp: false
      gateway_ip: null
      network_id: {get_resource: nems_traffic_net}

  nems_user_web_net:
    type: OS::Contrail::VirtualNetwork
    properties:
      name: {get_param: nems_user_web_name}

  nems_user_web_network_ip_subnet:
    type: OS::Neutron::Subnet
    properties:
      name: {get_param: nems_user_web_name}
      allocation_pools: [{"start": {get_param: nems_user_web_start}, "end": {get_param: nems_user_web_end}}]
      cidr: {get_param: nems_user_web_cidr}
      enable_dhcp: false
      gateway_ip: null
      network_id: {get_resource: nems_user_web_net}

  nems_imap_net:
    type: OS::Contrail::VirtualNetwork
    properties:
      name: {get_param: nems_imap_name}

  nems_imap_network_ip_subnet:
    type: OS::Neutron::Subnet
    properties:
      name: {get_param: nems_imap_name}
      allocation_pools: [{"start": {get_param: nems_imap_start}, "end": {get_param: nems_imap_end}}]
      cidr: {get_param: nems_imap_cidr}
      enable_dhcp: false
      gateway_ip: null
      network_id: {get_resource: nems_imap_net}

  eca_traffic_net:
    type: OS::Contrail::VirtualNetwork
    properties:
      name: {get_param: eca_traffic_name}

  eca_traffic_ip_subnet:
    type: OS::Neutron::Subnet
    properties:
      name: {get_param: eca_traffic_name}
      allocation_pools: [{"start": {get_param: eca_traffic_start}, "end": {get_param: eca_traffic_end}}]
      cidr: {get_param: eca_traffic_cidr}
      enable_dhcp: false
      gateway_ip: null
      network_id: {get_resource: eca_traffic_net}

  ha_net:
    type: OS::Contrail::VirtualNetwork
    properties:
      name: {get_param: ha_net_name}

  ha_net_ip_subnet:
    type: OS::Neutron::Subnet
    properties:
      name: {get_param: ha_net_name}
      allocation_pools: [{"start": {get_param: ha_net_start}, "end": {get_param: ha_net_end}}]
      cidr: {get_param: ha_net_cidr}
      enable_dhcp: false
      gateway_ip: null
      network_id: {get_resource: ha_net}

  eca_mgmt_net:
    type: OS::Contrail::VirtualNetwork
    properties:
      name: {get_param: eca_mgmt_name}

  eca_mgmt_network_ip_subnet:
    type: OS::Neutron::Subnet
    properties:
      name: {get_param: eca_mgmt_name}
      allocation_pools: [{"start": {get_param: eca_mgmt_start}, "end": {get_param: eca_mgmt_end}}]
      cidr: {get_param: eca_mgmt_cidr}
      enable_dhcp: false
      gateway_ip: null
      network_id: {get_resource: eca_mgmt_net}

  lb1_instance:
    type: OS::Nova::Server
    properties:
      name: {get_param: lb1_name}
      image: {get_param: lb_image_name}
      flavor: {get_param: lb_flavor_name}
      availability_zone: {get_param: availabilityzone_name}
      networks:
        - port: {get_resource: lb1_mgmt_port}
        - port: {get_resource: lb1_dmz_protected_port}
        - port: {get_resource: lb1_cor_direct_port}
        - port: {get_resource: lb1_mms_traffic_port}
        - port: {get_resource: lb1_nems_traffic_port}
        - port: {get_resource: lb1_nems_user_web_port}
        - port: {get_resource: lb1_eca_traffic_port}
        - port: {get_resource: lb1_ha_net_port}

  lb1_mgmt_port:
    type: OS::Neutron::Port
    properties:
      network_id: {get_param: oam_net_name}
      fixed_ips: [{"ip_address": {get_param: lb1_oam_net_ip}}]
      security_groups: [{get_resource: mms_security_group}]

  lb1_mms_traffic_port:
    type: OS::Neutron::Port
    properties:
      network_id: {get_resource: mms_traffic_net}
      fixed_ips: [{"ip_address": {get_param: mms_traffic_net_local_ip1}}]
      allowed_address_pairs: [{"ip_address": {get_param: mms_traffic_net_floating_ip} }]
      security_groups: [{get_resource: mms_security_group}]

  lb1_dmz_protected_port:
    type: OS::Neutron::Port
    properties:
      network_id: {get_param: dmz_protected_net}
      fixed_ips: [{"ip_address": {get_param: dmz_protected_net_local_ip1}}]
      allowed_address_pairs: [{"ip_address": {get_param: dmz_protected_net_floating_ip} }]
      security_groups: [{get_resource: mms_security_group}]

  lb1_cor_direct_port:
    type: OS::Neutron::Port
    properties:
      network_id: {get_param: cor_direct_net}
      fixed_ips: [{"ip_address": {get_param: cor_direct_net_local_ip1}}]
      allowed_address_pairs: [{"ip_address": {get_param: cor_direct_net_floating_ip} }]
      security_groups: [{get_resource: mms_security_group}]

  lb1_nems_traffic_port:
    type: OS::Neutron::Port
    properties:
      network_id: {get_resource: nems_traffic_net}
      fixed_ips: [{"ip_address": {get_param: nems_traffic_net_local_ip1}}]
      allowed_address_pairs: [{"ip_address": {get_param: nems_traffic_net_floating_ip} }]
      security_groups: [{get_resource: mms_security_group}]

  lb1_nems_user_web_port:
    type: OS::Neutron::Port
    properties:
      network_id: {get_resource: nems_user_web_net}
      fixed_ips: [{"ip_address": {get_param: nems_user_web_net_local_ip1}}]
      allowed_address_pairs: [{"ip_address": {get_param: nems_user_web_net_floating_ip} }]
      security_groups: [{get_resource: mms_security_group}]

  lb1_ha_net_port:
    type: OS::Neutron::Port
    properties:
      network_id: {get_resource: ha_net}
      fixed_ips: [{"ip_address": {get_param: ha_net_local_ip1}}]

  lb1_eca_traffic_port:
    type: OS::Neutron::Port
    properties:
      network_id: {get_resource: eca_traffic_net}
      fixed_ips: [{"ip_address": {get_param: eca_traffic_net_local_ip1}}]
      allowed_address_pairs: [{"ip_address": {get_param: eca_traffic_net_floating_ip} }]
      security_groups: [{get_resource: mms_security_group}]

  lb2_instance:
    type: OS::Nova::Server
    properties:
      name: {get_param: lb2_name}
      image: {get_param: lb_image_name}
      flavor: {get_param: lb_flavor_name}
      availability_zone: {get_param: availabilityzone_name}
      networks:
        - port: {get_resource: lb2_mgmt_port}
        - port: {get_resource: lb2_dmz_protected_port}
        - port: {get_resource: lb2_cor_direct_port}
        - port: {get_resource: lb2_mms_traffic_port}
        - port: {get_resource: lb2_nems_traffic_port}
        - port: {get_resource: lb2_nems_user_web_port}
        - port: {get_resource: lb2_eca_traffic_port}
        - port: {get_resource: lb2_ha_net_port}

  lb2_mgmt_port:
    type: OS::Neutron::Port
    properties:
      network_id: {get_param: oam_net_name}
      fixed_ips: [{"ip_address": {get_param: lb2_oam_net_ip}}]
      security_groups: [{get_resource: mms_security_group}]

  lb2_mms_traffic_port:
    type: OS::Neutron::Port
    properties:
      network_id: {get_resource: mms_traffic_net}
      fixed_ips: [{"ip_address": {get_param: mms_traffic_net_local_ip2}}]
      allowed_address_pairs: [{"ip_address": {get_param: mms_traffic_net_floating_ip} }]
      security_groups: [{get_resource: mms_security_group}]

  lb2_dmz_protected_port:
    type: OS::Neutron::Port
    properties:
      network_id: {get_param: dmz_protected_net}
      fixed_ips: [{"ip_address": {get_param: dmz_protected_net_local_ip2}}]
      allowed_address_pairs: [{"ip_address": {get_param: dmz_protected_net_floating_ip} }]
      security_groups: [{get_resource: mms_security_group}]

  lb2_cor_direct_port:
    type: OS::Neutron::Port
    properties:
      network_id: {get_param: cor_direct_net}
      fixed_ips: [{"ip_address": {get_param: cor_direct_net_local_ip2}}]
      allowed_address_pairs: [{"ip_address": {get_param: cor_direct_net_floating_ip} }]
      security_groups: [{get_resource: mms_security_group}]

  lb2_nems_traffic_port:
    type: OS::Neutron::Port
    properties:
      network_id: {get_resource: nems_traffic_net}
      fixed_ips: [{"ip_address": {get_param: nems_traffic_net_local_ip2}}]
      allowed_address_pairs: [{"ip_address": {get_param: nems_traffic_net_floating_ip} }]
      security_groups: [{get_resource: mms_security_group}]

  lb2_nems_user_web_port:
    type: OS::Neutron::Port
    properties:
      network_id: {get_resource: nems_user_web_net}
      fixed_ips: [{"ip_address": {get_param: nems_user_web_net_local_ip2}}]
      allowed_address_pairs: [{"ip_address": {get_param: nems_user_web_net_floating_ip} }]
      security_groups: [{get_resource: mms_security_group}]

  lb2_ha_net_port:
    type: OS::Neutron::Port
    properties:
      network_id: {get_resource: ha_net}
      fixed_ips: [{"ip_address": {get_param: ha_net_local_ip2}}]

  lb2_eca_traffic_port:
    type: OS::Neutron::Port
    properties:
      network_id: {get_resource: eca_traffic_net}
      fixed_ips: [{"ip_address": {get_param: eca_traffic_net_local_ip2}}]
      allowed_address_pairs: [{"ip_address": {get_param: eca_traffic_net_floating_ip} }]
      security_groups: [{get_resource: mms_security_group}]

  server_mmsc1:
    type: OS::Nova::Server
    properties:
      name: { get_param: mmsc1_name }
      image: { get_param: mmsc_image }
      availability_zone: { get_param: availabilityzone_name }
      flavor: { get_param: mmsc_flavor }
      networks:
      - port: { get_resource: mmsc1_port_0 }
      - port: { get_resource: mmsc1_port_1 }
      user_data:
        str_replace:
          template: |
            mmsc.mgmt.ip=${mmsc.mgmt.ip}
            mmsc.mgmt.netmask=${mmsc.mgmt.netmask}
            mmsc.mgmt.gateway=${mmsc.mgmt.gateway}
            mmsc.traffic.ip=${mmsc.traffic.ip}
            mmsc.traffic.netmask=${mmsc.traffic.netmask}
            mmsc.traffic.gateway=${mmsc.traffic.gateway}
            mmsc.mgmt.route.1=${mmsc.mgmt.route.1}
            mmsc.mgmt.route.2=${mmsc.mgmt.route.2}
            mmsc.external.dns=${mmsc.external.dns}
            mmsc.external.ntp=${mmsc.external.ntp}
          params:
            ${mmsc.mgmt.ip}: {get_param: mmsc1_oam_net_ip}
            ${mmsc.mgmt.netmask}: {get_param: oam_network_netmask}
            ${mmsc.mgmt.gateway}: {get_param: oam_network_gateway}
            ${mmsc.traffic.ip}: {get_param:  mmsc1_mms_traffic_net_ip}
            ${mmsc.traffic.netmask}: {get_param: mms_traffic_netmask}
            ${mmsc.traffic.gateway}: {get_param: mms_traffic_net_gateway}
            ${mmsc.mgmt.route.1}: {get_param: oam_network_route_1}
            ${mmsc.mgmt.route.2}: {get_param: oam_network_route_2}
            ${mmsc.external.dns}: {get_param: external_dns}
            ${mmsc.external.ntp}: {get_param: external_ntp} 
      user_data_format: RAW
#  mmsc1_volume:
#    type: OS::Cinder::Volume
#    properties:
#      size: {get_param: mmsc_cinder_volume_size}

#  mmsc1_volume_attachment:
#    type: OS::Cinder::VolumeAttachment
#    properties:
#      volume_id: {get_resource: mmsc1_volume}
#      instance_uuid: {get_resource: server_mmsc1}

  mmsc1_port_0:
    type: OS::Neutron::Port
    properties:
      network_id: { get_param: oam_net_name }
      fixed_ips: [
        "ip_address": { get_param: mmsc1_oam_net_ip }
      ]

  mmsc1_port_1:
    type: OS::Neutron::Port
    properties:
      network_id: { get_resource: mms_traffic_net }
      fixed_ips: [
        "ip_address": { get_param: mmsc1_mms_traffic_net_ip }
      ]

  server_mmsc2:
    type: OS::Nova::Server
    properties:
      name: { get_param: mmsc2_name }
      image: { get_param: mmsc_image }
      availability_zone: { get_param: availabilityzone_name }
      flavor: { get_param: mmsc_flavor }
      networks:
      - port: { get_resource: mmsc2_port_0 }
      - port: { get_resource: mmsc2_port_1 }
      user_data:
        str_replace:
          template: |
            mmsc.mgmt.ip=${mmsc.mgmt.ip}
            mmsc.mgmt.netmask=${mmsc.mgmt.netmask}
            mmsc.mgmt.gateway=${mmsc.mgmt.gateway}
            mmsc.traffic.ip=${mmsc.traffic.ip}
            mmsc.traffic.netmask=${mmsc.traffic.netmask}
            mmsc.traffic.gateway=${mmsc.traffic.gateway}
            mmsc.mgmt.route.1=${mmsc.mgmt.route.1}
            mmsc.mgmt.route.2=${mmsc.mgmt.route.2}
            mmsc.external.dns=${mmsc.external.dns}
            mmsc.external.ntp=${mmsc.external.ntp}
          params:
            ${mmsc.mgmt.ip}: {get_param: mmsc2_oam_net_ip}
            ${mmsc.mgmt.netmask}: {get_param: oam_network_netmask}
            ${mmsc.mgmt.gateway}: {get_param: oam_network_gateway}
            ${mmsc.traffic.ip}: {get_param: mmsc2_mms_traffic_net_ip}
            ${mmsc.traffic.netmask}: {get_param: mms_traffic_netmask}
            ${mmsc.traffic.gateway}: {get_param: mms_traffic_net_gateway}
            ${mmsc.mgmt.route.1}: {get_param: oam_network_route_1}
            ${mmsc.mgmt.route.2}: {get_param: oam_network_route_2}
            ${mmsc.external.dns}: {get_param: external_dns}
            ${mmsc.external.ntp}: {get_param: external_ntp} 
      user_data_format: RAW
#  mmsc2_volume:
#    type: OS::Cinder::Volume
#    properties:
#      size: {get_param: mmsc_cinder_volume_size}

#  mmsc2_volume_attachment:
#    type: OS::Cinder::VolumeAttachment
#    properties:
#      volume_id: {get_resource: mmsc2_volume}
#      instance_uuid: {get_resource: server_mmsc2}

  mmsc2_port_0:
    type: OS::Neutron::Port
    properties:
      network_id: { get_param: oam_net_name }
      fixed_ips: [
        "ip_address": { get_param: mmsc2_oam_net_ip }
      ]

  mmsc2_port_1:
    type: OS::Neutron::Port
    properties:
      network_id: { get_resource: mms_traffic_net }
      fixed_ips: [
        "ip_address": { get_param: mmsc2_mms_traffic_net_ip }
      ]

  server_mmsc3:
    type: OS::Nova::Server
    properties:
      name: { get_param: mmsc3_name }
      image: { get_param: mmsc_image }
      availability_zone: { get_param: availabilityzone_name }
      flavor: { get_param: mmsc_flavor }
      networks:
      - port: { get_resource: mmsc3_port_0 }
      - port: { get_resource: mmsc3_port_1 }
      user_data:
        str_replace:
          template: |
            mmsc.mgmt.ip=${mmsc.mgmt.ip}
            mmsc.mgmt.netmask=${mmsc.mgmt.netmask}
            mmsc.mgmt.gateway=${mmsc.mgmt.gateway}
            mmsc.traffic.ip=${mmsc.traffic.ip}
            mmsc.traffic.netmask=${mmsc.traffic.netmask}
            mmsc.traffic.gateway=${mmsc.traffic.gateway}
            mmsc.mgmt.route.1=${mmsc.mgmt.route.1}
            mmsc.mgmt.route.2=${mmsc.mgmt.route.2}
            mmsc.external.dns=${mmsc.external.dns}
            mmsc.external.ntp=${mmsc.external.ntp}
          params:
            ${mmsc.mgmt.ip}: {get_param: mmsc3_oam_net_ip}
            ${mmsc.mgmt.netmask}: {get_param: oam_network_netmask}
            ${mmsc.mgmt.gateway}: {get_param: oam_network_gateway}
            ${mmsc.traffic.ip}: {get_param:  mmsc3_mms_traffic_net_ip}
            ${mmsc.traffic.netmask}: {get_param: mms_traffic_netmask}
            ${mmsc.traffic.gateway}: {get_param: mms_traffic_net_gateway}
            ${mmsc.mgmt.route.1}: {get_param: oam_network_route_1}
            ${mmsc.mgmt.route.2}: {get_param: oam_network_route_2}
            ${mmsc.external.dns}: {get_param: external_dns}
            ${mmsc.external.ntp}: {get_param: external_ntp}
      user_data_format: RAW

  mmsc3_port_0:
    type: OS::Neutron::Port
    properties:
      network_id: { get_param: oam_net_name }
      fixed_ips: [
        "ip_address": { get_param: mmsc3_oam_net_ip }
      ]

  mmsc3_port_1:
    type: OS::Neutron::Port
    properties:
      network_id: { get_resource: mms_traffic_net }
      fixed_ips: [
        "ip_address": { get_param: mmsc3_mms_traffic_net_ip }
      ]

  server_mmsc4:
    type: OS::Nova::Server
    properties:
      name: { get_param: mmsc4_name }
      image: { get_param: mmsc_image }
      availability_zone: { get_param: availabilityzone_name }
      flavor: { get_param: mmsc_flavor }
      networks:
      - port: { get_resource: mmsc4_port_0 }
      - port: { get_resource: mmsc4_port_1 }
      user_data:
        str_replace:
          template: |
            mmsc.mgmt.ip=${mmsc.mgmt.ip}
            mmsc.mgmt.netmask=${mmsc.mgmt.netmask}
            mmsc.mgmt.gateway=${mmsc.mgmt.gateway}
            mmsc.traffic.ip=${mmsc.traffic.ip}
            mmsc.traffic.netmask=${mmsc.traffic.netmask}
            mmsc.traffic.gateway=${mmsc.traffic.gateway}
            mmsc.mgmt.route.1=${mmsc.mgmt.route.1}
            mmsc.mgmt.route.2=${mmsc.mgmt.route.2}
            mmsc.external.dns=${mmsc.external.dns}
            mmsc.external.ntp=${mmsc.external.ntp}
          params:
            ${mmsc.mgmt.ip}: {get_param: mmsc4_oam_net_ip}
            ${mmsc.mgmt.netmask}: {get_param: oam_network_netmask}
            ${mmsc.mgmt.gateway}: {get_param: oam_network_gateway}
            ${mmsc.traffic.ip}: {get_param:  mmsc4_mms_traffic_net_ip}
            ${mmsc.traffic.netmask}: {get_param: mms_traffic_netmask}
            ${mmsc.traffic.gateway}: {get_param: mms_traffic_net_gateway}
            ${mmsc.mgmt.route.1}: {get_param: oam_network_route_1}
            ${mmsc.mgmt.route.2}: {get_param: oam_network_route_2}
            ${mmsc.external.dns}: {get_param: external_dns}
            ${mmsc.external.ntp}: {get_param: external_ntp}
      user_data_format: RAW

  mmsc4_port_0:
    type: OS::Neutron::Port
    properties:
      network_id: { get_param: oam_net_name }
      fixed_ips: [
        "ip_address": { get_param: mmsc4_oam_net_ip }
      ]

  mmsc4_port_1:
    type: OS::Neutron::Port
    properties:
      network_id: { get_resource: mms_traffic_net }
      fixed_ips: [
        "ip_address": { get_param: mmsc4_mms_traffic_net_ip }
      ]

  server_mmsc5:
    type: OS::Nova::Server
    properties:
      name: { get_param: mmsc5_name }
      image: { get_param: mmsc_image }
      availability_zone: { get_param: availabilityzone_name }
      flavor: { get_param: mmsc_flavor }
      networks:
      - port: { get_resource: mmsc5_port_0 }
      - port: { get_resource: mmsc5_port_1 }

  mmsc5_port_0:
    type: OS::Neutron::Port
    properties:
      network_id: { get_param: oam_net_name }
      fixed_ips: [
        "ip_address": { get_param: mmsc5_oam_net_ip }
      ]

  mmsc5_port_1:
    type: OS::Neutron::Port
    properties:
      network_id: { get_resource: mms_traffic_net }
      fixed_ips: [
        "ip_address": { get_param: mmsc5_mms_traffic_net_ip }
      ]

  server_nems_fe1:
    type: OS::Nova::Server
    properties:
      name: { get_param: nems_fe1_name }
      image: { get_param: nems_fe_image }
      availability_zone: { get_param: availabilityzone_name }
      flavor: { get_param: nems_fe_flavor }
      networks:
      - port: { get_resource: nems_fe1_port_0 }
      - port: { get_resource: nems_fe1_port_1 }
      - port: { get_resource: nems_fe1_port_2 }
      - port: { get_resource: nems_fe1_port_3 }
      - port: { get_resource: nems_fe1_port_4 }
      user_data:
        str_replace:
          template: |
            nems.mgmt.ip=${nems.mgmt.ip}
            nems.mgmt.netmask=${nems.mgmt.netmask}
            nems.mgmt.gateway=${nems.mgmt.gateway}
            nems.traffic.ip=${nems.traffic.ip}
            nems.traffic.netmask=${nems.traffic.netmask}
            nems.traffic.gateway=${nems.traffic.gateway}
            nems.fe0.internal.ip=${nems.fe0.internal.ip}
            nems.fe1.internal.ip=${nems.fe1.internal.ip}
            nems.internal.netmask=${nems.internal.netmask}
            nems.internal.gateway=${nems.internal.gateway}
            nems.userweb.ip=${nems.userweb.ip}
            nems.userweb.netmask=${nems.userweb.netmask}
            nems.userweb.gateway=${nems.userweb.gateway}
            nems.imap.ip=${nems.imap.ip}
            nems.imap.netmask=${nems.imap.netmask}
            nems.imap.gateway=${nems.imap.gateway}
            nems.be.internal.ip=${nems.be.internal.ip}
            nems.be.imap.ip=${nems.be.imap.ip}
            nems.mgmt.route.1=${nems.mgmt.route.1}
            nems.mgmt.route.2=${nems.mgmt.route.2}
            nems.external.dns=${nems.external.dns}
            nems.external.ntp=${nems.external.ntp}
            nems.node=${nems.node}
          params:
            ${nems.mgmt.ip}: {get_param: nems_fe1_oam_net_ip}
            ${nems.mgmt.netmask}: {get_param: oam_network_netmask}
            ${nems.mgmt.gateway}: {get_param: oam_network_gateway}
            ${nems.traffic.ip}: {get_param: nems_fe1_nems_traffic_net_ip}
            ${nems.traffic.netmask}: {get_param: nems_traffic_netmask}
            ${nems.traffic.gateway}: {get_param: nems_traffic_gateway}
            ${nems.fe0.internal.ip}: {get_param: nems_fe1_nems_internal_net_ip}
            ${nems.fe1.internal.ip}: {get_param: nems_fe2_nems_internal_net_ip}
            ${nems.internal.netmask}: {get_param: nems_internal_netmask}
            ${nems.internal.gateway}: {get_param: nems_internal_gateway}
            ${nems.userweb.ip}: {get_param: nems_fe1_nems_user_web_net_ip}
            ${nems.userweb.netmask}: {get_param: nems_user_web_netmask}
            ${nems.userweb.gateway}: {get_param: nems_user_web_gateway}
            ${nems.imap.ip}: {get_param: nems_fe1_nems_imap_net_ip}
            ${nems.imap.netmask}: {get_param: nems_imap_netmask}
            ${nems.imap.gateway}: {get_param: nems_imap_gateway}  
            ${nems.be.internal.ip}: {get_param: nems_be1_nems_internal_net_ip}
            ${nems.be.imap.ip}: {get_param: nems_be1_nems_imap_net_ip}
            ${nems.mgmt.route.1}: {get_param: oam_network_route_1}
            ${nems.mgmt.route.2}: {get_param: oam_network_route_2}
            ${nems.external.dns}: {get_param: external_dns}
            ${nems.external.ntp}: {get_param: external_ntp}
            ${nems.node}: {get_param: nems_fe1_node_role} 
      user_data_format: RAW

  nems_fe1_port_0:
    type: OS::Neutron::Port
    properties:
      network_id: { get_param: oam_net_name }
      fixed_ips: [
        "ip_address": { get_param: nems_fe1_oam_net_ip }
      ]

  nems_fe_floating_ip:
    type: OS::Neutron::FloatingIP
    properties:
      floating_network_id: {get_param: oam_net_name}
      port_id: {get_resource: nems_fe1_port_0}

  nems_fe1_port_1:
    type: OS::Neutron::Port
    properties:
      network_id: { get_resource: nems_traffic_net }
      fixed_ips: [
        "ip_address": { get_param: nems_fe1_nems_traffic_net_ip }
      ]

  nems_fe1_port_2:
    type: OS::Neutron::Port
    properties:
      network_id: { get_resource: nems_user_web_net }
      fixed_ips: [
        "ip_address": { get_param: nems_fe1_nems_user_web_net_ip }
      ]

  nems_fe1_port_3:
    type: OS::Neutron::Port
    properties:
      network_id: { get_resource: nems_internal_net }
      fixed_ips: [
        "ip_address": { get_param: nems_fe1_nems_internal_net_ip }
      ]

  nems_fe1_port_4:
    type: OS::Neutron::Port
    properties:
      network_id: { get_resource: nems_imap_net }
      fixed_ips: [
        "ip_address": { get_param: nems_fe1_nems_imap_net_ip }
      ]

  server_nems_fe2:
    type: OS::Nova::Server
    properties:
      name: { get_param: nems_fe2_name }
      image: { get_param: nems_fe_image }
      availability_zone: { get_param: availabilityzone_name }
      flavor: { get_param: nems_fe_flavor }
      networks:
      - port: { get_resource: nems_fe2_port_0 }
      - port: { get_resource: nems_fe2_port_1 }
      - port: { get_resource: nems_fe2_port_2 }
      - port: { get_resource: nems_fe2_port_3 }
      - port: { get_resource: nems_fe2_port_4 }
      user_data:
        str_replace:
          template: |
            nems.mgmt.ip=${nems.mgmt.ip}
            nems.mgmt.netmask=${nems.mgmt.netmask}
            nems.mgmt.gateway=${nems.mgmt.gateway}
            nems.traffic.ip=${nems.traffic.ip}
            nems.traffic.netmask=${nems.traffic.netmask}
            nems.traffic.gateway=${nems.traffic.gateway}
            nems.fe0.internal.ip=${nems.fe0.internal.ip}
            nems.fe1.internal.ip=${nems.fe1.internal.ip}
            nems.internal.netmask=${nems.internal.netmask}
            nems.internal.gateway=${nems.internal.gateway}
            nems.userweb.ip=${nems.userweb.ip}
            nems.userweb.netmask=${nems.userweb.netmask}
            nems.userweb.gateway=${nems.userweb.gateway}
            nems.imap.ip=${nems.imap.ip}
            nems.imap.netmask=${nems.imap.netmask}
            nems.imap.gateway=${nems.imap.gateway}
            nems.be.internal.ip=${nems.be.internal.ip}
            nems.be.imap.ip=${nems.be.imap.ip}
            nems.mgmt.route.1=${nems.mgmt.route.1}
            nems.mgmt.route.2=${nems.mgmt.route.2}
            nems.external.dns=${nems.external.dns}
            nems.external.ntp=${nems.external.ntp}
            nems.node=${nems.node}
          params:
            ${nems.mgmt.ip}: {get_param: nems_fe2_oam_net_ip}
            ${nems.mgmt.netmask}: {get_param: oam_network_netmask}
            ${nems.mgmt.gateway}: {get_param: oam_network_gateway}
            ${nems.traffic.ip}: {get_param: nems_fe2_nems_traffic_net_ip}
            ${nems.traffic.netmask}: {get_param: nems_traffic_netmask}
            ${nems.traffic.gateway}: {get_param: nems_traffic_gateway}
            ${nems.fe0.internal.ip}: {get_param: nems_fe1_nems_internal_net_ip}
            ${nems.fe1.internal.ip}: {get_param: nems_fe2_nems_internal_net_ip}
            ${nems.internal.netmask}: {get_param: nems_internal_netmask}
            ${nems.internal.gateway}: {get_param: nems_internal_gateway}
            ${nems.userweb.ip}: {get_param: nems_fe2_nems_user_web_net_ip}
            ${nems.userweb.netmask}: {get_param: nems_user_web_netmask}
            ${nems.userweb.gateway}: {get_param: nems_user_web_gateway}
            ${nems.imap.ip}: {get_param: nems_fe2_nems_imap_net_ip}
            ${nems.imap.netmask}: {get_param: nems_imap_netmask}
            ${nems.imap.gateway}: {get_param: nems_imap_gateway}
            ${nems.be.internal.ip}: {get_param: nems_be2_nems_internal_net_ip}
            ${nems.be.imap.ip}: {get_param: nems_be2_nems_imap_net_ip}
            ${nems.mgmt.route.1}: {get_param: oam_network_route_1}
            ${nems.mgmt.route.2}: {get_param: oam_network_route_2}
            ${nems.external.dns}: {get_param: external_dns}
            ${nems.external.ntp}: {get_param: external_ntp}
            ${nems.node}: {get_param: nems_fe2_node_role}
      user_data_format: RAW

  nems_fe2_port_0:
    type: OS::Neutron::Port
    properties:
      network_id: { get_param: oam_net_name }
      fixed_ips: [
        "ip_address": { get_param: nems_fe2_oam_net_ip }
      ]

  nems_fe_floating_ip:
    type: OS::Neutron::FloatingIP
    properties:
      floating_network_id: {get_param: oam_net_name}
      port_id: {get_resource: nems_fe2_port_0}

  nems_fe2_port_1:
    type: OS::Neutron::Port
    properties:
      network_id: { get_resource: nems_traffic_net }
      fixed_ips: [
        "ip_address": { get_param: nems_fe2_nems_traffic_net_ip }
      ]

  nems_fe2_port_2:
    type: OS::Neutron::Port
    properties:
      network_id: { get_resource: nems_user_web_net }
      fixed_ips: [
        "ip_address": { get_param: nems_fe2_nems_user_web_net_ip }
      ]

  nems_fe2_port_3:
    type: OS::Neutron::Port
    properties:
      network_id: { get_resource: nems_internal_net }
      fixed_ips: [
        "ip_address": { get_param: nems_fe2_nems_internal_net_ip }
      ]

  nems_fe2_port_4:
    type: OS::Neutron::Port
    properties:
      network_id: { get_resource: nems_imap_net }
      fixed_ips: [
        "ip_address": { get_param: nems_fe2_nems_imap_net_ip }
      ]

  server_nems_be1:
    type: OS::Nova::Server
    properties:
      name: { get_param: nems_be1_name }
      image: { get_param: nems_be_image }
      availability_zone: { get_param: availabilityzone_name }
      flavor: { get_param: nems_be_flavor }
      networks:
      - port: { get_resource: nems_be1_port_0 }
      - port: { get_resource: nems_be1_port_1 }
      - port: { get_resource: nems_be1_port_2 }
      user_data:
        str_replace:
          template: |
            nems.be.mgmt.ip=${nems.be.mgmt.ip}
            nems.mgmt.netmask=${nems.mgmt.netmask}
            nems.mgmt.gateway=${nems.mgmt.gateway}
            nems.be.internal.ip=${nems.be.internal.ip}
            nems.internal.netmask=${nems.internal.netmask}
            nems.internal.gateway=${nems.internal.gateway}
            nems.imap.netmask=${nems.imap.netmask}
            nems.imap.gateway=${nems.imap.gateway}
            nems.be.internal.ip=${nems.be.internal.ip}
            nems.be.imap.ip=${nems.be.imap.ip}
            nems.mgmt.route.1=${nems.mgmt.route.1}
            nems.mgmt.route.2=${nems.mgmt.route.2}
            nems.external.dns=${nems.external.dns}
            nems.external.ntp=${nems.external.ntp}
            nems.node=${nems.node}
          params:
            ${nems.be.mgmt.ip}: {get_param: nems_be1_oam_net_ip}
            ${nems.mgmt.netmask}: {get_param: oam_network_netmask}
            ${nems.mgmt.gateway}: {get_param: oam_network_gateway}
            ${nems.be.internal.ip}: {get_param: nems_be1_nems_internal_net_ip}
            ${nems.internal.netmask}: {get_param: nems_internal_netmask}
            ${nems.internal.gateway}: {get_param: nems_internal_gateway}
            ${nems.imap.netmask}: {get_param: nems_imap_netmask}
            ${nems.imap.gateway}: {get_param: nems_imap_gateway}  
            ${nems.be.imap.ip}: {get_param: nems_be1_nems_imap_net_ip}
            ${nems.mgmt.route.1}: {get_param: oam_network_route_1}
            ${nems.mgmt.route.2}: {get_param: oam_network_route_2}
            ${nems.external.dns}: {get_param: external_dns}
            ${nems.external.ntp}: {get_param: external_ntp}
            ${nems.node}: {get_param: nems_be1_node_role} 
      user_data_format: RAW

  nems_be1_port_0:
    type: OS::Neutron::Port
    properties:
      network_id: { get_param: oam_net_name }
      fixed_ips: [
        "ip_address": { get_param: nems_be1_oam_net_ip }
      ]

  nems_be_floating_ip:
    type: OS::Neutron::FloatingIP
    properties:
      floating_network_id: {get_param: oam_net_name}
      port_id: {get_resource: nems_be1_port_0}

  nems_be1_port_1:
    type: OS::Neutron::Port
    properties:
      network_id: { get_resource: nems_internal_net }
      fixed_ips: [
        "ip_address": { get_param: nems_be1_nems_internal_net_ip }
      ]

  nems_be1_port_2:
    type: OS::Neutron::Port
    properties:
      network_id: { get_resource: nems_imap_net }
      fixed_ips: [
        "ip_address": { get_param: nems_be1_nems_imap_net_ip }
      ]

  server_nems_be2:
    type: OS::Nova::Server
    properties:
      name: { get_param: nems_be2_name }
      image: { get_param: nems_be_image }
      availability_zone: { get_param: availabilityzone_name }
      flavor: { get_param: nems_be_flavor }
      networks:
      - port: { get_resource: nems_be2_port_0 }
      - port: { get_resource: nems_be2_port_1 }
      - port: { get_resource: nems_be2_port_2 }
      user_data:
        str_replace:
          template: |
            nems.be.mgmt.ip=${nems.be.mgmt.ip}
            nems.mgmt.netmask=${nems.mgmt.netmask}
            nems.mgmt.gateway=${nems.mgmt.gateway}
            nems.be.internal.ip=${nems.be.internal.ip}
            nems.internal.netmask=${nems.internal.netmask}
            nems.internal.gateway=${nems.internal.gateway}
            nems.imap.netmask=${nems.imap.netmask}
            nems.imap.gateway=${nems.imap.gateway}
            nems.be.internal.ip=${nems.be.internal.ip}
            nems.be.imap.ip=${nems.be.imap.ip}
            nems.mgmt.route.1=${nems.mgmt.route.1}
            nems.mgmt.route.2=${nems.mgmt.route.2}
            nems.external.dns=${nems.external.dns}
            nems.external.ntp=${nems.external.ntp}
            nems.node=${nems.node}
          params:
            ${nems.be.mgmt.ip}: {get_param: nems_be2_oam_net_ip}
            ${nems.mgmt.netmask}: {get_param: oam_network_netmask}
            ${nems.mgmt.gateway}: {get_param: oam_network_gateway}
            ${nems.be.internal.ip}: {get_param: nems_be2_nems_internal_net_ip}
            ${nems.internal.netmask}: {get_param: nems_internal_netmask}
            ${nems.internal.gateway}: {get_param: nems_internal_gateway}
            ${nems.imap.netmask}: {get_param: nems_imap_netmask}
            ${nems.imap.gateway}: {get_param: nems_imap_gateway}
            ${nems.be.imap.ip}: {get_param: nems_be2_nems_imap_net_ip}
            ${nems.mgmt.route.1}: {get_param: oam_network_route_1}
            ${nems.mgmt.route.2}: {get_param: oam_network_route_2}
            ${nems.external.dns}: {get_param: external_dns}
            ${nems.external.ntp}: {get_param: external_ntp}
            ${nems.node}: {get_param: nems_be1_node_role}
      user_data_format: RAW

  nems_be2_port_0:
    type: OS::Neutron::Port
    properties:
      network_id: { get_param: oam_net_name }
      fixed_ips: [
        "ip_address": { get_param: nems_be2_oam_net_ip }
      ]

  nems_be_floating_ip:
    type: OS::Neutron::FloatingIP
    properties:
      floating_network_id: {get_param: oam_net_name}
      port_id: {get_resource: nems_be2_port_0}

  nems_be2_port_1:
    type: OS::Neutron::Port
    properties:
      network_id: { get_resource: nems_internal_net }
      fixed_ips: [
        "ip_address": { get_param: nems_be2_nems_internal_net_ip }
      ]

  nems_be2_port_2:
    type: OS::Neutron::Port
    properties:
      network_id: { get_resource: nems_imap_net }
      fixed_ips: [
        "ip_address": { get_param: nems_be2_nems_imap_net_ip }
      ]

  server_eca_oam1:
    type: OS::Nova::Server
    properties:
      name: { get_param: eca_oam1_name }
      image: { get_param: eca_oam_image }
      availability_zone: { get_param: availabilityzone_name }
      flavor: { get_param: eca_oam_flavor }
      networks:
      - port: { get_resource: eca_oam1_port_0 }
      - port: { get_resource: eca_oam1_port_1 }

  eca_oam1_port_0:
    type: OS::Neutron::Port
    properties:
      network_id: { get_param: oam_net_name }
      fixed_ips: [
        "ip_address": { get_param: eca_oam1_oam_net_ip }
      ]

  eca_oam1_port_1:
    type: OS::Neutron::Port
    properties:
      network_id: { get_resource: eca_mgmt_net }
      fixed_ips: [
        "ip_address": { get_param: eca_oam1_eca_mgmt_net_ip }
      ]

  server_eca_oam2:
    type: OS::Nova::Server
    properties:
      name: { get_param: eca_oam2_name }
      image: { get_param: eca_oam_image }
      availability_zone: { get_param: availabilityzone_name }
      flavor: { get_param: eca_oam_flavor }
      networks:
      - port: { get_resource: eca_oam2_port_0 }
      - port: { get_resource: eca_oam2_port_1 }

  eca_oam2_port_0:
    type: OS::Neutron::Port
    properties:
      network_id: { get_param: oam_net_name }
      fixed_ips: [
        "ip_address": { get_param: eca_oam2_oam_net_ip }
      ]

  eca_oam2_port_1:
    type: OS::Neutron::Port
    properties:
      network_id: { get_resource: eca_mgmt_net }
      fixed_ips: [
        "ip_address": { get_param: eca_oam2_eca_mgmt_net_ip }
      ]

  server_eca_trx1:
    type: OS::Nova::Server
    properties:
      name: { get_param: eca_trx1_name }
      image: { get_param: eca_trx_image }
      availability_zone: { get_param: availabilityzone_name }
      flavor: { get_param: eca_trx_flavor }
      networks:
      - port: { get_resource: eca_trx1_port_0 }
      - port: { get_resource: eca_trx1_port_1 }
      - port: { get_resource: eca_trx1_port_2 }


  eca_trx1_port_0:
    type: OS::Neutron::Port
    properties:
      network_id: { get_param: oam_net_name }
      fixed_ips: [
        "ip_address": { get_param: eca_trx1_oam_net_ip }
      ]

  eca_trx1_port_1:
    type: OS::Neutron::Port
    properties:
      network_id: { get_resource: eca_mgmt_net }
      fixed_ips: [
        "ip_address": { get_param: eca_trx1_eca_mgmt_net_ip }
      ]

  eca_trx1_port_2:
    type: OS::Neutron::Port
    properties:
      network_id: { get_resource: eca_traffic_net }
      fixed_ips: [
        "ip_address": { get_param: eca_trx1_eca_traffic_net_ip }
      ]