Merge branch 'ONOS-Next' of https://github.com/OPENNETWORKINGLAB/ONLabTest into ONOS-Next
diff --git a/TestON/tests/TopoConvNext/TopoConvNext.params b/TestON/tests/TopoConvNext/TopoConvNext.params
index 288023e..67af5ec 100644
--- a/TestON/tests/TopoConvNext/TopoConvNext.params
+++ b/TestON/tests/TopoConvNext/TopoConvNext.params
@@ -1,8 +1,8 @@
 <PARAMS>
-    <testcases>1,2,3,4</testcases>
+    <testcases>1,2,3</testcases>
 
     <ENV>
-        <cellName>topo_perf_test</cellName>
+        <cellName>topo_conv_test</cellName>
     </ENV>
 
     <GIT>
@@ -19,6 +19,14 @@
         <port2>6633</port2>
         <ip3>10.128.174.3</ip3>
         <port3>6633</port3>
+        <ip4>10.128.174.4</ip4>
+        <port4>6633</port4>
+        <ip5>10.128.174.5</ip5>
+        <port5>6633</port5>
+        <ip6>10.128.174.6</ip6>
+        <port6>6633</port6>
+        <ip7>10.128.174.7</ip7>
+        <port7>6633</port7>
     </CTRL>
 
     <MN>
@@ -31,11 +39,6 @@
     </BENCH>
 
     <TEST>
-        #'on' or 'off' debug mode.
-        #If on, logging will be more verbose and
-        #tshark pcap will be enabled
-        #pcap file located at /tmp/'capture_name'
-        <debugMode>off</debugMode>
         <onosLogFile>/opt/onos/log/karaf*</onosLogFile>
 
         #Number of times to iterate each case
@@ -44,11 +47,6 @@
         #Number of iterations to ignore initially
         <iterIgnore>2</iterIgnore>
 
-        <singleSwThreshold>0,1000</singleSwThreshold>
-        <portUpThreshold>0,1000</portUpThreshold>
-        <portDownThreshold>0,1000</portDownThreshold>
-        <linkUpThreshold>0,10000</linkUpThreshold>
-        <linkDownThreshold>0,10000</linkDownThreshold>
         <swDisc100Threshold>0,10000</swDisc100Threshold>
     </TEST>
 
diff --git a/TestON/tests/TopoConvNext/TopoConvNext.py b/TestON/tests/TopoConvNext/TopoConvNext.py
index b7c2f4e..481a726 100644
--- a/TestON/tests/TopoConvNext/TopoConvNext.py
+++ b/TestON/tests/TopoConvNext/TopoConvNext.py
@@ -107,7 +107,13 @@
         import json
 
         ONOS_ip_list = []
-        ONOS_ip_list[0] = main.params['CTRL']['ip1']
+        ONOS_ip_list.append(main.params['ONOS']['ip1'])
+        ONOS_ip_list.append(main.params['ONOS']['ip2'])
+        ONOS_ip_list.append(main.params['ONOS']['ip3'])
+        ONOS_ip_list.append(main.params['ONOS']['ip4'])
+        ONOS_ip_list.append(main.params['ONOS']['ip5'])
+        ONOS_ip_list.append(main.params['ONOS']['ip6'])
+        ONOS_ip_list.append(main.params['ONOS']['ip7'])
         MN1_ip = main.params['MN']['ip1']
         ONOS_user = main.params['CTRL']['user']
 
@@ -122,16 +128,6 @@
         deviceTimestamp = main.params['JSON']['deviceTimestamp']
         graphTimestamp = main.params['JSON']['graphTimestamp']
         
-        debug_mode = main.params['TEST']['debugMode']
-
-        local_time = time.strftime('%X')
-        local_time = local_time.replace("/","")
-        local_time = local_time.replace(" ","_")
-        local_time = local_time.replace(":","")
-        if debug_mode == 'on':
-            main.ONOS1.tshark_pcap("eth0",
-                    "/tmp/100_sw_lat_pcap_"+local_time) 
- 
         #Threshold for this test case
         sw_disc_threshold_str = main.params['TEST']['swDisc100Threshold']
         sw_disc_threshold_obj = sw_disc_threshold_str.split(",")
@@ -147,7 +143,23 @@
         sw_discovery_lat_list = []
 
         main.case(num_sw+" Switch discovery latency")
+       
+        main.log.report("Currently active ONOS node(s): ")
+        report_str = "Node "
+        for node in cluster_count:
+            report_str += (str(node+1) + " ") 
+        main.log.report(report_str)
         
+        main.step("Assigning "+num_sw+" switches to each ONOS")
+        index = 1 
+        for node in cluster_count:
+            for i in range(index, int(num_sw)+index):
+                main.Mininet1.assign_sw_controller(
+                        sw=str(i),
+                        ip1=ONOS_ip_list[node],
+                        port1=default_sw_port)
+            index = i 
+
         #TODO: Implement modular switch discovery measurements
         #for scale-out scenario