X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=src%2Femuvim%2Ftest%2Fbase.py;h=d5329a9c82ab2763b2eed5ef2431c3c68bc84ba8;hb=72d14249b85de5386837a2095d3082223fc780dd;hp=f65225919851b232f312f3051e225eaa9ca3f6cb;hpb=41006b7133d28c2f2c5a95fdeb37962037c305a0;p=osm%2Fvim-emu.git diff --git a/src/emuvim/test/base.py b/src/emuvim/test/base.py index f652259..d5329a9 100644 --- a/src/emuvim/test/base.py +++ b/src/emuvim/test/base.py @@ -8,6 +8,7 @@ import subprocess import docker from emuvim.dcemulator.net import DCNetwork from mininet.clean import cleanup +from mininet.node import Controller class SimpleTestTopology(unittest.TestCase): """ @@ -27,12 +28,16 @@ class SimpleTestTopology(unittest.TestCase): def createNet( self, nswitches=0, ndatacenter=0, nhosts=0, ndockers=0, - autolinkswitches=False): + autolinkswitches=False, controller=Controller): """ Creates a Mininet instance and automatically adds some nodes to it. + + Attention, we should always use Mininet's default controller + for our tests. Only use other controllers if you want to test + specific controller functionality. """ - self.net = net = DCNetwork() + self.net = DCNetwork(controller=controller) # add some switches for i in range(0, nswitches):