fixing python issues with string formating in odl jenkins env 73/23573/1
authorPeter Gubka <pgubka@cisco.com>
Tue, 30 Jun 2015 08:00:04 +0000 (10:00 +0200)
committerPeter Gubka <pgubka@cisco.com>
Tue, 30 Jun 2015 08:01:07 +0000 (10:01 +0200)
Change-Id: I71c8a99b74e711c6b748fc04fdf4e4b40ba6a372
Signed-off-by: Peter Gubka <pgubka@cisco.com>
test/csit/libraries/DynamicMininet.py
test/csit/libraries/ScaleClient.py

index c3c698d1d57e8a3ebe9524a5d9d4714b3b7ed6fc..dc77db81c8783b9fa53d593029e531dfa45d85d1 100644 (file)
@@ -50,7 +50,7 @@ class DynamicMininet(cmd.Cmd):
         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)
index 34892630a1cd8a1663993825b49306664cca083d..17c01338c53a77733694e9fb105106e90482f0b8 100644 (file)
@@ -95,7 +95,7 @@ def _get_notes(fldet=[]):
 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))