-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTopo_Specs_General.py
41 lines (37 loc) · 1.85 KB
/
Topo_Specs_General.py
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
global switch_port_mac_dict
switch_port_mac_dict = {'00:00:22:67:d7:d5:d4:48': {'1': 'fa:16:3e:00:75:1b', '2': 'fa:16:3e:00:36:b7', '3': 'fa:16:3e:00:5f:be',
'4': 'fa:16:3e:00:6b:1f'},
'00:00:ce:2b:ca:b2:20:43': {'1': 'fa:16:3e:00:41:f1', '2': 'fa:16:3e:00:5f:d9', '3': 'fa:16:3e:00:77:33',
'4': 'fa:16:3e:00:1c:d7'},
'00:00:0e:2b:55:4b:29:44': {'1': 'fa:16:3e:00:61:73', '2': 'fa:16:3e:00:3d:ab', '3': 'fa:16:3e:00:5a:0f',
'4': 'fa:16:3e:00:5d:b9'},
'00:00:da:e7:78:d1:30:44': {'1': 'fa:16:3e:00:4c:20', '2': 'fa:16:3e:00:11:94', '3': 'fa:16:3e:00:38:13'},
'00:00:3a:fc:ce:52:5d:4d': {'1': 'fa:16:3e:00:4e:8f', '2': 'fa:16:3e:00:74:d4', '3': 'fa:16:3e:00:74:72',
'4': 'fa:16:3e:00:53:68'},
'00:00:9a:50:9a:d4:52:4f': {'1': 'fa:16:3e:00:63:3c', '2': 'fa:16:3e:00:17:c3', '3': 'fa:16:3e:00:38:05',
'4': 'fa:16:3e:00:61:1e'},
}
sw1 = '00:00:22:67:d7:d5:d4:48'
sw2 = '00:00:ce:2b:ca:b2:20:43'
sw3 = '00:00:0e:2b:55:4b:29:44'
sw4 = '00:00:da:e7:78:d1:30:44'
sw5 = '00:00:3a:fc:ce:52:5d:4d'
sw6 = '00:00:9a:50:9a:d4:52:4f'
global switch_port_mat
global switch_number_dpid
dpid_switch_number = {sw1: 0, sw2: 1, sw3: 2, sw4: 3, sw5: 4, sw6: 5}
switch_number_dpid = {0: sw1, 1: sw2, 2: sw3, 3: sw4, 4: sw5, 5: sw6}
switch_port_mat = [[0, '1', 0, 0, 0,'3'],
['1', 0,'4',0,'3', 0],
[0,'3', 0,'4', 0,'1'],
[0, 0,'3', 0, '1', 0],
[0,'3', 0,'2', 0,'4'],
['2', 0,'1', 0,'3', 0]
]
# dictionary of switches with key = dpid
global switch_dict
switch_dict = {}
global paths
paths = {sw1: {
sw4: [[0, 1, 2, 3], [0, 1, 4, 3], [0, 5, 4, 3], [0, 1, 2, 5, 4, 3], [0, 5, 4, 1, 2, 3], [0, 5, 2, 1, 4, 3],
[0, 1, 4, 5, 2, 3], [0, 5, 2, 3]]}}