Skip to content
{
"R1":{
"id":0,
"ip":"10.30.2.207",
"port":"50001",
"type":"OC-ROADM",
"driver": "OpticalOC"
},
"R2":{
"id":1,
"ip":"10.30.2.208",
"port":"50001",
"type":"OC-ROADM",
"driver": "OpticalOC"
},
"R3":{
"id":2,
"ip":"10.30.2.209",
"port":"50001",
"type":"OC-ROADM",
"driver": "OpticalOC"
},
"T1":{
"id":3,
"ip":"10.30.2.210",
"port":"50001",
"type":"OC-TP",
"driver": "OpticalOC"
},
"T2":{
"id":4,
"ip":"10.30.2.211",
"port":"50001",
"type":"OC-TP",
"driver": "OpticalOC"
}
}
{
"R1-R2": {
"length": 80,
"source": "d1",
"target": "d1",
"fibers": {
"d1-1": {
"length": 80,
"src_port": "3",
"dst_port": "14",
"local_peer_port": "13",
"remote_peer_port": "4",
"c_slots": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20
],
"l_slots": [
101,
102,
103,
104,
105,
106,
107,
108,
109,
110,
111,
112,
113,
114,
115,
116,
117,
118,
119,
120
],
"s_slots": [
501,
502,
503,
504,
505,
506,
507,
508,
509,
510,
511,
512,
513,
514,
515,
516,
517,
518,
519,
520
]
}
}
},
"R2-R1": {
"length": 80,
"source": "d1",
"target": "d1",
"fibers": {
"d1-1": {
"length": 80,
"src_port": "4",
"dst_port": "13",
"local_peer_port": "14",
"remote_peer_port": "3",
"c_slots": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20
],
"l_slots": [
101,
102,
103,
104,
105,
106,
107,
108,
109,
110,
111,
112,
113,
114,
115,
116,
117,
118,
119,
120
],
"s_slots": [
501,
502,
503,
504,
505,
506,
507,
508,
509,
510,
511,
512,
513,
514,
515,
516,
517,
518,
519,
520
]
}
}
},
"T1-R1": {
"length": 0,
"source": "muxT",
"target": "srgR",
"fibers": {
"M1": {
"length": 0,
"src_port": "1",
"dst_port": "12",
"local_peer_port": "1",
"remote_peer_port": "2",
"used": false,
"c_slots": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20
],
"l_slots": [
101,
102,
103,
104,
105,
106,
107,
108,
109,
110,
111,
112,
113,
114,
115,
116,
117,
118,
119,
120
],
"s_slots": [
501,
502,
503,
504,
505,
506,
507,
508,
509,
510,
511,
512,
513,
514,
515,
516,
517,
518,
519,
520
]
}
}
},
"R1-T1": {
"length": 0,
"source": "srgT",
"target": "muxR",
"fibers": {
"S1": {
"length": 0,
"src_port": "2",
"dst_port": "1",
"local_peer_port": "12",
"remote_peer_port": "1",
"used": false,
"c_slots": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20
],
"l_slots": [
101,
102,
103,
104,
105,
106,
107,
108,
109,
110,
111,
112,
113,
114,
115,
116,
117,
118,
119,
120
],
"s_slots": [
501,
502,
503,
504,
505,
506,
507,
508,
509,
510,
511,
512,
513,
514,
515,
516,
517,
518,
519,
520
]
}
}
},
"T2-R2": {
"length": 0,
"source": "muxT",
"target": "srgR",
"fibers": {
"M1": {
"length": 0,
"src_port": "6",
"dst_port": "15",
"local_peer_port": "6",
"remote_peer_port": "5",
"used": false,
"c_slots": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20
],
"l_slots": [
101,
102,
103,
104,
105,
106,
107,
108,
109,
110,
111,
112,
113,
114,
115,
116,
117,
118,
119,
120
],
"s_slots": [
501,
502,
503,
504,
505,
506,
507,
508,
509,
510,
511,
512,
513,
514,
515,
516,
517,
518,
519,
520
]
}
}
},
"R2-T2": {
"length": 0,
"source": "srgT",
"target": "muxR",
"fibers": {
"S1": {
"length": 0,
"src_port": "5",
"dst_port": "6",
"local_peer_port": "15",
"remote_peer_port": "6",
"used": false,
"c_slots": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20
],
"l_slots": [
101,
102,
103,
104,
105,
106,
107,
108,
109,
110,
111,
112,
113,
114,
115,
116,
117,
118,
119,
120
],
"s_slots": [
501,
502,
503,
504,
505,
506,
507,
508,
509,
510,
511,
512,
513,
514,
515,
516,
517,
518,
519,
520
]
}
}
}
}
{
"R1-R2": {
"length": 80,
"source": "d1",
"target": "d1",
"fibers": {
"d1-1": {
"length": 80,
"src_port": "101",
"dst_port": "201",
"local_peer_port": "201",
"remote_peer_port": "101",
"c_slots": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20
],
"l_slots": [
101,
102,
103,
104,
105,
106,
107,
108,
109,
110,
111,
112,
113,
114,
115,
116,
117,
118,
119,
120
],
"s_slots": [
501,
502,
503,
504,
505,
506,
507,
508,
509,
510,
511,
512,
513,
514,
515,
516,
517,
518,
519,
520
]
},
"d1-2": {
"length": 80,
"src_port": "102",
"dst_port": "202",
"local_peer_port": "202",
"remote_peer_port": "102",
"c_slots": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20
],
"l_slots": [
101,
102,
103,
104,
105,
106,
107,
108,
109,
110,
111,
112,
113,
114,
115,
116,
117,
118,
119,
120
],
"s_slots": [
501,
502,
503,
504,
505,
506,
507,
508,
509,
510,
511,
512,
513,
514,
515,
516,
517,
518,
519,
520
]
}
}
},
"R2-R1": {
"length": 80,
"source": "d1",
"target": "d1",
"fibers": {
"d1-1": {
"length": 80,
"src_port": "101",
"dst_port": "201",
"local_peer_port": "201",
"remote_peer_port": "101",
"c_slots": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20
],
"l_slots": [
101,
102,
103,
104,
105,
106,
107,
108,
109,
110,
111,
112,
113,
114,
115,
116,
117,
118,
119,
120
],
"s_slots": [
501,
502,
503,
504,
505,
506,
507,
508,
509,
510,
511,
512,
513,
514,
515,
516,
517,
518,
519,
520
]
},
"d1-2": {
"length": 80,
"src_port": "102",
"dst_port": "202",
"local_peer_port": "202",
"remote_peer_port": "102",
"c_slots": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20
],
"l_slots": [
101,
102,
103,
104,
105,
106,
107,
108,
109,
110,
111,
112,
113,
114,
115,
116,
117,
118,
119,
120
],
"s_slots": [
501,
502,
503,
504,
505,
506,
507,
508,
509,
510,
511,
512,
513,
514,
515,
516,
517,
518,
519,
520
]
}
}
},
"R1-R3": {
"length": 80,
"source": "d2",
"target": "d1",
"fibers": {
"d2-1": {
"length": 80,
"src_port": "103",
"dst_port": "201",
"local_peer_port": "203",
"remote_peer_port": "101",
"c_slots": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20
],
"l_slots": [
101,
102,
103,
104,
105,
106,
107,
108,
109,
110,
111,
112,
113,
114,
115,
116,
117,
118,
119,
120
],
"s_slots": [
501,
502,
503,
504,
505,
506,
507,
508,
509,
510,
511,
512,
513,
514,
515,
516,
517,
518,
519,
520
]
},
"d2-2": {
"length": 80,
"src_port": "104",
"dst_port": "202",
"local_peer_port": "204",
"remote_peer_port": "102",
"c_slots": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20
],
"l_slots": [
101,
102,
103,
104,
105,
106,
107,
108,
109,
110,
111,
112,
113,
114,
115,
116,
117,
118,
119,
120
],
"s_slots": [
501,
502,
503,
504,
505,
506,
507,
508,
509,
510,
511,
512,
513,
514,
515,
516,
517,
518,
519,
520
]
}
}
},
"R3-R1": {
"length": 80,
"source": "d1",
"target": "d2",
"fibers": {
"d1-1": {
"length": 80,
"src_port": "101",
"dst_port": "203",
"local_peer_port": "201",
"remote_peer_port": "103",
"c_slots": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20
],
"l_slots": [
101,
102,
103,
104,
105,
106,
107,
108,
109,
110,
111,
112,
113,
114,
115,
116,
117,
118,
119,
120
],
"s_slots": [
501,
502,
503,
504,
505,
506,
507,
508,
509,
510,
511,
512,
513,
514,
515,
516,
517,
518,
519,
520
]
},
"d1-2": {
"length": 80,
"src_port": "102",
"dst_port": "204",
"local_peer_port": "202",
"remote_peer_port": "104",
"c_slots": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20
],
"l_slots": [
101,
102,
103,
104,
105,
106,
107,
108,
109,
110,
111,
112,
113,
114,
115,
116,
117,
118,
119,
120
],
"s_slots": [
501,
502,
503,
504,
505,
506,
507,
508,
509,
510,
511,
512,
513,
514,
515,
516,
517,
518,
519,
520
]
}
}
},
"R2-R3": {
"length": 80,
"source": "d2",
"target": "d2",
"fibers": {
"d2-1": {
"length": 80,
"src_port": "103",
"dst_port": "203",
"local_peer_port": "203",
"remote_peer_port": "103",
"c_slots": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20
],
"l_slots": [
101,
102,
103,
104,
105,
106,
107,
108,
109,
110,
111,
112,
113,
114,
115,
116,
117,
118,
119,
120
],
"s_slots": [
501,
502,
503,
504,
505,
506,
507,
508,
509,
510,
511,
512,
513,
514,
515,
516,
517,
518,
519,
520
]
},
"d2-2": {
"length": 80,
"src_port": "104",
"dst_port": "204",
"local_peer_port": "204",
"remote_peer_port": "104",
"c_slots": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20
],
"l_slots": [
101,
102,
103,
104,
105,
106,
107,
108,
109,
110,
111,
112,
113,
114,
115,
116,
117,
118,
119,
120
],
"s_slots": [
501,
502,
503,
504,
505,
506,
507,
508,
509,
510,
511,
512,
513,
514,
515,
516,
517,
518,
519,
520
]
}
}
},
"R3-R2": {
"length": 80,
"source": "d2",
"target": "d2",
"fibers": {
"d2-1": {
"length": 80,
"src_port": "103",
"dst_port": "203",
"local_peer_port": "203",
"remote_peer_port": "103",
"c_slots": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20
],
"l_slots": [
101,
102,
103,
104,
105,
106,
107,
108,
109,
110,
111,
112,
113,
114,
115,
116,
117,
118,
119,
120
],
"s_slots": [
501,
502,
503,
504,
505,
506,
507,
508,
509,
510,
511,
512,
513,
514,
515,
516,
517,
518,
519,
520
]
},
"d2-2": {
"length": 80,
"src_port": "104",
"dst_port": "204",
"local_peer_port": "204",
"remote_peer_port": "104",
"c_slots": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20
],
"l_slots": [
101,
102,
103,
104,
105,
106,
107,
108,
109,
110,
111,
112,
113,
114,
115,
116,
117,
118,
119,
120
],
"s_slots": [
501,
502,
503,
504,
505,
506,
507,
508,
509,
510,
511,
512,
513,
514,
515,
516,
517,
518,
519,
520
]
}
}
},
"T1-R1": {
"length": 0,
"source": "muxT",
"target": "srgR",
"fibers": {
"M1": {
"length": 0,
"src_port": "1",
"dst_port": "2001",
"local_peer_port": "1",
"remote_peer_port": "1001",
"used": false,
"c_slots": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20
],
"l_slots": [
101,
102,
103,
104,
105,
106,
107,
108,
109,
110,
111,
112,
113,
114,
115,
116,
117,
118,
119,
120
],
"s_slots": [
501,
502,
503,
504,
505,
506,
507,
508,
509,
510,
511,
512,
513,
514,
515,
516,
517,
518,
519,
520
]
},
"M2": {
"length": 0,
"src_port": "2",
"dst_port": "2002",
"local_peer_port": "2",
"remote_peer_port": "1002",
"used": false,
"c_slots": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20
],
"l_slots": [
101,
102,
103,
104,
105,
106,
107,
108,
109,
110,
111,
112,
113,
114,
115,
116,
117,
118,
119,
120
],
"s_slots": [
501,
502,
503,
504,
505,
506,
507,
508,
509,
510,
511,
512,
513,
514,
515,
516,
517,
518,
519,
520
]
},
"M3": {
"length": 0,
"src_port": "3",
"dst_port": "2003",
"local_peer_port": "3",
"remote_peer_port": "1003",
"used": false,
"c_slots": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20
],
"l_slots": [
101,
102,
103,
104,
105,
106,
107,
108,
109,
110,
111,
112,
113,
114,
115,
116,
117,
118,
119,
120
],
"s_slots": [
501,
502,
503,
504,
505,
506,
507,
508,
509,
510,
511,
512,
513,
514,
515,
516,
517,
518,
519,
520
]
}
}
},
"R1-T1": {
"length": 0,
"source": "srgT",
"target": "muxR",
"fibers": {
"S1": {
"length": 0,
"src_port": "1001",
"dst_port": "1",
"local_peer_port": "2001",
"remote_peer_port": "1",
"used": false,
"c_slots": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20
],
"l_slots": [
101,
102,
103,
104,
105,
106,
107,
108,
109,
110,
111,
112,
113,
114,
115,
116,
117,
118,
119,
120
],
"s_slots": [
501,
502,
503,
504,
505,
506,
507,
508,
509,
510,
511,
512,
513,
514,
515,
516,
517,
518,
519,
520
]
},
"S2": {
"length": 0,
"src_port": "1002",
"dst_port": "2",
"local_peer_port": "2002",
"remote_peer_port": "2",
"used": false,
"c_slots": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20
],
"l_slots": [
101,
102,
103,
104,
105,
106,
107,
108,
109,
110,
111,
112,
113,
114,
115,
116,
117,
118,
119,
120
],
"s_slots": [
501,
502,
503,
504,
505,
506,
507,
508,
509,
510,
511,
512,
513,
514,
515,
516,
517,
518,
519,
520
]
},
"S3": {
"length": 0,
"src_port": "1003",
"dst_port": "3",
"local_peer_port": "2003",
"remote_peer_port": "3",
"used": false,
"c_slots": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20
],
"l_slots": [
101,
102,
103,
104,
105,
106,
107,
108,
109,
110,
111,
112,
113,
114,
115,
116,
117,
118,
119,
120
],
"s_slots": [
501,
502,
503,
504,
505,
506,
507,
508,
509,
510,
511,
512,
513,
514,
515,
516,
517,
518,
519,
520
]
}
}
},
"T2-R2": {
"length": 0,
"source": "muxT",
"target": "srgR",
"fibers": {
"M1": {
"length": 0,
"src_port": "1",
"dst_port": "2001",
"local_peer_port": "1",
"remote_peer_port": "1001",
"used": false,
"c_slots": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20
],
"l_slots": [
101,
102,
103,
104,
105,
106,
107,
108,
109,
110,
111,
112,
113,
114,
115,
116,
117,
118,
119,
120
],
"s_slots": [
501,
502,
503,
504,
505,
506,
507,
508,
509,
510,
511,
512,
513,
514,
515,
516,
517,
518,
519,
520
]
},
"M2": {
"length": 0,
"src_port": "2",
"dst_port": "2002",
"local_peer_port": "2",
"remote_peer_port": "1002",
"used": false,
"c_slots": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20
],
"l_slots": [
101,
102,
103,
104,
105,
106,
107,
108,
109,
110,
111,
112,
113,
114,
115,
116,
117,
118,
119,
120
],
"s_slots": [
501,
502,
503,
504,
505,
506,
507,
508,
509,
510,
511,
512,
513,
514,
515,
516,
517,
518,
519,
520
]
},
"M3": {
"length": 0,
"src_port": "3",
"dst_port": "2003",
"local_peer_port": "3",
"remote_peer_port": "1003",
"used": false,
"c_slots": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20
],
"l_slots": [
101,
102,
103,
104,
105,
106,
107,
108,
109,
110,
111,
112,
113,
114,
115,
116,
117,
118,
119,
120
],
"s_slots": [
501,
502,
503,
504,
505,
506,
507,
508,
509,
510,
511,
512,
513,
514,
515,
516,
517,
518,
519,
520
]
}
}
},
"R2-T2": {
"length": 0,
"source": "srgT",
"target": "muxR",
"fibers": {
"S1": {
"length": 0,
"src_port": "1001",
"dst_port": "1",
"local_peer_port": "2001",
"remote_peer_port": "1",
"used": false,
"c_slots": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20
],
"l_slots": [
101,
102,
103,
104,
105,
106,
107,
108,
109,
110,
111,
112,
113,
114,
115,
116,
117,
118,
119,
120
],
"s_slots": [
501,
502,
503,
504,
505,
506,
507,
508,
509,
510,
511,
512,
513,
514,
515,
516,
517,
518,
519,
520
]
},
"S2": {
"length": 0,
"src_port": "1002",
"dst_port": "2",
"local_peer_port": "2002",
"remote_peer_port": "2",
"used": false,
"c_slots": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20
],
"l_slots": [
101,
102,
103,
104,
105,
106,
107,
108,
109,
110,
111,
112,
113,
114,
115,
116,
117,
118,
119,
120
],
"s_slots": [
501,
502,
503,
504,
505,
506,
507,
508,
509,
510,
511,
512,
513,
514,
515,
516,
517,
518,
519,
520
]
},
"S3": {
"length": 0,
"src_port": "1003",
"dst_port": "3",
"local_peer_port": "2003",
"remote_peer_port": "3",
"used": false,
"c_slots": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20
],
"l_slots": [
101,
102,
103,
104,
105,
106,
107,
108,
109,
110,
111,
112,
113,
114,
115,
116,
117,
118,
119,
120
],
"s_slots": [
501,
502,
503,
504,
505,
506,
507,
508,
509,
510,
511,
512,
513,
514,
515,
516,
517,
518,
519,
520
]
}
}
}
}
{
"links": [
{
"link_id": {
"link_uuid": {
"uuid": "T1->R1"
}
},
"link_endpoint_ids": [
{
"device_id": {
"device_uuid": {
"uuid": "T1"
}
},
"endpoint_uuid": {
"uuid": "1"
}
},
{
"device_id": {
"device_uuid": {
"uuid": "R1"
}
},
"endpoint_uuid": {
"uuid": "12"
}
}
],
"optical_link": {
"name": "T1-R1",
"details": {
"length": 0,
"source": "muxT",
"target": "srgR",
"fibers": [
{
"ID": "M1",
"length": 0,
"src_port": "1",
"dst_port": "12",
"local_peer_port": "1",
"remote_peer_port": "2",
"used": false,
"c_slots": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20
],
"l_slots": [
101,
102,
103,
104,
105,
106,
107,
108,
109,
110,
111,
112,
113,
114,
115,
116,
117,
118,
119,
120
],
"s_slots": [
501,
502,
503,
504,
505,
506,
507,
508,
509,
510,
511,
512,
513,
514,
515,
516,
517,
518,
519,
520
]
}
]
}
}
},
{
"link_id": {
"link_uuid": {
"uuid": "R1->T1"
}
},
"link_endpoint_ids": [
{
"device_id": {
"device_uuid": {
"uuid": "R1"
}
},
"endpoint_uuid": {
"uuid": "2"
}
},
{
"device_id": {
"device_uuid": {
"uuid": "T1"
}
},
"endpoint_uuid": {
"uuid": "1"
}
}
],
"optical_link": {
"name": "R1-T1",
"details": {
"length": 0,
"source": "srgT",
"target": "muxT",
"fibers": [
{
"ID": "M1",
"length": 0,
"src_port": "2",
"dst_port": "1",
"local_peer_port": "12",
"remote_peer_port": "1",
"used": false,
"c_slots": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20
],
"l_slots": [
101,
102,
103,
104,
105,
106,
107,
108,
109,
110,
111,
112,
113,
114,
115,
116,
117,
118,
119,
120
],
"s_slots": [
501,
502,
503,
504,
505,
506,
507,
508,
509,
510,
511,
512,
513,
514,
515,
516,
517,
518,
519,
520
]
}
]
}
}
},
{
"link_id": {
"link_uuid": {
"uuid": "R1->R2"
}
},
"link_endpoint_ids": [
{
"device_id": {
"device_uuid": {
"uuid": "R1"
}
},
"endpoint_uuid": {
"uuid": "3"
}
},
{
"device_id": {
"device_uuid": {
"uuid": "R2"
}
},
"endpoint_uuid": {
"uuid": "14"
}
}
],
"optical_link": {
"name": "R1-R2",
"details": {
"length": 0,
"source": "D1",
"target": "D1",
"fibers": [
{
"ID": "D11",
"length": 0,
"src_port": "3",
"dst_port": "14",
"local_peer_port": "13",
"remote_peer_port": "4",
"c_slots": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20
],
"l_slots": [
101,
102,
103,
104,
105,
106,
107,
108,
109,
110,
111,
112,
113,
114,
115,
116,
117,
118,
119,
120
],
"s_slots": [
501,
502,
503,
504,
505,
506,
507,
508,
509,
510,
511,
512,
513,
514,
515,
516,
517,
518,
519,
520
]
}
]
}
}
},
{
"link_id": {
"link_uuid": {
"uuid": "R2->R1"
}
},
"link_endpoint_ids": [
{
"device_id": {
"device_uuid": {
"uuid": "R2"
}
},
"endpoint_uuid": {
"uuid": "4"
}
},
{
"device_id": {
"device_uuid": {
"uuid": "R1"
}
},
"endpoint_uuid": {
"uuid": "13"
}
}
],
"optical_link": {
"name": "R2-R1",
"details": {
"length": 0,
"source": "D1",
"target": "D1",
"fibers": [
{
"ID": "D11",
"length": 0,
"src_port": "4",
"dst_port": "13",
"local_peer_port": "14",
"remote_peer_port": "3",
"c_slots": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20
],
"l_slots": [
101,
102,
103,
104,
105,
106,
107,
108,
109,
110,
111,
112,
113,
114,
115,
116,
117,
118,
119,
120
],
"s_slots": [
501,
502,
503,
504,
505,
506,
507,
508,
509,
510,
511,
512,
513,
514,
515,
516,
517,
518,
519,
520
]
}
]
}
}
},
{
"link_id": {
"link_uuid": {
"uuid": "T2->R2"
}
},
"link_endpoint_ids": [
{
"device_id": {
"device_uuid": {
"uuid": "T2"
}
},
"endpoint_uuid": {
"uuid": "6"
}
},
{
"device_id": {
"device_uuid": {
"uuid": "R2"
}
},
"endpoint_uuid": {
"uuid": "15"
}
}
],
"optical_link": {
"name": "T2-R2",
"details": {
"length": 0,
"source": "srgT",
"target": "muxT",
"fibers": [
{
"ID": "M1",
"length": 0,
"src_port": "6",
"dst_port": "15",
"local_peer_port": "6",
"remote_peer_port": "5",
"used": false,
"c_slots": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20
],
"l_slots": [
101,
102,
103,
104,
105,
106,
107,
108,
109,
110,
111,
112,
113,
114,
115,
116,
117,
118,
119,
120
],
"s_slots": [
501,
502,
503,
504,
505,
506,
507,
508,
509,
510,
511,
512,
513,
514,
515,
516,
517,
518,
519,
520
]
}
]
}
}
},
{
"link_id": {
"link_uuid": {
"uuid": "R2->T2"
}
},
"link_endpoint_ids": [
{
"device_id": {
"device_uuid": {
"uuid": "R2"
}
},
"endpoint_uuid": {
"uuid": "5"
}
},
{
"device_id": {
"device_uuid": {
"uuid": "T2"
}
},
"endpoint_uuid": {
"uuid": "6"
}
}
],
"optical_link": {
"name": "R2-T2",
"details": {
"length": 0,
"source": "srgT",
"target": "muxT",
"fibers": [
{
"ID": "M1",
"length": 0,
"src_port": "5",
"dst_port": "6",
"local_peer_port": "15",
"remote_peer_port": "6",
"used": false,
"c_slots": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20
],
"l_slots": [
101,
102,
103,
104,
105,
106,
107,
108,
109,
110,
111,
112,
113,
114,
115,
116,
117,
118,
119,
120
],
"s_slots": [
501,
502,
503,
504,
505,
506,
507,
508,
509,
510,
511,
512,
513,
514,
515,
516,
517,
518,
519,
520
]
}
]
}
}
}
]
}
\ No newline at end of file
{
"R1-R3": {
"length": 80,
"source": "d2",
"target": "d1",
"fibers": {
"d2-1": {
"length": 80,
"src_port": "103",
"dst_port": "201",
"local_peer_port": "203",
"remote_peer_port": "101",
"c_slots": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20
],
"l_slots": [
101,
102,
103,
104,
105,
106,
107,
108,
109,
110,
111,
112,
113,
114,
115,
116,
117,
118,
119,
120
],
"s_slots": [
501,
502,
503,
504,
505,
506,
507,
508,
509,
510,
511,
512,
513,
514,
515,
516,
517,
518,
519,
520
]
},
"d2-2": {
"length": 80,
"src_port": "104",
"dst_port": "202",
"local_peer_port": "204",
"remote_peer_port": "102",
"c_slots": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20
],
"l_slots": [
101,
102,
103,
104,
105,
106,
107,
108,
109,
110,
111,
112,
113,
114,
115,
116,
117,
118,
119,
120
],
"s_slots": [
501,
502,
503,
504,
505,
506,
507,
508,
509,
510,
511,
512,
513,
514,
515,
516,
517,
518,
519,
520
]
}
}
},
"R3-R1": {
"length": 80,
"source": "d1",
"target": "d2",
"fibers": {
"d1-1": {
"length": 80,
"src_port": "101",
"dst_port": "203",
"local_peer_port": "201",
"remote_peer_port": "103",
"c_slots": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20
],
"l_slots": [
101,
102,
103,
104,
105,
106,
107,
108,
109,
110,
111,
112,
113,
114,
115,
116,
117,
118,
119,
120
],
"s_slots": [
501,
502,
503,
504,
505,
506,
507,
508,
509,
510,
511,
512,
513,
514,
515,
516,
517,
518,
519,
520
]
},
"d1-2": {
"length": 80,
"src_port": "102",
"dst_port": "204",
"local_peer_port": "202",
"remote_peer_port": "104",
"c_slots": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20
],
"l_slots": [
101,
102,
103,
104,
105,
106,
107,
108,
109,
110,
111,
112,
113,
114,
115,
116,
117,
118,
119,
120
],
"s_slots": [
501,
502,
503,
504,
505,
506,
507,
508,
509,
510,
511,
512,
513,
514,
515,
516,
517,
518,
519,
520
]
}
}
},
"R2-R3": {
"length": 80,
"source": "d2",
"target": "d2",
"fibers": {
"d2-1": {
"length": 80,
"src_port": "103",
"dst_port": "203",
"local_peer_port": "203",
"remote_peer_port": "103",
"c_slots": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20
],
"l_slots": [
101,
102,
103,
104,
105,
106,
107,
108,
109,
110,
111,
112,
113,
114,
115,
116,
117,
118,
119,
120
],
"s_slots": [
501,
502,
503,
504,
505,
506,
507,
508,
509,
510,
511,
512,
513,
514,
515,
516,
517,
518,
519,
520
]
},
"d2-2": {
"length": 80,
"src_port": "104",
"dst_port": "204",
"local_peer_port": "204",
"remote_peer_port": "104",
"c_slots": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20
],
"l_slots": [
101,
102,
103,
104,
105,
106,
107,
108,
109,
110,
111,
112,
113,
114,
115,
116,
117,
118,
119,
120
],
"s_slots": [
501,
502,
503,
504,
505,
506,
507,
508,
509,
510,
511,
512,
513,
514,
515,
516,
517,
518,
519,
520
]
}
}
},
"R3-R2": {
"length": 80,
"source": "d2",
"target": "d2",
"fibers": {
"d2-1": {
"length": 80,
"src_port": "103",
"dst_port": "203",
"local_peer_port": "203",
"remote_peer_port": "103",
"c_slots": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20
],
"l_slots": [
101,
102,
103,
104,
105,
106,
107,
108,
109,
110,
111,
112,
113,
114,
115,
116,
117,
118,
119,
120
],
"s_slots": [
501,
502,
503,
504,
505,
506,
507,
508,
509,
510,
511,
512,
513,
514,
515,
516,
517,
518,
519,
520
]
},
"d2-2": {
"length": 80,
"src_port": "104",
"dst_port": "204",
"local_peer_port": "204",
"remote_peer_port": "104",
"c_slots": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20
],
"l_slots": [
101,
102,
103,
104,
105,
106,
107,
108,
109,
110,
111,
112,
113,
114,
115,
116,
117,
118,
119,
120
],
"s_slots": [
501,
502,
503,
504,
505,
506,
507,
508,
509,
510,
511,
512,
513,
514,
515,
516,
517,
518,
519,
520
]
}
}
},
"T1-R1": {
"length": 0,
"source": "muxT",
"target": "srgR",
"fibers": {
"M1": {
"length": 0,
"src_port": "1",
"dst_port": "2001",
"local_peer_port": "1",
"remote_peer_port": "1001",
"used": false,
"c_slots": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20
],
"l_slots": [
101,
102,
103,
104,
105,
106,
107,
108,
109,
110,
111,
112,
113,
114,
115,
116,
117,
118,
119,
120
],
"s_slots": [
501,
502,
503,
504,
505,
506,
507,
508,
509,
510,
511,
512,
513,
514,
515,
516,
517,
518,
519,
520
]
},
"M2": {
"length": 0,
"src_port": "2",
"dst_port": "2002",
"local_peer_port": "2",
"remote_peer_port": "1002",
"used": false,
"c_slots": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20
],
"l_slots": [
101,
102,
103,
104,
105,
106,
107,
108,
109,
110,
111,
112,
113,
114,
115,
116,
117,
118,
119,
120
],
"s_slots": [
501,
502,
503,
504,
505,
506,
507,
508,
509,
510,
511,
512,
513,
514,
515,
516,
517,
518,
519,
520
]
},
"M3": {
"length": 0,
"src_port": "3",
"dst_port": "2003",
"local_peer_port": "3",
"remote_peer_port": "1003",
"used": false,
"c_slots": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20
],
"l_slots": [
101,
102,
103,
104,
105,
106,
107,
108,
109,
110,
111,
112,
113,
114,
115,
116,
117,
118,
119,
120
],
"s_slots": [
501,
502,
503,
504,
505,
506,
507,
508,
509,
510,
511,
512,
513,
514,
515,
516,
517,
518,
519,
520
]
}
}
},
"R1-T1": {
"length": 0,
"source": "srgT",
"target": "muxR",
"fibers": {
"S1": {
"length": 0,
"src_port": "1001",
"dst_port": "1",
"local_peer_port": "2001",
"remote_peer_port": "1",
"used": false,
"c_slots": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20
],
"l_slots": [
101,
102,
103,
104,
105,
106,
107,
108,
109,
110,
111,
112,
113,
114,
115,
116,
117,
118,
119,
120
],
"s_slots": [
501,
502,
503,
504,
505,
506,
507,
508,
509,
510,
511,
512,
513,
514,
515,
516,
517,
518,
519,
520
]
},
"S2": {
"length": 0,
"src_port": "1002",
"dst_port": "2",
"local_peer_port": "2002",
"remote_peer_port": "2",
"used": false,
"c_slots": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20
],
"l_slots": [
101,
102,
103,
104,
105,
106,
107,
108,
109,
110,
111,
112,
113,
114,
115,
116,
117,
118,
119,
120
],
"s_slots": [
501,
502,
503,
504,
505,
506,
507,
508,
509,
510,
511,
512,
513,
514,
515,
516,
517,
518,
519,
520
]
},
"S3": {
"length": 0,
"src_port": "1003",
"dst_port": "3",
"local_peer_port": "2003",
"remote_peer_port": "3",
"used": false,
"c_slots": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20
],
"l_slots": [
101,
102,
103,
104,
105,
106,
107,
108,
109,
110,
111,
112,
113,
114,
115,
116,
117,
118,
119,
120
],
"s_slots": [
501,
502,
503,
504,
505,
506,
507,
508,
509,
510,
511,
512,
513,
514,
515,
516,
517,
518,
519,
520
]
}
}
},
"T2-R2": {
"length": 0,
"source": "muxT",
"target": "srgR",
"fibers": {
"M1": {
"length": 0,
"src_port": "1",
"dst_port": "2001",
"local_peer_port": "1",
"remote_peer_port": "1001",
"used": false,
"c_slots": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20
],
"l_slots": [
101,
102,
103,
104,
105,
106,
107,
108,
109,
110,
111,
112,
113,
114,
115,
116,
117,
118,
119,
120
],
"s_slots": [
501,
502,
503,
504,
505,
506,
507,
508,
509,
510,
511,
512,
513,
514,
515,
516,
517,
518,
519,
520
]
},
"M2": {
"length": 0,
"src_port": "2",
"dst_port": "2002",
"local_peer_port": "2",
"remote_peer_port": "1002",
"used": false,
"c_slots": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20
],
"l_slots": [
101,
102,
103,
104,
105,
106,
107,
108,
109,
110,
111,
112,
113,
114,
115,
116,
117,
118,
119,
120
],
"s_slots": [
501,
502,
503,
504,
505,
506,
507,
508,
509,
510,
511,
512,
513,
514,
515,
516,
517,
518,
519,
520
]
},
"M3": {
"length": 0,
"src_port": "3",
"dst_port": "2003",
"local_peer_port": "3",
"remote_peer_port": "1003",
"used": false,
"c_slots": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20
],
"l_slots": [
101,
102,
103,
104,
105,
106,
107,
108,
109,
110,
111,
112,
113,
114,
115,
116,
117,
118,
119,
120
],
"s_slots": [
501,
502,
503,
504,
505,
506,
507,
508,
509,
510,
511,
512,
513,
514,
515,
516,
517,
518,
519,
520
]
}
}
},
"R2-T2": {
"length": 0,
"source": "srgT",
"target": "muxR",
"fibers": {
"S1": {
"length": 0,
"src_port": "1001",
"dst_port": "1",
"local_peer_port": "2001",
"remote_peer_port": "1",
"used": false,
"c_slots": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20
],
"l_slots": [
101,
102,
103,
104,
105,
106,
107,
108,
109,
110,
111,
112,
113,
114,
115,
116,
117,
118,
119,
120
],
"s_slots": [
501,
502,
503,
504,
505,
506,
507,
508,
509,
510,
511,
512,
513,
514,
515,
516,
517,
518,
519,
520
]
},
"S2": {
"length": 0,
"src_port": "1002",
"dst_port": "2",
"local_peer_port": "2002",
"remote_peer_port": "2",
"used": false,
"c_slots": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20
],
"l_slots": [
101,
102,
103,
104,
105,
106,
107,
108,
109,
110,
111,
112,
113,
114,
115,
116,
117,
118,
119,
120
],
"s_slots": [
501,
502,
503,
504,
505,
506,
507,
508,
509,
510,
511,
512,
513,
514,
515,
516,
517,
518,
519,
520
]
},
"S3": {
"length": 0,
"src_port": "1003",
"dst_port": "3",
"local_peer_port": "2003",
"remote_peer_port": "3",
"used": false,
"c_slots": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20
],
"l_slots": [
101,
102,
103,
104,
105,
106,
107,
108,
109,
110,
111,
112,
113,
114,
115,
116,
117,
118,
119,
120
],
"s_slots": [
501,
502,
503,
504,
505,
506,
507,
508,
509,
510,
511,
512,
513,
514,
515,
516,
517,
518,
519,
520
]
}
}
}
}
{
"r1-r2": {
"length": 80,
"source" : "d1",
"target" : "d1",
"fibers" : {
"d1-1": {
"src_port": "1T",
"dst_port": "1R",
"c_slots": {"1": 1, "2": 1, "3": 1, "4": 1},
"l_slots": {"101": 1, "102": 1, "103": 1, "104": 1},
"s_slots": {"1001": 1, "1002": 1, "1003": 1, "1004": 1}
},
"d1-2":{
"src_port": "2T",
"dst_port": "2R",
"c_slots": {"1": 1, "2": 1, "3": 1, "4": 1},
"l_slots": {"101": 1, "102": 1, "103": 1, "104": 1},
"s_slots": {"1001": 1, "1002": 1, "1003": 1, "1004": 1}
}
}
},
"r2-r1": {
"length": 80,
"source" : "d1",
"target" : "d1",
"fibers" : {
"d1-1" : {
"src_port": "1T",
"dst_port": "1R",
"c_slots": {"1": 1, "2": 1, "3": 1, "4": 1},
"l_slots": {"101": 1, "102": 1, "103": 1, "104": 1},
"s_slots": {"1001": 1, "1002": 1, "1003": 1, "1004": 1}
},
"d1-2" : {
"src_port": "2T",
"dst_port": "2R",
"c_slots": {"1": 1, "2": 1, "3": 1, "4": 1},
"l_slots": {"101": 1, "102": 1, "103": 1, "104": 1},
"s_slots": {"1001": 1, "1002": 1, "1003": 1, "1004": 1}
}
}
},
"r1-r3": {
"length": 80,
"source" : "d2",
"target" : "d1",
"fibers" : {
"d2-1":{
"src_port": "3T",
"dst_port": "1R",
"c_slots": {"1": 1, "2": 1, "3": 1, "4": 1},
"l_slots": {"101": 1, "102": 1, "103": 1, "104": 1},
"s_slots": {"1001": 1, "1002": 1, "1003": 1, "1004": 1}
},
"d2-2":{
"src_port": "4T",
"dst_port": "2R",
"c_slots": {"1": 1, "2": 1, "3": 1, "4": 1},
"l_slots": {"101": 1, "102": 1, "103": 1, "104": 1},
"s_slots": {"1001": 1, "1002": 1, "1003": 1, "1004": 1}
}
}
},
"r3-r1": {
"length": 80,
"source" : "d1",
"target" : "d2",
"fibers" : {
"d1-1": {
"src_port": "1T",
"dst_port": "3R",
"c_slots": {"1": 1, "2": 1, "3": 1, "4": 1},
"l_slots": {"101": 1, "102": 1, "103": 1, "104": 1},
"s_slots": {"1001": 1, "1002": 1, "1003": 1, "1004": 1}
},
"d1-2": {
"src_port": "2T",
"dst_port": "4R",
"c_slots": {"1": 1, "2": 1, "3": 1, "4": 1},
"l_slots": {"101": 1, "102": 1, "103": 1, "104": 1},
"s_slots": {"1001": 1, "1002": 1, "1003": 1, "1004": 1}
}
}
},
"r2-r3": {
"length": 80,
"source" : "d2",
"target" : "d2",
"fibers" : {
"d2-1": {
"src_port": "3T",
"dst_port": "3R",
"c_slots": {"1": 1, "2": 1, "3": 1, "4": 1},
"l_slots": {"101": 1, "102": 1, "103": 1, "104": 1},
"s_slots": {"1001": 1, "1002": 1, "1003": 1, "1004": 1}
},
"d2-2": {
"src_port": "4T",
"dst_port": "4R",
"c_slots": {"1": 1, "2": 1, "3": 1, "4": 1},
"l_slots": {"101": 1, "102": 1, "103": 1, "104": 1},
"s_slots": {"1001": 1, "1002": 1, "1003": 1, "1004": 1}
}
}
},
"r3-r2": {
"length": 80,
"source" : "d2",
"target" : "d2",
"fibers" : {
"d2-1": {
"src_port": "3T",
"dst_port": "3R",
"c_slots": {"1": 1, "2": 1, "3": 1, "4": 1},
"l_slots": {"101": 1, "102": 1, "103": 1, "104": 1},
"s_slots": {"1001": 1, "1002": 1, "1003": 1, "1004": 1}
},
"d2-2":{
"src_port": "4T",
"dst_port": "4R",
"c_slots": {"1": 1, "2": 1, "3": 1, "4": 1},
"l_slots": {"101": 1, "102": 1, "103": 1, "104": 1},
"s_slots": {"1001": 1, "1002": 1, "1003": 1, "1004": 1}
}
}
},
"t1-r1": {
"length": 0,
"source" : "muxT",
"target" : "srgR",
"fibers" : {
"M1": {
"src_port": "1",
"dst_port": "101R",
"used": false,
"c_slots": {"1": 1, "2": 1, "3": 1, "4": 1},
"l_slots": {"101": 1, "102": 1, "103": 1, "104": 1},
"s_slots": {"1001": 1, "1002": 1, "1003": 1, "1004": 1}
},
"M2": {
"src_port": "2",
"dst_port": "102R",
"used": false,
"c_slots": {"1": 1, "2": 1, "3": 1, "4": 1},
"l_slots": {"101": 1, "102": 1, "103": 1, "104": 1},
"s_slots": {"1001": 1, "1002": 1, "1003": 1, "1004": 1}
},
"M3": {
"src_port": "3",
"dst_port": "103R",
"used": false,
"c_slots": {"1": 1, "2": 1, "3": 1, "4": 1},
"l_slots": {"101": 1, "102": 1, "103": 1, "104": 1},
"s_slots": {"1001": 1, "1002": 1, "1003": 1, "1004": 1}
}
}
},
"r1-t1": {
"length": 0,
"source" : "srgT",
"target" : "muxR",
"fibers" : {
"S1": {
"src_port": "101T",
"dst_port": "1",
"used": false,
"c_slots": {"1": 1, "2": 1, "3": 1, "4": 1},
"l_slots": {"101": 1, "102": 1, "103": 1, "104": 1},
"s_slots": {"1001": 1, "1002": 1, "1003": 1, "1004": 1}
},
"S2": {
"src_port": "102T",
"dst_port": "2",
"used": false,
"c_slots": {"1": 1, "2": 1, "3": 1, "4": 1},
"l_slots": {"101": 1, "102": 1, "103": 1, "104": 1},
"s_slots": {"1001": 1, "1002": 1, "1003": 1, "1004": 1}
},
"S3": {
"src_port": "103T",
"dst_port": "3",
"used": false,
"c_slots": {"1": 1, "2": 1, "3": 1, "4": 1},
"l_slots": {"101": 1, "102": 1, "103": 1, "104": 1},
"s_slots": {"1001": 1, "1002": 1, "1003": 1, "1004": 1}
}
}
},
"t2-r2": {
"length": 0,
"source" : "muxT",
"target" : "srgR",
"fibers" : {
"M1": {
"src_port": "1",
"dst_port": "101R",
"used": false,
"c_slots": {"1": 1, "2": 1, "3": 1, "4": 1},
"l_slots": {"101": 1, "102": 1, "103": 1, "104": 1},
"s_slots": {"1001": 1, "1002": 1, "1003": 1, "1004": 1}
},
"M2": {
"src_port": "2",
"dst_port": "102R",
"used": false,
"c_slots": {"1": 1, "2": 1, "3": 1, "4": 1},
"l_slots": {"101": 1, "102": 1, "103": 1, "104": 1},
"s_slots": {"1001": 1, "1002": 1, "1003": 1, "1004": 1}
},
"M3": {
"src_port": "3",
"dst_port": "103R",
"used": false,
"c_slots": {"1": 1, "2": 1, "3": 1, "4": 1},
"l_slots": {"101": 1, "102": 1, "103": 1, "104": 1},
"s_slots": {"1001": 1, "1002": 1, "1003": 1, "1004": 1}
}
}
},
"r2-t2": {
"length": 0,
"source" : "srgT",
"target" : "muxR",
"fibers" : {
"S1": {
"src_port": "101T",
"dst_port": "1",
"used": false,
"c_slots": {"1": 1, "2": 1, "3": 1, "4": 1},
"l_slots": {"101": 1, "102": 1, "103": 1, "104": 1},
"s_slots": {"1001": 1, "1002": 1, "1003": 1, "1004": 1}
},
"S2": {
"src_port": "102T",
"dst_port": "2",
"used": false,
"c_slots": {"1": 1, "2": 1, "3": 1, "4": 1},
"l_slots": {"101": 1, "102": 1, "103": 1, "104": 1},
"s_slots": {"1001": 1, "1002": 1, "1003": 1, "1004": 1}
},
"S3": {
"src_port": "103T",
"dst_port": "3",
"used": false,
"c_slots": {"1": 1, "2": 1, "3": 1, "4": 1},
"l_slots": {"101": 1, "102": 1, "103": 1, "104": 1},
"s_slots": {"1001": 1, "1002": 1, "1003": 1, "1004": 1}
}
}
}
}
{
"r1-r2": {
"length": 80,
"source" : "d1",
"target" : "d1",
"fibers" : {
"d1-1": {
"length": 80,
"src_port": "1T",
"dst_port": "1R",
"local_peer_port": "1R",
"remote_peer_port": "1T",
"c_slots": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],
"l_slots": [101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119 ,120],
"s_slots": [501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519 ,520]
},
"d1-2":{
"length": 80,
"src_port": "2T",
"dst_port": "2R",
"local_peer_port": "2R",
"remote_peer_port": "2T",
"c_slots": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],
"l_slots": [101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119 ,120],
"s_slots": [501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519 ,520]
}
}
},
"r2-r1": {
"length": 80,
"source" : "d1",
"target" : "d1",
"fibers" : {
"d1-1" : {
"length": 80,
"src_port": "1T",
"dst_port": "1R",
"local_peer_port": "1R",
"remote_peer_port": "1T",
"c_slots": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],
"l_slots": [101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119 ,120],
"s_slots": [501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519 ,520]
},
"d1-2" : {
"length": 80,
"src_port": "2T",
"dst_port": "2R",
"local_peer_port": "2R",
"remote_peer_port": "2T",
"c_slots": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],
"l_slots": [101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119 ,120],
"s_slots": [501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519 ,520]
}
}
},
"r1-r3": {
"length": 80,
"source" : "d2",
"target" : "d1",
"fibers" : {
"d2-1":{
"length": 80,
"src_port": "3T",
"dst_port": "1R",
"local_peer_port": "3R",
"remote_peer_port": "1T",
"c_slots": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],
"l_slots": [101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119 ,120],
"s_slots": [501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519 ,520]
},
"d2-2":{
"length": 80,
"src_port": "4T",
"dst_port": "2R",
"local_peer_port": "4R",
"remote_peer_port": "2T",
"c_slots": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],
"l_slots": [101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119 ,120],
"s_slots": [501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519 ,520]
}
}
},
"r3-r1": {
"length": 80,
"source" : "d1",
"target" : "d2",
"fibers" : {
"d1-1": {
"length": 80,
"src_port": "1T",
"dst_port": "3R",
"local_peer_port": "1R",
"remote_peer_port": "3T",
"c_slots": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],
"l_slots": [101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119 ,120],
"s_slots": [501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519 ,520]
},
"d1-2": {
"length": 80,
"src_port": "2T",
"dst_port": "4R",
"local_peer_port": "2R",
"remote_peer_port": "4T",
"c_slots": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],
"l_slots": [101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119 ,120],
"s_slots": [501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519 ,520]
}
}
},
"r2-r3": {
"length": 80,
"source" : "d2",
"target" : "d2",
"fibers" : {
"d2-1": {
"length": 80,
"src_port": "3T",
"dst_port": "3R",
"local_peer_port": "3R",
"remote_peer_port": "3T",
"c_slots": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],
"l_slots": [101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119 ,120],
"s_slots": [501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519 ,520]
},
"d2-2": {
"length": 80,
"src_port": "4T",
"dst_port": "4R",
"local_peer_port": "4R",
"remote_peer_port": "4T",
"c_slots": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],
"l_slots": [101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119 ,120],
"s_slots": [501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519 ,520]
}
}
},
"r3-r2": {
"length": 80,
"source" : "d2",
"target" : "d2",
"fibers" : {
"d2-1": {
"length": 80,
"src_port": "3T",
"dst_port": "3R",
"local_peer_port": "3R",
"remote_peer_port": "3T",
"c_slots": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],
"l_slots": [101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119 ,120],
"s_slots": [501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519 ,520]
},
"d2-2":{
"length": 80,
"src_port": "4T",
"dst_port": "4R",
"local_peer_port": "4R",
"remote_peer_port": "4T",
"c_slots": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],
"l_slots": [101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119 ,120],
"s_slots": [501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519 ,520]
}
}
},
"t1-r1": {
"length": 0,
"source" : "muxT",
"target" : "srgR",
"fibers" : {
"M1": {
"length": 0,
"src_port": "1",
"dst_port": "101R",
"local_peer_port": "1",
"remote_peer_port": "101T",
"used": false,
"c_slots": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],
"l_slots": [101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119 ,120],
"s_slots": [501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519 ,520]
},
"M2": {
"length": 0,
"src_port": "2",
"dst_port": "102R",
"local_peer_port": "2",
"remote_peer_port": "102T",
"used": false,
"c_slots": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],
"l_slots": [101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119 ,120],
"s_slots": [501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519 ,520]
},
"M3": {
"length": 0,
"src_port": "3",
"dst_port": "103R",
"local_peer_port": "3",
"remote_peer_port": "103T",
"used": false,
"c_slots": [],
"l_slots": [101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119 ,120],
"s_slots": [501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519 ,520]
}
}
},
"r1-t1": {
"length": 0,
"source" : "srgT",
"target" : "muxR",
"fibers" : {
"S1": {
"length": 0,
"src_port": "101T",
"dst_port": "1",
"local_peer_port": "101R",
"remote_peer_port": "1",
"used": false,
"c_slots": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],
"l_slots": [101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119 ,120],
"s_slots": [501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519 ,520]
},
"S2": {
"length": 0,
"src_port": "102T",
"dst_port": "2",
"local_peer_port": "102T",
"remote_peer_port": "2",
"used": false,
"c_slots": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],
"l_slots": [101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119 ,120],
"s_slots": [501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519 ,520]
},
"S3": {
"length": 0,
"src_port": "103T",
"dst_port": "3",
"local_peer_port": "103R",
"remote_peer_port": "3",
"used": false,
"c_slots": [],
"l_slots": [101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119 ,120],
"s_slots": [501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519 ,520]
}
}
},
"t2-r2": {
"length": 0,
"source" : "muxT",
"target" : "srgR",
"fibers" : {
"M1": {
"length": 0,
"src_port": "1",
"dst_port": "101R",
"local_peer_port": "1",
"remote_peer_port": "101T",
"used": false,
"c_slots": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],
"l_slots": [101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119 ,120],
"s_slots": [501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519 ,520]
},
"M2": {
"length": 0,
"src_port": "2",
"dst_port": "102R",
"local_peer_port": "2",
"remote_peer_port": "102T",
"used": false,
"c_slots": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],
"l_slots": [101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119 ,120],
"s_slots": [501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519 ,520]
},
"M3": {
"length": 0,
"src_port": "3",
"dst_port": "103R",
"local_peer_port": "3",
"remote_peer_port": "103T",
"used": false,
"c_slots": [],
"l_slots": [101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119 ,120],
"s_slots": [501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519 ,520]
}
}
},
"r2-t2": {
"length": 0,
"source" : "srgT",
"target" : "muxR",
"fibers" : {
"S1": {
"length": 0,
"src_port": "101T",
"dst_port": "1",
"local_peer_port": "101R",
"remote_peer_port": "1",
"used": false,
"c_slots": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],
"l_slots": [101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119 ,120],
"s_slots": [501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519 ,520]
},
"S2": {
"length": 0,
"src_port": "102T",
"dst_port": "2",
"local_peer_port": "102R",
"remote_peer_port": "2",
"used": false,
"c_slots": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20],
"l_slots": [101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119 ,120],
"s_slots": [501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519 ,520]
},
"S3": {
"length": 0,
"src_port": "103T",
"dst_port": "3",
"local_peer_port": "103R",
"remote_peer_port": "3",
"used": false,
"c_slots": [],
"l_slots": [101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119 ,120],
"s_slots": [501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519 ,520]
}
}
}
}
# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
Flask==1.1.2
flask-restplus==0.13.0
itsdangerous==1.1.0
Jinja2==2.11.3
MarkupSafe==1.1.1
numpy==1.23.0
Werkzeug==0.16.1
# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import numpy as np
from variables import *
import json
def common_slots(a, b):
return list(np.intersect1d(a, b))
def map_modulation_to_op(mod):
if mod == "DP-QPSK":
return 1
if mod == "DP-16QAM":
return 7
if mod == "DP-64QAM":
return 10
def map_band_to_slot(band):
return int(band/12.5)
def map_rate_to_slot(rate):
if rate == 100:
mod = "DP-QPSK"
slots = 4
op = map_modulation_to_op(mod)
return op, slots
if rate == 400:
mod = "DP-16QAM"
slots = 8
op = map_modulation_to_op(mod)
return op, slots
if rate == 1000:
mod = "DP-64QAM"
slots = 18
op = map_modulation_to_op(mod)
return op, slots
else:
return 2, 5
def consecutives(x, val):
res = []
temp = []
x.sort()
temp.append(x[0])
y = 1
for i in range(1, len(x)):
if x[i] == x[i - 1] + 1:
y += 1
temp.append(x[i])
else:
if y >= val:
res.extend(temp)
temp = [x[i]]
y = 1
if i == len(x) - 1 and y >= val:
res.extend(temp)
return res
def combine(ls1, ls2):
temp = ls1
for i in ls2:
if i not in ls1:
temp.append(i)
temp.sort()
return temp
def list_in_list(a, b):
# convert list A to numpy array
a_arr = np.array(a)
# convert list B to numpy array
b_arr = np.array(b)
for i in range(len(b_arr)):
if np.array_equal(a_arr, b_arr[i:i + len(a_arr)]):
return True
return False
def reverse_link(link):
s, d = link.split('-')
r_link = "{}-{}".format(d, s)
return r_link
def get_slot_frequency(b, n):
if debug:
print(n)
if b == "c_slots":
return Fc + n * 12.5
if b == "s_slots":
return Fs + n * 12.5
if b == "l_slots":
return Fl + n * 12.5
def freqency_converter(b, slots):
l = len(slots)
if debug:
print(slots)
if l % 2 == 0:
if debug:
print("pari {}".format(l))
fx = get_slot_frequency(b, slots[int(l / 2)-1])
if debug:
print(fx)
#GHz
# #f0 = fx + 6.25
#MHz
f0 = int((fx + 6.25) * 1000)
else:
f0 = get_slot_frequency(b, slots[int((l + 1) / 2) - 1])
#GHz
# #return f0, 12.5 * l
# MHz
return f0, int((12.5 * l) * 1000)
def readTopologyData(nodes, topology):
nodes_file = open(nodes, 'r')
topo_file = open(topology, 'r')
nodes = json.load(nodes_file)
topo = json.load(topo_file)
print(topo)
nodes_file.close()
topo_file.close()
return nodes, topo
def reverse_links(links):
temp_links = links.copy()
temp_links.reverse()
result = []
for link in temp_links:
[a, b] = link.split("-")
result.append("{}-{}".format(b, a))
return result
def get_links_from_node(topology, node):
result = {}
for link in topology["links"]:
if "{}-".format(node) in link["optical_link"]["name"]:
result[link["optical_link"]["name"]] = link
return result
def get_links_to_node(topology, node):
result = {}
for link in topology["links"]:
if "-{}".format(node) in link["optical_link"]["name"]:
result[link["optical_link"]["name"]] = link
return result
def slot_selection(c, l, s, n_slots, Nc, Nl, Ns):
# First Fit
if isinstance(n_slots, int):
slot_c = n_slots
slot_l = n_slots
slot_s = n_slots
else:
slot_c = Nc
slot_l = Nl
slot_s = Ns
if len(c) >= slot_c:
return "c_slots", c[0: slot_c]
elif len(l) >= slot_l:
return "l_slots", l[0: slot_l]
elif len(l) >= slot_s:
return "s_slots", s[0: slot_s]
else:
return None, None
# Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
debug = 1
Fl = 184800
Fc = 192000
Fs = 196200
Nl = 550
Nc = 320
#Nc = 10
Ns = 720
nodes_json = 'json_files/nodes.json'
topology_json = 'json_files/tfs.json' #LAST
#topology_json = 'json_files/optical_TFSworking.json' #LAST
#topology_json = 'json_files/optical_topoTFS.json'
#topology_json = 'json_files/topo_2_links.json'
testing = 1
...@@ -22,9 +22,9 @@ build pathcomp: ...@@ -22,9 +22,9 @@ build pathcomp:
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" $CI_REGISTRY
script: script:
# This first build tags the builder resulting image to prevent being removed by dangling image removal command # This first build tags the builder resulting image to prevent being removed by dangling image removal command
- docker build -t "${IMAGE_NAME}-backend:${IMAGE_TAG}-builder" --target builder -f ./src/$IMAGE_NAME/backend/Dockerfile . - docker buildx build -t "${IMAGE_NAME}-backend:${IMAGE_TAG}-builder" --target builder -f ./src/$IMAGE_NAME/backend/Dockerfile .
- docker build -t "${IMAGE_NAME}-backend:$IMAGE_TAG" -f ./src/$IMAGE_NAME/backend/Dockerfile . - docker buildx build -t "${IMAGE_NAME}-backend:$IMAGE_TAG" -f ./src/$IMAGE_NAME/backend/Dockerfile .
- docker build -t "${IMAGE_NAME}-frontend:$IMAGE_TAG" -f ./src/$IMAGE_NAME/frontend/Dockerfile . - docker buildx build -t "${IMAGE_NAME}-frontend:$IMAGE_TAG" -f ./src/$IMAGE_NAME/frontend/Dockerfile .
- docker tag "${IMAGE_NAME}-backend:$IMAGE_TAG" "$CI_REGISTRY_IMAGE/${IMAGE_NAME}-backend:$IMAGE_TAG" - docker tag "${IMAGE_NAME}-backend:$IMAGE_TAG" "$CI_REGISTRY_IMAGE/${IMAGE_NAME}-backend:$IMAGE_TAG"
- docker tag "${IMAGE_NAME}-frontend:$IMAGE_TAG" "$CI_REGISTRY_IMAGE/${IMAGE_NAME}-frontend:$IMAGE_TAG" - docker tag "${IMAGE_NAME}-frontend:$IMAGE_TAG" "$CI_REGISTRY_IMAGE/${IMAGE_NAME}-frontend:$IMAGE_TAG"
- docker push "$CI_REGISTRY_IMAGE/${IMAGE_NAME}-backend:$IMAGE_TAG" - docker push "$CI_REGISTRY_IMAGE/${IMAGE_NAME}-backend:$IMAGE_TAG"
......
...@@ -54,18 +54,22 @@ RUN rm *.proto ...@@ -54,18 +54,22 @@ RUN rm *.proto
RUN find . -type f -exec sed -i -E 's/(import\ .*)_pb2/from . \1_pb2/g' {} \; RUN find . -type f -exec sed -i -E 's/(import\ .*)_pb2/from . \1_pb2/g' {} \;
# Create component sub-folders, get specific Python packages # Create component sub-folders, get specific Python packages
RUN mkdir -p /var/teraflow/pathcomp RUN mkdir -p /var/teraflow/pathcomp/frontend
WORKDIR /var/teraflow/pathcomp WORKDIR /var/teraflow/pathcomp/frontend
COPY src/pathcomp/frontend/requirements.in requirements.in COPY src/pathcomp/frontend/requirements.in requirements.in
RUN pip-compile --quiet --output-file=requirements.txt requirements.in RUN pip-compile --quiet --output-file=requirements.txt requirements.in
RUN python3 -m pip install -r requirements.txt RUN python3 -m pip install -r requirements.txt
# Add component files into working directory # Add component files into working directory
WORKDIR /var/teraflow WORKDIR /var/teraflow
COPY src/pathcomp/__init__.py pathcomp/__init__.py
COPY src/pathcomp/frontend/. pathcomp/frontend/
COPY src/context/__init__.py context/__init__.py COPY src/context/__init__.py context/__init__.py
COPY src/context/client/. context/client/ COPY src/context/client/. context/client/
COPY src/device/__init__.py device/__init__.py COPY src/device/__init__.py device/__init__.py
COPY src/device/client/. device/client/ COPY src/device/client/. device/client/
# Requires entire Forecaster component for the tests
# TODO: Improve testing framework
COPY src/forecaster/. forecaster/ COPY src/forecaster/. forecaster/
COPY src/monitoring/__init__.py monitoring/__init__.py COPY src/monitoring/__init__.py monitoring/__init__.py
COPY src/monitoring/client/. monitoring/client/ COPY src/monitoring/client/. monitoring/client/
...@@ -73,7 +77,6 @@ COPY src/service/__init__.py service/__init__.py ...@@ -73,7 +77,6 @@ COPY src/service/__init__.py service/__init__.py
COPY src/service/client/. service/client/ COPY src/service/client/. service/client/
COPY src/slice/__init__.py slice/__init__.py COPY src/slice/__init__.py slice/__init__.py
COPY src/slice/client/. slice/client/ COPY src/slice/client/. slice/client/
COPY src/pathcomp/. pathcomp/
# Start the service # Start the service
ENTRYPOINT ["python", "-m", "pathcomp.frontend.service"] ENTRYPOINT ["python", "-m", "pathcomp.frontend.service"]
...@@ -24,7 +24,7 @@ build policy: ...@@ -24,7 +24,7 @@ build policy:
- export IMAGE_TAG=$(grep -m1 '<version>' ./src/$IMAGE_NAME_POLICY/pom.xml | grep -oP '(?<=>).*(?=<)') - export IMAGE_TAG=$(grep -m1 '<version>' ./src/$IMAGE_NAME_POLICY/pom.xml | grep -oP '(?<=>).*(?=<)')
- echo "IMAGE_TAG=${IMAGE_TAG}" >> ${BUILD_ENV_POLICY} - echo "IMAGE_TAG=${IMAGE_TAG}" >> ${BUILD_ENV_POLICY}
- cat ${BUILD_ENV_POLICY} - cat ${BUILD_ENV_POLICY}
- docker build -t "$IMAGE_NAME_POLICY:$IMAGE_TAG" -f ./src/$IMAGE_NAME_POLICY/src/main/docker/Dockerfile.multistage.jvm ./src/$IMAGE_NAME_POLICY/ --target builder - docker buildx build -t "$IMAGE_NAME_POLICY:$IMAGE_TAG" -f ./src/$IMAGE_NAME_POLICY/src/main/docker/Dockerfile.multistage.jvm ./src/$IMAGE_NAME_POLICY/ --target builder
after_script: after_script:
- docker images --filter="dangling=true" --quiet | xargs -r docker rmi - docker images --filter="dangling=true" --quiet | xargs -r docker rmi
artifacts: artifacts:
...@@ -50,7 +50,7 @@ unit_test policy: ...@@ -50,7 +50,7 @@ unit_test policy:
- docker rm ${REPORTS_CONTAINER} || true - docker rm ${REPORTS_CONTAINER} || true
script: script:
- echo "Running tests for image ${IMAGE_TAG}" - echo "Running tests for image ${IMAGE_TAG}"
- docker build -t "$IMAGE_NAME_POLICY:$IMAGE_TAG" -f ./src/$IMAGE_NAME_POLICY/src/main/docker/Dockerfile.multistage.jvm ./src/$IMAGE_NAME_POLICY/ --target unit-test - docker buildx build -t "$IMAGE_NAME_POLICY:$IMAGE_TAG" -f ./src/$IMAGE_NAME_POLICY/src/main/docker/Dockerfile.multistage.jvm ./src/$IMAGE_NAME_POLICY/ --target unit-test
# Transfer JaCoCo and Surefire reports from within tests image # Transfer JaCoCo and Surefire reports from within tests image
- docker create --name ${REPORTS_CONTAINER} "$IMAGE_NAME_POLICY:$IMAGE_TAG" - docker create --name ${REPORTS_CONTAINER} "$IMAGE_NAME_POLICY:$IMAGE_TAG"
- mkdir -p ${REPORTS_PATH_POLICY} - mkdir -p ${REPORTS_PATH_POLICY}
...@@ -60,7 +60,7 @@ unit_test policy: ...@@ -60,7 +60,7 @@ unit_test policy:
- cat ${REPORTS_PATH_POLICY}/coverage.html | grep -o 'Total[^%]*%' | sed 's/<.*>/ /; s/Total/JaCoCo Coverage Total:/' - cat ${REPORTS_PATH_POLICY}/coverage.html | grep -o 'Total[^%]*%' | sed 's/<.*>/ /; s/Total/JaCoCo Coverage Total:/'
- docker run -v "$(pwd)/src/${IMAGE_NAME_POLICY}:/${IMAGE_NAME_POLICY}" --rm registry.gitlab.com/haynes/jacoco2cobertura:1.0.7 python /opt/cover2cover.py ${IMAGE_NAME_POLICY}/reports/jacoco.xml ${IMAGE_NAME_POLICY}/src/main/java > ${REPORTS_PATH_POLICY}/cobertura.xml - docker run -v "$(pwd)/src/${IMAGE_NAME_POLICY}:/${IMAGE_NAME_POLICY}" --rm registry.gitlab.com/haynes/jacoco2cobertura:1.0.7 python /opt/cover2cover.py ${IMAGE_NAME_POLICY}/reports/jacoco.xml ${IMAGE_NAME_POLICY}/src/main/java > ${REPORTS_PATH_POLICY}/cobertura.xml
# Build final image # Build final image
- docker build -t "$IMAGE_NAME_POLICY:$IMAGE_TAG" -f ./src/$IMAGE_NAME_POLICY/src/main/docker/Dockerfile.multistage.jvm ./src/$IMAGE_NAME_POLICY/ --target release - docker buildx build -t "$IMAGE_NAME_POLICY:$IMAGE_TAG" -f ./src/$IMAGE_NAME_POLICY/src/main/docker/Dockerfile.multistage.jvm ./src/$IMAGE_NAME_POLICY/ --target release
- docker tag "$IMAGE_NAME_POLICY:$IMAGE_TAG" "$CI_REGISTRY_IMAGE/$IMAGE_NAME_POLICY:$IMAGE_TAG" - docker tag "$IMAGE_NAME_POLICY:$IMAGE_TAG" "$CI_REGISTRY_IMAGE/$IMAGE_NAME_POLICY:$IMAGE_TAG"
- docker push "$CI_REGISTRY_IMAGE/$IMAGE_NAME_POLICY:$IMAGE_TAG" - docker push "$CI_REGISTRY_IMAGE/$IMAGE_NAME_POLICY:$IMAGE_TAG"
after_script: after_script:
......
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.1/apache-maven-3.8.1-bin.zip distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.8.2/apache-maven-3.8.2-bin.zip
wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar
...@@ -56,9 +56,10 @@ ...@@ -56,9 +56,10 @@
<sonarsource-scanner-plugin.version>3.8.0.2131</sonarsource-scanner-plugin.version> <sonarsource-scanner-plugin.version>3.8.0.2131</sonarsource-scanner-plugin.version>
<spotless-plugin.version>2.10.3</spotless-plugin.version> <spotless-plugin.version>2.10.3</spotless-plugin.version>
<versions-maven-plugin.version>2.8.1</versions-maven-plugin.version> <versions-maven-plugin.version>2.8.1</versions-maven-plugin.version>
<quarkus-maven-plugin.version>${quarkus.platform.version}</quarkus-maven-plugin.version> <quarkus-maven-plugin.version>3.1.3.Final</quarkus-maven-plugin.version>
<quarkus-bootstrap-maven-version>2.16.12.Final</quarkus-bootstrap-maven-version>
<!-- Third-party Dependencies --> <!-- Third-party Dependencies -->
<quarkus.platform.version>2.2.2.Final</quarkus.platform.version> <quarkus.platform.version>3.1.3.Final</quarkus.platform.version>
</properties> </properties>
<distributionManagement> <distributionManagement>
...@@ -151,6 +152,13 @@ ...@@ -151,6 +152,13 @@
<artifactId>quarkus-config-yaml</artifactId> <artifactId>quarkus-config-yaml</artifactId>
</dependency> </dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.30</version>
<scope>provided</scope>
</dependency>
<!-- Testing --> <!-- Testing -->
<dependency> <dependency>
<groupId>org.assertj</groupId> <groupId>org.assertj</groupId>
...@@ -277,7 +285,7 @@ ...@@ -277,7 +285,7 @@
<plugin> <plugin>
<groupId>io.quarkus</groupId> <groupId>io.quarkus</groupId>
<artifactId>quarkus-bootstrap-maven-plugin</artifactId> <artifactId>quarkus-bootstrap-maven-plugin</artifactId>
<version>${quarkus-maven-plugin.version}</version> <version>${quarkus-bootstrap-maven-version}</version>
</plugin> </plugin>
<plugin> <plugin>
......
...@@ -25,10 +25,10 @@ import context.ContextOuterClass.DeviceId; ...@@ -25,10 +25,10 @@ import context.ContextOuterClass.DeviceId;
import context.ContextOuterClass.DeviceOperationalStatusEnum; import context.ContextOuterClass.DeviceOperationalStatusEnum;
import context.ContextOuterClass.Location.LocationCase; import context.ContextOuterClass.Location.LocationCase;
import context.ContextOuterClass.Uuid; import context.ContextOuterClass.Uuid;
import jakarta.inject.Singleton;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import javax.inject.Singleton;
import kpi_sample_types.KpiSampleTypes; import kpi_sample_types.KpiSampleTypes;
import monitoring.Monitoring; import monitoring.Monitoring;
import monitoring.Monitoring.AlarmID; import monitoring.Monitoring.AlarmID;
...@@ -85,7 +85,6 @@ import org.etsi.tfs.policy.context.model.ServiceTypeEnum; ...@@ -85,7 +85,6 @@ import org.etsi.tfs.policy.context.model.ServiceTypeEnum;
import org.etsi.tfs.policy.context.model.SliceId; import org.etsi.tfs.policy.context.model.SliceId;
import org.etsi.tfs.policy.context.model.TopologyId; import org.etsi.tfs.policy.context.model.TopologyId;
import org.etsi.tfs.policy.kpi_sample_types.model.KpiSampleType; import org.etsi.tfs.policy.kpi_sample_types.model.KpiSampleType;
import org.etsi.tfs.policy.model.*;
import org.etsi.tfs.policy.monitoring.model.AlarmDescriptor; import org.etsi.tfs.policy.monitoring.model.AlarmDescriptor;
import org.etsi.tfs.policy.monitoring.model.AlarmResponse; import org.etsi.tfs.policy.monitoring.model.AlarmResponse;
import org.etsi.tfs.policy.monitoring.model.AlarmSubscription; import org.etsi.tfs.policy.monitoring.model.AlarmSubscription;
...@@ -101,6 +100,21 @@ import org.etsi.tfs.policy.monitoring.model.MonitorKpiRequest; ...@@ -101,6 +100,21 @@ import org.etsi.tfs.policy.monitoring.model.MonitorKpiRequest;
import org.etsi.tfs.policy.monitoring.model.StringKpiValue; import org.etsi.tfs.policy.monitoring.model.StringKpiValue;
import org.etsi.tfs.policy.monitoring.model.SubsDescriptor; import org.etsi.tfs.policy.monitoring.model.SubsDescriptor;
import org.etsi.tfs.policy.monitoring.model.SubsResponse; import org.etsi.tfs.policy.monitoring.model.SubsResponse;
import org.etsi.tfs.policy.policy.model.*;
import org.etsi.tfs.policy.policy.model.BooleanOperator;
import org.etsi.tfs.policy.policy.model.NumericalOperator;
import org.etsi.tfs.policy.policy.model.PolicyRule;
import org.etsi.tfs.policy.policy.model.PolicyRuleAction;
import org.etsi.tfs.policy.policy.model.PolicyRuleActionConfig;
import org.etsi.tfs.policy.policy.model.PolicyRuleActionEnum;
import org.etsi.tfs.policy.policy.model.PolicyRuleBasic;
import org.etsi.tfs.policy.policy.model.PolicyRuleCondition;
import org.etsi.tfs.policy.policy.model.PolicyRuleDevice;
import org.etsi.tfs.policy.policy.model.PolicyRuleService;
import org.etsi.tfs.policy.policy.model.PolicyRuleState;
import org.etsi.tfs.policy.policy.model.PolicyRuleStateEnum;
import org.etsi.tfs.policy.policy.model.PolicyRuleTypeDevice;
import org.etsi.tfs.policy.policy.model.PolicyRuleTypeService;
import policy.Policy; import policy.Policy;
import policy.Policy.PolicyRuleId; import policy.Policy.PolicyRuleId;
import policy.PolicyAction; import policy.PolicyAction;
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
package org.etsi.tfs.policy; package org.etsi.tfs.policy;
import javax.enterprise.context.ApplicationScoped; import jakarta.enterprise.context.ApplicationScoped;
import org.eclipse.microprofile.health.HealthCheck; import org.eclipse.microprofile.health.HealthCheck;
import org.eclipse.microprofile.health.HealthCheckResponse; import org.eclipse.microprofile.health.HealthCheckResponse;
import org.eclipse.microprofile.health.Liveness; import org.eclipse.microprofile.health.Liveness;
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
package org.etsi.tfs.policy; package org.etsi.tfs.policy;
import javax.enterprise.context.ApplicationScoped; import jakarta.enterprise.context.ApplicationScoped;
import org.eclipse.microprofile.health.HealthCheck; import org.eclipse.microprofile.health.HealthCheck;
import org.eclipse.microprofile.health.HealthCheckResponse; import org.eclipse.microprofile.health.HealthCheckResponse;
import org.eclipse.microprofile.health.Readiness; import org.eclipse.microprofile.health.Readiness;
......
/*
* Copyright 2022-2023 ETSI TeraFlowSDN - TFS OSG (https://tfs.etsi.org/)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.etsi.tfs.policy.common;
import org.etsi.tfs.policy.policy.model.PolicyRuleState;
import org.etsi.tfs.policy.policy.model.PolicyRuleStateEnum;
public class ApplicationProperties {
public static final String INVALID_MESSAGE = "%s is invalid.";
public static final String VALID_MESSAGE = "%s is valid.";
public static final PolicyRuleState INSERTED_POLICYRULE_STATE =
new PolicyRuleState(
PolicyRuleStateEnum.POLICY_INSERTED, "Successfully entered to INSERTED state");
public static final PolicyRuleState VALIDATED_POLICYRULE_STATE =
new PolicyRuleState(
PolicyRuleStateEnum.POLICY_VALIDATED, "Successfully transitioned to VALIDATED state");
public static final PolicyRuleState PROVISIONED_POLICYRULE_STATE =
new PolicyRuleState(
PolicyRuleStateEnum.POLICY_PROVISIONED,
"Successfully transitioned from VALIDATED to PROVISIONED state");
public static final PolicyRuleState ACTIVE_POLICYRULE_STATE =
new PolicyRuleState(
PolicyRuleStateEnum.POLICY_ACTIVE,
"Successfully transitioned from PROVISIONED to ACTIVE state");
public static final PolicyRuleState ENFORCED_POLICYRULE_STATE =
new PolicyRuleState(
PolicyRuleStateEnum.POLICY_ENFORCED,
"Successfully transitioned from ACTIVE to ENFORCED state");
public static final PolicyRuleState INEFFECTIVE_POLICYRULE_STATE =
new PolicyRuleState(
PolicyRuleStateEnum.POLICY_INEFFECTIVE,
"Transitioned from ENFORCED to INEFFECTIVE state");
public static final PolicyRuleState EFFECTIVE_POLICYRULE_STATE =
new PolicyRuleState(
PolicyRuleStateEnum.POLICY_EFFECTIVE,
"Successfully transitioned from ENFORCED to EFFECTIVE state");
public static final PolicyRuleState UPDATED_POLICYRULE_STATE =
new PolicyRuleState(
PolicyRuleStateEnum.POLICY_UPDATED, "Successfully entered to UPDATED state");
public static final PolicyRuleState REMOVED_POLICYRULE_STATE =
new PolicyRuleState(
PolicyRuleStateEnum.POLICY_REMOVED, "Successfully entered to REMOVED state");
}