blob: 7efed0c95ce4eef2b2ded3265240f5a0564cb54d [file] [log] [blame]
Jeremy Ronquillob27ce4c2017-07-17 12:41:28 -07001"""
Jeremy Ronquillo23fb2162017-09-15 14:59:57 -07002Copyright 2016 Open Networking Foundation ( ONF )
Jeremy Ronquillob27ce4c2017-07-17 12:41:28 -07003
4Please refer questions to either the onos test mailing list at <onos-test@onosproject.org>,
5the System Testing Plans and Results wiki page at <https://wiki.onosproject.org/x/voMg>,
6or the System Testing Guide page at <https://wiki.onosproject.org/x/WYQg>
7
8 TestON is free software: you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation, either version 2 of the License, or
Jeremy Ronquillo23fb2162017-09-15 14:59:57 -070011 ( at your option ) any later version.
Jeremy Ronquillob27ce4c2017-07-17 12:41:28 -070012
13 TestON is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with TestON. If not, see <http://www.gnu.org/licenses/>.
20"""
Jeremy Ronquillo23fb2162017-09-15 14:59:57 -070021"""
Jeremy Ronquillob27ce4c2017-07-17 12:41:28 -070022Simple 2 switch topology for topologoy performance test
Jeremy Ronquillo23fb2162017-09-15 14:59:57 -070023"""
YPZhang0433bee2016-07-12 16:10:59 -070024from mininet.topo import Topo
25
Jeremy Ronquillo23fb2162017-09-15 14:59:57 -070026
YPZhang0433bee2016-07-12 16:10:59 -070027class MyTopo( Topo ):
Jeremy Ronquillo23fb2162017-09-15 14:59:57 -070028
29 def __init__( self ):
30 Topo.__init__( self )
31 s1 = self.addSwitch( "s1", dpid="0000000000000001" )
32 s2 = self.addSwitch( "s2", dpid="0000000000000002" )
YPZhang0433bee2016-07-12 16:10:59 -070033
34 h1 = self.addHost( "h1" )
35 h2 = self.addHost( "h2" )
36 self.addLink( s1, s2 )
37 self.addLink( s1, h1 )
38 self.addLink( s2, h2 )
39
40topos = { 'mytopo': ( lambda: MyTopo() ) }