Move init() into Mininet() and remove calls (since called automatically.)

Note: we should probably rename it "setup()" to avoid confusion.
This commit is contained in:
Bob Lantz
2012-03-09 14:10:20 -08:00
parent e3c074b881
commit 8e3699eca6
7 changed files with 31 additions and 41 deletions
+2 -5
View File
@@ -5,8 +5,8 @@
import unittest
from mininet.net import init, Mininet
from mininet.node import Host, Controller, ControllerParams
from mininet.net import Mininet
from mininet.node import Host, Controller
from mininet.node import UserSwitch, OVSKernelSwitch
from mininet.topo import SingleSwitchTopo, LinearTopo
from mininet.log import setLogLevel
@@ -21,7 +21,6 @@ class testSingleSwitch( unittest.TestCase ):
def testMinimal( self ):
"Ping test with both datapaths on minimal topology"
init()
for switch in SWITCHES.values():
mn = Mininet( SingleSwitchTopo(), switch, Host, Controller )
dropped = mn.run( mn.ping )
@@ -29,7 +28,6 @@ class testSingleSwitch( unittest.TestCase ):
def testSingle5( self ):
"Ping test with both datapaths on 5-host single-switch topology"
init()
for switch in SWITCHES.values():
mn = Mininet( SingleSwitchTopo( k=5 ), switch, Host, Controller )
dropped = mn.run( mn.ping )
@@ -41,7 +39,6 @@ class testLinear( unittest.TestCase ):
def testLinear5( self ):
"Ping test with both datapaths on a 5-switch topology"
init()
for switch in SWITCHES.values():
mn = Mininet( LinearTopo( k=5 ), switch, Host, Controller )
dropped = mn.run( mn.ping )