diff --git a/TestON/tests/IntentPerfNext/IntentPerfNext.params b/TestON/tests/IntentPerfNext/IntentPerfNext.params
index 87e7998..168a067 100644
--- a/TestON/tests/IntentPerfNext/IntentPerfNext.params
+++ b/TestON/tests/IntentPerfNext/IntentPerfNext.params
@@ -1,5 +1,5 @@
 <PARAMS>
-    <testcases>1,4</testcases>
+    <testcases>1,4,5,4,5,4,5,4</testcases>
 
     <ENV>
         <cellName>intent_perf_test</cellName>
@@ -19,6 +19,10 @@
         <port2>6633</port2>
         <ip3>10.128.174.3</ip3>
         <port3>6633</port3>
+        <ip4>10.128.174.4</ip4>
+        <ip5>10.128.174.5</ip5>
+        <ip6>10.128.174.6</ip6>
+        <ip7>10.128.174.7</ip7>
     </CTRL>
 
     <MN>
@@ -32,8 +36,12 @@
 
     <TEST>
         #Number of times to iterate each case
-        <numIter>3</numIter>
-        <batchIntentSize>50</batchIntentSize>
+        <numIter>10</numIter>
+        <numSwitch>9</numSwitch>
+        <batchThresholdMin>0</batchThresholdMin>
+        <batchThresholdMax>1000</batchThresholdMax>
+        <batchIntentSize>1500</batchIntentSize>
+        <numMult>1</numMult>
     </TEST>
 
     <JSON>
