add SDN chaining unit test
[osm/vim-emu.git] / src / emuvim / test / base.py
index 13ace1b..9efb4ab 100644 (file)
@@ -28,12 +28,16 @@ class SimpleTestTopology(unittest.TestCase):
     def createNet(
             self,
             nswitches=0, ndatacenter=0, nhosts=0, ndockers=0,
-            autolinkswitches=False):
+            autolinkswitches=False, controller=Controller, **kwargs):
         """
         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 = DCNetwork()
+        self.net = DCNetwork(controller=controller, **kwargs)
 
         # add some switches
         for i in range(0, nswitches):
@@ -53,7 +57,7 @@ class SimpleTestTopology(unittest.TestCase):
             self.h.append(self.net.addHost('h%d' % i))
         # add some dockers
         for i in range(0, ndockers):
-            self.d.append(self.net.addDocker('d%d' % i, dimage="ubuntu"))
+            self.d.append(self.net.addDocker('d%d' % i, dimage="ubuntu:trusty"))
 
     def startNet(self):
         self.net.start()