Remove deprecated ControllerParams (for now.)
This commit is contained in:
@@ -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,9 +43,7 @@ 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 )
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user