Add support to deploy Coordinator from test suites
[integration.git] / test / csit / libraries / ScaleClient.py
index 3c2ec35c88adab1b93207f8bd493572332c40a2f..34892630a1cd8a1663993825b49306664cca083d 100644 (file)
@@ -117,7 +117,8 @@ def generate_new_flow_details(flows=10, switches=1, swspread='gauss', tables=250
     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
 
@@ -188,7 +189,8 @@ def _wt_request_sender(thread_id, preparefnc, inqueue=None, exitevent=None, cont
                 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:
@@ -219,7 +221,8 @@ def _wt_bulk_request_sender(thread_id, preparefnc, inqueue=None, exitevent=None,
                 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: