according to the spread rules between swithces and tables.
It also returns a dictionary with statsistics."""
swflows = [_randomize(swspread, switches) for f in range(int(flows))]
- fltables = [(s, _randomize(tabspread, tables), idx) for idx, s in enumerate(swflows)]
+ # we have to increse the switch index because mininet start indexing switches from 1 (not 0)
+ fltables = [(s+1, _randomize(tabspread, tables), idx) for idx, s in enumerate(swflows)]
notes = _get_notes(fltables)
return fltables, notes
break
continue
req = preparefnc(cntl, sw, tab, fl, ip, template=template)
- prep = ses.prepare_request(req)
+ # prep = ses.prepare_request(req)
+ prep = req.prepare()
try:
rsp = ses.send(prep, timeout=5)
except requests.exceptions.Timeout:
loop = False
continue
req = preparefnc(cntl, flowlist, template=template)
- prep = ses.prepare_request(req)
+ # prep = ses.prepare_request(req)
+ prep = req.prepare()
try:
rsp = ses.send(prep, timeout=5)
except requests.exceptions.Timeout: