Thomas Vachuska | 164fa5c | 2014-12-02 21:59:41 -0800 | [diff] [blame] | 1 | |
2 | from mininet.topo import Topo | ||||
3 | |||||
4 | class MyTopo( Topo ): | ||||
5 | "10 'floating' switch topology" | ||||
6 | |||||
7 | def __init__( self ): | ||||
8 | # Initialize topology | ||||
9 | Topo.__init__( self ) | ||||
10 | |||||
11 | sw_list = [] | ||||
12 | swC = self.addSwitch('sc', dpid = 'ffffffff00000001') | ||||
13 | |||||
14 | for i in range(1, 201): | ||||
15 | switch=self.addSwitch('s'+str(i), dpid = str(i).zfill(16)) | ||||
16 | self.addLink(switch,swC) | ||||
17 | |||||
18 | sw_list.append(switch) | ||||
19 | |||||
20 | topos = { 'mytopo': ( lambda: MyTopo() ) } |