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:
class testEmulatorNetworking( SimpleTestTopology ):
- def testSDNChaining(self):
+ def testSDNChainingSingleService(self):
"""
Create a two data centers and interconnect them with additional
switches between them.
vnf1 = self.dc[0].startCompute("vnf1", network=[{'id':'intf1', 'ip':'10.0.10.1/24'}])
vnf2 = self.dc[1].startCompute("vnf2", network=[{'id':'intf2', 'ip':'10.0.10.2/24'}])
# check number of running nodes
- self.assertTrue(len(self.getDockernetContainers()) == 2)
+ self.assertTrue(len(self.getContainernetContainers()) == 2)
self.assertTrue(len(self.net.hosts) == 2)
self.assertTrue(len(self.net.switches) == 5)
# check status