X-Git-Url: https://osm.etsi.org/gitweb/?a=blobdiff_plain;f=src%2Femuvim%2Ftest%2Fbase.py;h=0adc91739baa154d3d269fd472c892a12ddddda9;hb=fe3135b85110f06be86d047064cb6a245937f9c5;hp=5a83547cd8fc90e7a4047ce3f059781b4d8d63b3;hpb=5ddd8f817f58c12d52ae1601cc4483f46f28fa06;p=osm%2Fvim-emu.git diff --git a/src/emuvim/test/base.py b/src/emuvim/test/base.py old mode 100644 new mode 100755 index 5a83547..0adc917 --- a/src/emuvim/test/base.py +++ b/src/emuvim/test/base.py @@ -28,7 +28,7 @@ class SimpleTestTopology(unittest.TestCase): def createNet( self, nswitches=0, ndatacenter=0, nhosts=0, ndockers=0, - autolinkswitches=False, controller=Controller): + autolinkswitches=False, controller=Controller, **kwargs): """ Creates a Mininet instance and automatically adds some nodes to it. @@ -37,10 +37,12 @@ class SimpleTestTopology(unittest.TestCase): for our tests. Only use other controllers if you want to test specific controller functionality. """ - self.net = DCNetwork(controller=controller) + self.net = DCNetwork(controller=controller, **kwargs) # add some switches - for i in range(0, nswitches): + # start from s1 because ovs does not like to have dpid = 0 + # and switch name-number is being used by mininet to set the dpid + for i in range(1, nswitches+1): self.s.append(self.net.addSwitch('s%d' % i)) # if specified, chain all switches if autolinkswitches: