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.
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: