modified to make batch count accurate

Change-Id: Id3b0b07d1c937eb52abb25e2186d6d2999bf40ac
diff --git a/TestON/tests/COMPflow/COMPflow.py b/TestON/tests/COMPflow/COMPflow.py
index 7fae518..45e4de5 100644
--- a/TestON/tests/COMPflow/COMPflow.py
+++ b/TestON/tests/COMPflow/COMPflow.py
@@ -239,18 +239,22 @@
         main.step("Creating a full list of batches")
         for index in range(1, int(main.params['CASE1000']['batches']) + 1):
             if startSw <= main.numSw:
-                main.log.info("Creating batch: " + str(index))
-                flowJsonBatch = main.ONOSrest.createFlowBatch( numSw = main.numSw,
-                                                           swIndex = startSw,
+                ind = startSw
+            else:
+                startSw = 1
+                ind = startSw
+
+            main.log.info("Creating batch: " + str(index))
+            flowJsonBatch = main.ONOSrest.createFlowBatch( numSw = main.numSw,
+                                                           swIndex = ind,
                                                            batchSize = main.batchSize,
                                                            batchIndex = index,
                                                            ingressPort = 2,
                                                            egressPort = 3)
-                main.flowJsonBatchList.append(flowJsonBatch)
+            main.flowJsonBatchList.append(flowJsonBatch)
 
-                startSw += 1
-            else:
-                startSw = 1
+            startSw += 1
+
 
 
         main.step("Using REST API /flows/{} to post flow batch")