Remove deprecated ControllerParams (for now.)

This commit is contained in:
Bob Lantz
2012-03-09 13:53:13 -08:00
parent 9addfc13ce
commit e3c074b881
+4 -12
View File
@@ -7,14 +7,12 @@ import unittest
from mininet.net import init, Mininet from mininet.net import init, Mininet
from mininet.node import Host, Controller, ControllerParams from mininet.node import Host, Controller, ControllerParams
# from mininet.node import KernelSwitch
from mininet.node import UserSwitch, OVSKernelSwitch from mininet.node import UserSwitch, OVSKernelSwitch
from mininet.topo import SingleSwitchTopo, LinearTopo from mininet.topo import SingleSwitchTopo, LinearTopo
from mininet.log import setLogLevel from mininet.log import setLogLevel
SWITCHES = { 'user': UserSwitch, SWITCHES = { 'user': UserSwitch,
'ovsk': OVSKernelSwitch, 'ovsk': OVSKernelSwitch,
# 'kernel': KernelSwitch
} }
@@ -25,9 +23,7 @@ class testSingleSwitch( unittest.TestCase ):
"Ping test with both datapaths on minimal topology" "Ping test with both datapaths on minimal topology"
init() init()
for switch in SWITCHES.values(): for switch in SWITCHES.values():
controllerParams = ControllerParams( '10.0.0.0', 8 ) mn = Mininet( SingleSwitchTopo(), switch, Host, Controller )
mn = Mininet( SingleSwitchTopo(), switch, Host, Controller,
controllerParams )
dropped = mn.run( mn.ping ) dropped = mn.run( mn.ping )
self.assertEqual( dropped, 0 ) self.assertEqual( dropped, 0 )
@@ -35,9 +31,7 @@ class testSingleSwitch( unittest.TestCase ):
"Ping test with both datapaths on 5-host single-switch topology" "Ping test with both datapaths on 5-host single-switch topology"
init() init()
for switch in SWITCHES.values(): for switch in SWITCHES.values():
controllerParams = ControllerParams( '10.0.0.0', 8 ) mn = Mininet( SingleSwitchTopo( k=5 ), switch, Host, Controller )
mn = Mininet( SingleSwitchTopo( k=5 ), switch, Host, Controller,
controllerParams )
dropped = mn.run( mn.ping ) dropped = mn.run( mn.ping )
self.assertEqual( dropped, 0 ) self.assertEqual( dropped, 0 )
@@ -49,13 +43,11 @@ class testLinear( unittest.TestCase ):
"Ping test with both datapaths on a 5-switch topology" "Ping test with both datapaths on a 5-switch topology"
init() init()
for switch in SWITCHES.values(): for switch in SWITCHES.values():
controllerParams = ControllerParams( '10.0.0.0', 8 ) mn = Mininet( LinearTopo( k=5 ), switch, Host, Controller )
mn = Mininet( LinearTopo( k=5 ), switch, Host, Controller,
controllerParams )
dropped = mn.run( mn.ping ) dropped = mn.run( mn.ping )
self.assertEqual( dropped, 0 ) self.assertEqual( dropped, 0 )
if __name__ == '__main__': if __name__ == '__main__':
setLogLevel('warning') setLogLevel( 'warning' )
unittest.main() unittest.main()