Change-Id: I71c8a99b74e711c6b748fc04fdf4e4b40ba6a372
Signed-off-by: Peter Gubka <pgubka@cisco.com>
self._topo = mininet.topo.Topo()
for _ in range(int(numsw)):
self._lid += 1
- self._topo.addSwitch('s{}'.format(self._lid))
+ self._topo.addSwitch('s{0}'.format(self._lid))
controller = mininet.util.customConstructor({'remote': RemoteController}, 'remote,ip={0}'.format(cntl))
switch = mininet.util.customConstructor({'ovsk': OVSKernelSwitch}, 'ovsk,protocols=OpenFlow13')
self._net = mininet.net.Mininet(topo=self._topo, switch=switch, controller=controller)
def _randomize(spread, maxn):
'''Returns a randomized switch or table id'''
if spread not in _spreads:
- raise Exception('Spread method {} not available'.format(spread))
+ raise Exception('Spread method {0} not available'.format(spread))
while True:
if spread == 'gauss':
ga = abs(random.gauss(0, 1))