diff --git a/TestON/tests/IntentPerfNext/IntentPerfNext.py b/TestON/tests/IntentPerfNext/IntentPerfNext.py
index dc9fadc..493f1f2 100644
--- a/TestON/tests/IntentPerfNext/IntentPerfNext.py
+++ b/TestON/tests/IntentPerfNext/IntentPerfNext.py
@@ -14,6 +14,8 @@
         '''
 
         import time
+        global cluster_count
+        cluster_count = 1 
 
         cell_name = main.params['ENV']['cellName']
 
@@ -23,7 +25,19 @@
         ONOS1_ip = main.params['CTRL']['ip1']
         ONOS2_ip = main.params['CTRL']['ip2']
         ONOS3_ip = main.params['CTRL']['ip3']
-        
+        ONOS4_ip = main.params['CTRL']['ip4']
+        ONOS5_ip = main.params['CTRL']['ip5']
+        ONOS6_ip = main.params['CTRL']['ip6']
+        ONOS7_ip = main.params['CTRL']['ip7']
+
+        main.ONOSbench.onos_uninstall(node_ip=ONOS1_ip)
+        main.ONOSbench.onos_uninstall(node_ip=ONOS2_ip)
+        main.ONOSbench.onos_uninstall(node_ip=ONOS3_ip)
+        main.ONOSbench.onos_uninstall(node_ip=ONOS4_ip)
+        main.ONOSbench.onos_uninstall(node_ip=ONOS5_ip)
+        main.ONOSbench.onos_uninstall(node_ip=ONOS6_ip)
+        main.ONOSbench.onos_uninstall(node_ip=ONOS7_ip)
+
         MN1_ip = main.params['MN']['ip1']
         BENCH_ip = main.params['BENCH']['ip']
     
@@ -33,12 +47,16 @@
         cell_file_result = main.ONOSbench.create_cell_file(
                 BENCH_ip, cell_name, MN1_ip,
                 "onos-core,onos-app-metrics,onos-gui",
-                ONOS1_ip, ONOS2_ip, ONOS3_ip)
+                #ONOS1_ip, ONOS2_ip, ONOS3_ip)
+                ONOS1_ip)
 
         main.step("Applying cell file to environment")
         cell_apply_result = main.ONOSbench.set_cell(cell_name)
         verify_cell_result = main.ONOSbench.verify_cell()
 
+        main.step("Removing raft logs")
+        main.ONOSbench.onos_remove_raft_logs()
+
         main.step("Git checkout and pull "+checkout_branch)
         if git_pull == 'on':
             checkout_result = \
@@ -62,27 +80,27 @@
 
         main.step("Installing ONOS package")
         install1_result = main.ONOSbench.onos_install(node=ONOS1_ip)
-        install2_result = main.ONOSbench.onos_install(node=ONOS2_ip)
-        install3_result = main.ONOSbench.onos_install(node=ONOS3_ip)
+        #install2_result = main.ONOSbench.onos_install(node=ONOS2_ip)
+        #install3_result = main.ONOSbench.onos_install(node=ONOS3_ip)
 
         main.step("Set cell for ONOScli env")
         main.ONOS1cli.set_cell(cell_name)
-        main.ONOS2cli.set_cell(cell_name)
-        main.ONOS3cli.set_cell(cell_name)
+        #main.ONOS2cli.set_cell(cell_name)
+        #main.ONOS3cli.set_cell(cell_name)
 
         time.sleep(5)
 
         main.step("Start onos cli")
         cli1 = main.ONOS1cli.start_onos_cli(ONOS1_ip)
-        cli2 = main.ONOS2cli.start_onos_cli(ONOS2_ip)
-        cli3 = main.ONOS3cli.start_onos_cli(ONOS3_ip)
+        #cli2 = main.ONOS2cli.start_onos_cli(ONOS2_ip)
+        #cli3 = main.ONOS3cli.start_onos_cli(ONOS3_ip)
 
         utilities.assert_equals(expect=main.TRUE,
                 actual = cell_file_result and cell_apply_result and\
                          verify_cell_result and checkout_result and\
                          pull_result and build_result and\
-                         install1_result and install2_result and\
-                         install3_result,
+                         install1_result, #and install2_result and\
+                         #install3_result,
                 onpass="ONOS started successfully",
                 onfail="Failed to start ONOS")
 
@@ -355,28 +373,99 @@
         ONOS1_ip = main.params['CTRL']['ip1']
         ONOS2_ip = main.params['CTRL']['ip2']
         ONOS3_ip = main.params['CTRL']['ip3']
+        ONOS4_ip = main.params['CTRL']['ip4']
+        ONOS5_ip = main.params['CTRL']['ip5']
+        ONOS6_ip = main.params['CTRL']['ip6']
+        ONOS7_ip = main.params['CTRL']['ip7']
+       
+        ONOS_ip_list = []
+        for i in range(1, 8):
+            ONOS_ip_list.append(main.params['CTRL']['ip'+str(i)])
+
         ONOS_user = main.params['CTRL']['user']
 
         default_sw_port = main.params['CTRL']['port1']
     
         batch_intent_size = main.params['TEST']['batchIntentSize']
+        batch_thresh_min = int(main.params['TEST']['batchThresholdMin'])
+        batch_thresh_max = int(main.params['TEST']['batchThresholdMax'])
 
         #number of iterations of case
         num_iter = main.params['TEST']['numIter']
+        num_switch = int(main.params['TEST']['numSwitch'])
+        n_thread = main.params['TEST']['numMult']
+
+        #*****
+        global cluster_count
+        #*****
+       
+        #Switch assignment NOTE: hardcoded 
+        if cluster_count == 1:
+            for i in range(1, num_switch+1):
+                main.Mininet1.assign_sw_controller(
+                    sw=str(i), 
+                    ip1=ONOS1_ip,
+                    port1=default_sw_port)
+        if cluster_count == 3:
+            for i in range(1, 3):
+                main.Mininet1.assign_sw_controller(
+                    sw=str(i),
+                    ip1=ONOS1_ip,
+                    port1=default_sw_port)
+            for i in range(3, 6):
+                main.Mininet1.assign_sw_controller(
+                    sw=str(i),
+                    ip1=ONOS2_ip,
+                    port1=default_sw_port)
+            for i in range(6, 9):
+                main.Mininet1.assign_sw_controller(
+                    sw=str(i),
+                    ip1=ONOS3_ip,
+                    port1=default_sw_port)
+        if cluster_count == 5:
+            main.Mininet1.assign_sw_controller(
+                    sw="1",
+                    ip1=ONOS1_ip,
+                    port1=default_sw_port)
+            main.Mininet1.assign_sw_controller(
+                    sw="2",
+                    ip1=ONOS2_ip,
+                    port1=default_sw_port)
+            for i in range(3, 6):
+                main.Mininet1.assign_sw_controller(
+                    sw=str(i),
+                    ip1=ONOS3_ip,
+                    port1=default_sw_port)
+            main.Mininet1.assign_sw_controller(
+                    sw="6",
+                    ip1=ONOS4_ip,
+                    port1=default_sw_port)
+            main.Mininet1.assign_sw_controller(
+                    sw="7",
+                    ip1=ONOS5_ip,
+                    port1=default_sw_port)
+            main.Mininet1.assign_sw_controller(
+                    sw="8",
+                    ip1=ONOS5_ip,
+                    port1=default_sw_port)
         
-        main.Mininet1.assign_sw_controller(
-                sw="1", ip1=ONOS1_ip,port1=default_sw_port)
-        main.Mininet1.assign_sw_controller(
-                sw="2", ip1=ONOS2_ip,port1=default_sw_port)
-        main.Mininet1.assign_sw_controller(
-                sw="3", ip1=ONOS2_ip,port1=default_sw_port)
-        main.Mininet1.assign_sw_controller(
-                sw="4", ip1=ONOS2_ip,port1=default_sw_port)
-        main.Mininet1.assign_sw_controller(
-                sw="5", ip1=ONOS3_ip,port1=default_sw_port)
+        if cluster_count == 7:
+            for i in range(1,9):
+                if i < 7:
+                    main.Mininet1.assign_sw_controller(
+                        sw=str(i),
+                        ip1=ONOS_ip_list[i-1],
+                        port1=default_sw_port)
+                elif i >= 8: 
+                    main.Mininet1.assign_sw_controller(
+                        sw=str(i),
+                        ip1=ONOS_ip_list[6],
+                        port1=default_sw_port)
 
         main.log.report("Batch intent installation test of "+
-                str(batch_intent_size) +" intents")
+               batch_intent_size +" intents")
+
+        batch_result_list = []
 
         main.log.info("Getting list of available devices")
         device_id_list = []
@@ -385,14 +474,120 @@
         for device in json_obj:
             device_id_list.append(device['id'])
 
-        for i in range(0, int(num_iter)):
-            main.log.info("Pushing "+batch_intent_size+" intents")
-            
-            batch_result = main.ONOS1cli.push_test_intents(
-                "of:0000000000000001/1", "of:0000000000000005/2", 
-                batch_intent_size)
+        batch_install_lat = []
+        batch_withdraw_lat = []
+        
+        base_dir = "/tmp/"
 
+        for i in range(0, int(num_iter)):
+            main.log.info("Pushing "+
+                    str(int(batch_intent_size)*int(n_thread))+
+                    " intents. Iteration "+str(i))
+                
+            for node in range(1, cluster_count+1):
+                save_dir = base_dir + "batch_intent_"+str(node)+".txt" 
+                main.ONOSbench.push_test_intents_shell(
+                "of:0000000000000001/"+str(node),
+                "of:0000000000000008/"+str(node),
+                batch_intent_size, save_dir, ONOS_ip_list[node-1],
+                num_mult=n_thread, app_id=node)
+            
+            time.sleep(120 / int(cluster_count))
+            for node in range(1, cluster_count+1):
+                with open(save_dir) as f_onos:
+                    for line in f_onos:
+                        line = line[1:]
+                        line = line.split(": ")
+                        result = line[1].split(" ")[0]
+                        #TODO: add parameters before appending latency
+                        if line_count == 0:
+                            batch_install_lat.append(result)
+                        elif line_count == 1:
+                            batch_withdraw_lat.append(result)
+                        line_count += 1
+                main.log.info("Batch install latency for ONOS"+
+                    str(node)+" with "+\
+                    str(batch_intent_size) + "intents: "+\
+                    str(batch_install_lat))
             time.sleep(5)
 
+        main.log.report("Max of batch installation latency "+
+            "for ONOS" + str(node)+ ": "+
+            str(max(batch_install_lat)))
+            
+    def CASE5(self,main):
+        '''
+        Increase number of nodes and initiate CLI
+        '''
+        import time
+        import json
+
+        ONOS1_ip = main.params['CTRL']['ip1']
+        ONOS2_ip = main.params['CTRL']['ip2']
+        ONOS3_ip = main.params['CTRL']['ip3']
+        ONOS4_ip = main.params['CTRL']['ip4']
+        ONOS5_ip = main.params['CTRL']['ip5']
+        ONOS6_ip = main.params['CTRL']['ip6']
+        ONOS7_ip = main.params['CTRL']['ip7']
+
+        global cluster_count
+        cluster_count += 2
+        main.log.info("Increasing cluster size to "+
+                str(cluster_count))
+
+        install_result = main.FALSE
+
+        if cluster_count == 3:
+            install_result1 = \
+                main.ONOSbench.onos_install(node=ONOS2_ip)
+            install_result2 = \
+                main.ONOSbench.onos_install(node=ONOS3_ip)
+            time.sleep(5)
+
+            main.log.info("Starting ONOS CLI")
+            main.ONOS2cli.start_onos_cli(ONOS2_ip)
+            main.ONOS3cli.start_onos_cli(ONOS3_ip)
+
+            install_result = install_result1 and install_result2
+
+        if cluster_count == 5:
+            main.log.info("Installing ONOS on node 4 and 5")
+            install_result1 = \
+                main.ONOSbench.onos_install(node=ONOS4_ip)
+            install_result2 = \
+                main.ONOSbench.onos_install(node=ONOS5_ip)
+
+            main.log.info("Starting ONOS CLI")
+            main.ONOS4cli.start_onos_cli(ONOS4_ip)
+            main.ONOS5cli.start_onos_cli(ONOS5_ip)
+
+            install_result = install_result1 and install_result2
+
+        if cluster_count == 7:
+            main.log.info("Installing ONOS on node 6 and 7")
+            install_result1 = \
+                main.ONOSbench.onos_install(node=ONOS6_ip)
+            install_result2 = \
+                main.ONOSbench.onos_install(node=ONOS7_ip)
+
+            main.log.info("Starting ONOS CLI")
+            main.ONOS6cli.start_onos_cli(ONOS6_ip)
+            main.ONOS7cli.start_onos_cli(ONOS7_ip)
+
+            install_result = install_result1 and install_result2
+
+        time.sleep(5)
+
+        if install_result == main.TRUE:
+            assertion = main.TRUE
+        else:
+            assertion = main.FALSE
+
+        utilities.assert_equals(expect=main.TRUE, actual=assertion,
+            onpass="Scale out to "+str(cluster_count)+\
+                   " nodes successful",
+            onfail="Scale out to "+str(cluster_count)+\
+                   " nodes failed")
+
 
 
diff --git a/TestON/tests/IntentPerfNext/IntentPerfNext.topo b/TestON/tests/IntentPerfNext/IntentPerfNext.topo
index 75cb259..71df643 100644
--- a/TestON/tests/IntentPerfNext/IntentPerfNext.topo
+++ b/TestON/tests/IntentPerfNext/IntentPerfNext.topo
@@ -36,6 +36,42 @@
             <connect_order>2</connect_order>
             <COMPONENTS> </COMPONENTS>
         </ONOS3cli>
+        
+        <ONOS4cli>
+            <host>10.128.174.10</host>
+            <user>admin</user>
+            <password>onos_test</password>
+            <type>OnosCliDriver</type>
+            <connect_order>2</connect_order>
+            <COMPONENTS> </COMPONENTS>
+        </ONOS4cli>
+        
+        <ONOS5cli>
+            <host>10.128.174.10</host>
+            <user>admin</user>
+            <password>onos_test</password>
+            <type>OnosCliDriver</type>
+            <connect_order>2</connect_order>
+            <COMPONENTS> </COMPONENTS>
+        </ONOS5cli>
+        
+        <ONOS6cli>
+            <host>10.128.174.10</host>
+            <user>admin</user>
+            <password>onos_test</password>
+            <type>OnosCliDriver</type>
+            <connect_order>2</connect_order>
+            <COMPONENTS> </COMPONENTS>
+        </ONOS6cli>
+        
+        <ONOS7cli>
+            <host>10.128.174.10</host>
+            <user>admin</user>
+            <password>onos_test</password>
+            <type>OnosCliDriver</type>
+            <connect_order>2</connect_order>
+            <COMPONENTS> </COMPONENTS>
+        </ONOS7cli>
 
         <ONOS1>
             <host>10.128.174.1</host>
@@ -53,8 +89,8 @@
             <type>MininetCliDriver</type>
             <connect_order>4</connect_order>
             <COMPONENTS>
-                <arg1> --custom topo-intentFlower.py </arg1>
-                <arg2> --arp --mac --topo mytopo</arg2>
+                <arg1> --custom topo-linear-scaleout.py </arg1>
+                <arg2> --arp --mac --topo mytopo </arg2>
                 <arg3> </arg3>
                 <controller> remote </controller>
             </COMPONENTS>
