YPZhang | 0433bee | 2016-07-12 16:10:59 -0700 | [diff] [blame] | 1 | ''' |
2 | imple 2 switch topology for topologoy performance test | ||||
3 | ''' | ||||
4 | |||||
5 | from mininet.topo import Topo | ||||
6 | |||||
7 | class MyTopo( Topo ): | ||||
8 | def __init__(self): | ||||
9 | Topo.__init__(self) | ||||
10 | s1 = self.addSwitch( "s1", dpid="0000000000000001") | ||||
11 | s2 = self.addSwitch( "s2", dpid="0000000000000002") | ||||
12 | |||||
13 | h1 = self.addHost( "h1" ) | ||||
14 | h2 = self.addHost( "h2" ) | ||||
15 | self.addLink( s1, s2 ) | ||||
16 | self.addLink( s1, h1 ) | ||||
17 | self.addLink( s2, h2 ) | ||||
18 | |||||
19 | topos = { 'mytopo': ( lambda: MyTopo() ) } |