diff --git a/TestON/tests/scaleONOS7nodes/scaleONOS7nodes.py b/TestON/tests/scaleONOS7nodes/scaleONOS7nodes.py
index 9f3bf3e..d3ea33d 100644
--- a/TestON/tests/scaleONOS7nodes/scaleONOS7nodes.py
+++ b/TestON/tests/scaleONOS7nodes/scaleONOS7nodes.py
@@ -14,15 +14,16 @@
         main.case("Initial setup")
         main.step("Stop ONOS")
         import time
+        main.log.info("Stopping all ONOS nodes...")
         main.ONOS1.stop_all()
         main.ONOS2.stop_all()
         main.ONOS3.stop_all()
 #        main.print_hello_world()
         main.ONOS4.stop_all()
-       # main.ONOS5.stop_all()
-       # main.ONOS6.stop_all()
-       # main.ONOS7.stop_all()
-        main.ONOS2.stop_rest()
+        main.ONOS5.stop_all()
+        main.ONOS6.stop_all()
+        main.ONOS7.stop_all()
+        #main.ONOS2.stop_rest()
         time.sleep(5)
         #main.ONOS1.handle.sendline("cp ~/onos.properties.proactive ~/ONOS/conf/onos.properties")
         #main.ONOS2.handle.sendline("cp ~/onos.properties.proactive ~/ONOS/conf/onos.properties")
@@ -30,18 +31,22 @@
         #main.ONOS4.handle.sendline("cp ~/onos.properties.proactive ~/ONOS/conf/onos.properties")        
         #main.step("Start tcpdump on mn")
         #main.Mininet2.start_tcpdump(main.params['tcpdump']['filename'], intf = main.params['tcpdump']['intf'], port = main.params['tcpdump']['port'])
-        main.step("Start ONOS")
+        main.step("Starting 3 ONOS nodes...")
         main.Zookeeper1.start()
         main.Zookeeper2.start()
         main.Zookeeper3.start()
         main.Zookeeper4.start()
+        main.Zookeeper5.start()
+        main.Zookeeper6.start()
+        main.Zookeeper7.start()
+        
         time.sleep(5)
         
         
         main.RamCloud1.del_db()
         main.RamCloud2.del_db()
         main.RamCloud3.del_db()
-        main.RamCloud4.del_db()
+       # main.RamCloud4.del_db()
 
         time.sleep(5)
         #main.log.report("Pulling latest code from github to all nodes")
@@ -85,14 +90,16 @@
         main.RamCloud1.start_serv()
         main.RamCloud2.start_serv()
         main.RamCloud3.start_serv()
-        #main.RamCloud4.start_serv()
-
+        time.sleep(5)
         main.ONOS1.start()
         main.ONOS2.start()
         main.ONOS3.start()
         #main.ONOS4.start()
-
-
+        time.sleep(5)
+        
+        #main.ONOS1.handle.sendline("./onos.sh core start")
+        #main.ONOS1.handle.sendline("./onos.sh core start")
+        #main.ONOS1.handle.sendline("./onos.sh core start")
 
         main.ONOS1.start_rest()
         main.ONOS2.start_rest()
@@ -144,7 +151,8 @@
         time.sleep(10)
 
 
-    def CASE2(self,main) :
+    def CASE31(self,main):
+        main.case("Staring SB load with 3 ONOS nodes")
         ip1 = main.params['CTRL']['ip1']
         ip2 = main.params['CTRL']['ip2']
         ip3 = main.params['CTRL']['ip3']
@@ -154,6 +162,7 @@
         port = main.params['port']
         switches_num = main.params['switches_num']
         print loop
+        sleep_init = int(main.params['sleep_init'])
         sleep_t =int( main.params['sleep_t'])
         main.case("Starting SB load on 3 nodes from mininet with " + rate1 +"  added/removed/s for " + run_dur)
         main.Mininet2.handle.sendline("sudo ./loadgen_SB.py -u \"" + ip1 + " " + ip2 + " " + ip3 + "\"" + " -s " + switches_num + " -p " + port + " -a " + rate1 + " -d " + rate1 + " -l " + run_dur)
@@ -162,6 +171,7 @@
         main.log.info("Starting SB load....")
         import time
         import json
+        time.sleep(sleep_init)
         open("/home/admin/TestON/tests/scaleONOS7nodes/logs/scale3nodesrate1", 'w').close()
         url1 = "http://10.128.10.1:8080/wm/onos/metrics"
         url2 = "http://10.128.10.2:8080/wm/onos/metrics"
@@ -169,47 +179,33 @@
         f = open("/home/admin/TestON/tests/scaleONOS7nodes/logs/scale3nodesrate1", "a")
         #time.sleep(10)
         for i in range(int (loop)):
-            json_str1 = main.ONOS1.get_json(url1)
-            json_str2 = main.ONOS2.get_json(url2)
-            json_str3 = main.ONOS3.get_json(url3)
-            if json_str1 != "" and json_str2 != "" and json_str3 != "":
+            j1 = main.ONOS2.get_json(url1)
+            j2 = main.ONOS2.get_json(url2)
+            j3 = main.ONOS2.get_json(url3)
+            json_str = []
+            json_str.append(0)
+            json_str.append(j1)
+            json_str.append(j2)
+            json_str.append(j3)
+            if json_str[1] != "" and json_str[2] != "" and json_str[3] != "":
                 # write_str = str(json_str["meters"][4]["meter"][2])
                 #print str(json_str["meters"][4])
                 #f.write(str(json_str["meters"][4]))
                 #f.write('\n')
                 #time.sleep(3)
-                f.write("ONOS1 \n")
-                f.write(str(json_str1["meters"][4]['meter']['count']))
-                f.write('\t')
-                f.write(str(json_str1["meters"][4]['meter']['m1_rate']))
-                f.write('\t')
-                f.write(str(json_str1["meters"][4]['meter']['m5_rate']))
-                f.write('\t')
-                f.write(str(json_str1["meters"][4]['meter']['m15_rate']))
-                f.write('\t')
-                f.write(str(json_str1["meters"][4]['meter']['mean_rate']))
-                f.write('\n')
-                f.write("ONOS2 \n")
-                f.write(str(json_str2["meters"][4]['meter']['count']))
-                f.write('\t')
-                f.write(str(json_str2["meters"][4]['meter']['m1_rate']))
-                f.write('\t')
-                f.write(str(json_str2["meters"][4]['meter']['m5_rate']))
-                f.write('\t')
-                f.write(str(json_str2["meters"][4]['meter']['m15_rate']))
-                f.write('\t')
-                f.write(str(json_str2["meters"][4]['meter']['mean_rate']))
-                f.write('\n')
-                f.write("ONOS3 \n")
-                f.write(str(json_str3["meters"][4]['meter']['count']))
-                f.write('\t')
-                f.write(str(json_str3["meters"][4]['meter']['m1_rate']))
-                f.write('\t')
-                f.write(str(json_str3["meters"][4]['meter']['m5_rate']))
-                f.write('\t')
-                f.write(str(json_str3["meters"][4]['meter']['m15_rate']))
-                f.write('\t')
-                f.write(str(json_str3["meters"][4]['meter']['mean_rate']))
+                for j in range(1,4):
+                    f.write("ONOS" + str(j) + "\n")
+                    f.write(str(json_str[j]["meters"][4]['meter']['count']))
+                    f.write('\t')
+                    f.write(str(json_str[j]["meters"][4]['meter']['m1_rate']))
+                    f.write('\t')
+                    f.write(str(json_str[j]["meters"][4]['meter']['m5_rate']))
+                    f.write('\t')
+                    f.write(str(json_str[j]["meters"][4]['meter']['m15_rate']))
+                    f.write('\t')
+                    f.write(str(json_str[j]["meters"][4]['meter']['mean_rate']))
+                    f.write('\n')
+                
                 f.write('\n')
                 f.write('\n')
                 
@@ -219,11 +215,11 @@
         main.Mininet2.handle.expect("\$", timeout=900)
        # main.Mininet2.handle.sendline("sudo mn -c")
         #main.Mininet2.handle.expect("\$")
-        time.sleep(5)
        # main.Mininet2.handle.expect("\$", timeout=900)
+        time.sleep(180)
         
 
-    def CASE3(self,main):
+    def CASE32(self,main):
         ip1 = main.params['CTRL']['ip1']
         ip2 = main.params['CTRL']['ip2']
         ip3 = main.params['CTRL']['ip3']
@@ -231,6 +227,7 @@
         rate2 = main.params['RATE2']
         run_dur = main.params['RUN_DUR']
         loop = int(main.params['loop'])
+        sleep_init = int(main.params['sleep_init'])
         sleep_t = int(main.params['sleep_t'])
         port = main.params['port']
         switches_num = main.params['switches_num']
@@ -239,69 +236,57 @@
         main.Mininet2.handle.sendline("sudo ./loadgen_SB.py -u \"" + ip1 + " " + ip2 + " " + ip3 + "\"" + " -s " + switches_num + " -p " + port + " -a " + rate2 + " -d " + rate2 + " -l " + run_dur)
        #main.Mininet2.handle.sendline("./loadgen_SB.sh startload \"10.128.10.1\" 100 50 1200 \"11\"")
         main.Mininet2.handle.expect("Starting SB load....", timeout=900 )
-        
+        time.sleep(sleep_init )
         import json
-        
+        time.sleep(sleep_init)
         open("/home/admin/TestON/tests/scaleONOS7nodes/logs/scale3nodesrate2", 'w').close()
         url1 = "http://10.128.10.1:8080/wm/onos/metrics"
         url2 = "http://10.128.10.2:8080/wm/onos/metrics"
         url3 = "http://10.128.10.3:8080/wm/onos/metrics"
         f = open("/home/admin/TestON/tests/scaleONOS7nodes/logs/scale3nodesrate2", "a")
-        #time.sleep(10)
         for i in range(int (loop)):
-            json_str1 = main.ONOS1.get_json(url1)
-            json_str2 = main.ONOS2.get_json(url2)
-            json_str3 = main.ONOS3.get_json(url3)
-            if json_str1 != "" and json_str2 != "" and json_str3 != "":
+            j1 = main.ONOS1.get_json(url1)
+            j2 = main.ONOS1.get_json(url2)
+            j3 = main.ONOS1.get_json(url3)
+            json_str = []
+            json_str.append(0)
+            json_str.append(j1)
+            json_str.append(j2)
+            json_str.append(j3)
+            if json_str[1] != "" and json_str[2] != "" and json_str[3] != "":
                 # write_str = str(json_str["meters"][4]["meter"][2])
                 #print str(json_str["meters"][4])
                 #f.write(str(json_str["meters"][4]))
                 #f.write('\n')
                 #time.sleep(3)
-                f.write("ONOS1 \n")
-                f.write(str(json_str1["meters"][4]['meter']['count']))
-                f.write('\t')
-                f.write(str(json_str1["meters"][4]['meter']['m1_rate']))
-                f.write('\t')
-                f.write(str(json_str1["meters"][4]['meter']['m5_rate']))
-                f.write('\t')
-                f.write(str(json_str1["meters"][4]['meter']['m15_rate']))
-                f.write('\t')
-                f.write(str(json_str1["meters"][4]['meter']['mean_rate']))
-                f.write('\n')
-                f.write("ONOS2 \n")
-                f.write(str(json_str2["meters"][4]['meter']['count']))
-                f.write('\t')
-                f.write(str(json_str2["meters"][4]['meter']['m1_rate']))
-                f.write('\t')
-                f.write(str(json_str2["meters"][4]['meter']['m5_rate']))
-                f.write('\t')
-                f.write(str(json_str2["meters"][4]['meter']['m15_rate']))
-                f.write('\t')
-                f.write(str(json_str2["meters"][4]['meter']['mean_rate']))
-                f.write('\n')
-                f.write("ONOS3 \n")
-                f.write(str(json_str3["meters"][4]['meter']['count']))
-                f.write('\t')
-                f.write(str(json_str3["meters"][4]['meter']['m1_rate']))
-                f.write('\t')
-                f.write(str(json_str3["meters"][4]['meter']['m5_rate']))
-                f.write('\t')
-                f.write(str(json_str3["meters"][4]['meter']['m15_rate']))
-                f.write('\t')
-                f.write(str(json_str3["meters"][4]['meter']['mean_rate']))
+                for j in range(1,4):
+                    f.write("ONOS" + str(j) + "\n")
+                    f.write(str(json_str[j]["meters"][4]['meter']['count']))
+                    f.write('\t')
+                    f.write(str(json_str[j]["meters"][4]['meter']['m1_rate']))
+                    f.write('\t')
+                    f.write(str(json_str[j]["meters"][4]['meter']['m5_rate']))
+                    f.write('\t')
+                    f.write(str(json_str[j]["meters"][4]['meter']['m15_rate']))
+                    f.write('\t')
+                    f.write(str(json_str[j]["meters"][4]['meter']['mean_rate']))
+                    f.write('\n')
+                
                 f.write('\n')
                 f.write('\n')
+                
                 f.write("--------------------------------------------------------------------------------- \n") 
                 time.sleep(sleep_t)
-        f.close()
+        f.close() 
+        #time.sleep(10)
         main.Mininet2.handle.expect("\$", timeout=900)
+        time.sleep(180)
        # main.Mininet2.handle.sendline("sudo mn -c")
         #time.sleep(5)
        # main.Mininet2.handle.expect("\$", timeout=900)
 
 
-    def CASE4(self,main):
+    def CASE33(self,main):
         
         main.case("Starting NB Throughput test")
         ip1 = main.params['CTRL']['ip1']
@@ -324,10 +309,10 @@
         main.ONOS3.handle.sendline("cd ~admin/suibin-dev")
         main.ONOS3.handle.expect("\$")
 
-        main.ONOS3.handle.sendline("./multiLoadgen_NB.py -u \"10.128.10.1:8080 10.128.10.2:8080 10.128.10.3:8080 \" -i 4 -g 100 -a 1 -d 1 -p 0")
-        main.ONOS3.handle.expect("intent group is : 0", timeout=900)
+        main.ONOS3.handle.sendline("./loadgen_NB.py -n 3 -u \"10.128.10.1:8080 10.128.10.2:8080 10.128.10.3:8080 \" -i 10 -a 10 -l 60 -p 20")
+        main.ONOS3.handle.expect("Pause between add and delete:", timeout=900)
 
-        
+        time.sleep(60)
         import json
         
         open("/home/admin/TestON/tests/scaleONOS7nodes/logs/NBscale3nodesrate1", 'w').close()
@@ -337,94 +322,65 @@
         f = open("/home/admin/TestON/tests/scaleONOS7nodes/logs/NBscale3nodesrate1", "a")
         #time.sleep(10)
         for i in range(8):
-            json_str1 = main.ONOS1.get_json(url1)
-            json_str2 = main.ONOS2.get_json(url2)
-            json_str3 = main.ONOS3.get_json(url3)
-            if json_str1 != "" and json_str2 != "" and json_str3 != "":
-                f.write("ONOS1......IncomingRate \n ")
-                f.write(str(json_str1["meters"][0]['meter']['count']))
-                f.write('\t')
-                f.write(str(json_str1["meters"][0]['meter']['m1_rate']))
-                f.write('\t')
-                f.write(str(json_str1["meters"][0]['meter']['m5_rate']))
-                f.write('\t')
-                f.write(str(json_str1["meters"][0]['meter']['m15_rate']))
-                f.write('\t')
-                f.write(str(json_str1["meters"][0]['meter']['mean_rate']))
-                f.write('\n')
-                f.write("ONOS2......IncomingRate \n")
-                f.write(str(json_str2["meters"][0]['meter']['count']))
-                f.write('\t')
-                f.write(str(json_str2["meters"][0]['meter']['m1_rate']))
-                f.write('\t')
-                f.write(str(json_str2["meters"][0]['meter']['m5_rate']))
-                f.write('\t')
-                f.write(str(json_str2["meters"][0]['meter']['m15_rate']))
-                f.write('\t')
-                f.write(str(json_str2["meters"][0]['meter']['mean_rate']))
-                f.write('\n')
-                f.write("ONOS3......IncomingRate \n")
-                f.write(str(json_str3["meters"][0]['meter']['count']))
-                f.write('\t')
-                f.write(str(json_str3["meters"][0]['meter']['m1_rate']))
-                f.write('\t')
-                f.write(str(json_str3["meters"][0]['meter']['m5_rate']))
-                f.write('\t')
-                f.write(str(json_str3["meters"][0]['meter']['m15_rate']))
-                f.write('\t')
-                f.write(str(json_str3["meters"][0]['meter']['mean_rate']))
-                f.write('\n')
-                f.write('\n')
-
-                f.write("--------------------------------------------------------------------------------- \n") 
+            j1 = main.ONOS1.get_json(url1)
+            j2 = main.ONOS1.get_json(url2)
+            j3 = main.ONOS1.get_json(url3)
+            json_str = []
+            json_str.append(0)
+            json_str.append(j1)
+            json_str.append(j2)
+            json_str.append(j3)
+            if json_str[1] != "" and json_str[2] != "" and json_str[3] != "":
+                for j in range(1,4):
+                    f.write("*****************ONOS" + str(j) + " INCOMING RATE****************************" "\n")
+                    f.write(str(json_str[j]["meters"][0]['meter']['count']))
+                    f.write('\t')
+                    f.write(str(json_str[j]["meters"][0]['meter']['m1_rate']))
+                    f.write('\t')
+                    f.write(str(json_str[j]["meters"][0]['meter']['m5_rate']))
+                    f.write('\t')
+                    f.write(str(json_str[j]["meters"][0]['meter']['m15_rate']))
+                    f.write('\t')
+                    f.write(str(json_str[j]["meters"][0]['meter']['mean_rate']))
+                    f.write('\n')
                 
-                f.write("ONOS1......ProcessingRate \n ")
-                f.write(str(json_str1["meters"][1]['meter']['count']))
-                f.write('\t')
-                f.write(str(json_str1["meters"][1]['meter']['m1_rate']))
-                f.write('\t')
-                f.write(str(json_str1["meters"][1]['meter']['m5_rate']))
-                f.write('\t')
-                f.write(str(json_str1["meters"][1]['meter']['m15_rate']))
-                f.write('\t')
-                f.write(str(json_str1["meters"][1]['meter']['mean_rate']))
-                f.write('\n')
-                f.write("ONOS2......ProcessingRate \n")
-                f.write(str(json_str2["meters"][1]['meter']['count']))
-                f.write('\t')
-                f.write(str(json_str2["meters"][1]['meter']['m1_rate']))
-                f.write('\t')
-                f.write(str(json_str2["meters"][1]['meter']['m5_rate']))
-                f.write('\t')
-                f.write(str(json_str2["meters"][1]['meter']['m15_rate']))
-                f.write('\t')
-                f.write(str(json_str2["meters"][1]['meter']['mean_rate']))
-                f.write('\n')
-                f.write("ONOS3......ProcessingRate \n")
-                f.write(str(json_str3["meters"][1]['meter']['count']))
-                f.write('\t')
-                f.write(str(json_str3["meters"][1]['meter']['m1_rate']))
-                f.write('\t')
-                f.write(str(json_str3["meters"][1]['meter']['m5_rate']))
-                f.write('\t')
-                f.write(str(json_str3["meters"][1]['meter']['m15_rate']))
-                f.write('\t')
-                f.write(str(json_str3["meters"][1]['meter']['mean_rate']))
-                f.write('\n')
-                f.write('\n')
+                    f.write('\n')
 
-                f.write("--------------------------------------------------------------------------------- \n") 
-                time.sleep(10)
+                    f.write("--------------------------------------------------------------------------------- \n") 
+                
+                    f.write("***************** ONOS" + str(j) + " PROCESSING RATE************************" + " \n ")
+                    f.write(str(json_str[j]["meters"][1]['meter']['count']))
+                    f.write('\t')
+                    f.write(str(json_str[j]["meters"][1]['meter']['m1_rate']))
+                    f.write('\t')
+                    f.write(str(json_str[j]["meters"][1]['meter']['m5_rate']))
+                    f.write('\t')
+                    f.write(str(json_str[j]["meters"][1]['meter']['m15_rate']))
+                    f.write('\t')
+                    f.write(str(json_str[j]["meters"][1]['meter']['mean_rate']))
+                    f.write('\n')
+                    f.write('\n')
+                    f.write('\n')
+
+                    f.write("--------------------------------------------------------------------------------- \n") 
+                    f.write("--------------------------------------------------------------------------------- \n \n") 
+                    time.sleep(10)
         f.close()
-
-        main.ONOS3.handle.expect("\$", timeout=900)
         
-    def CASE5(self,main):
+        main.ONOS3.handle.expect("\$", timeout=900)
+   
+        
+    def CASE4(self,main):
         
         main.case("Starting ONOS scale-up to 4 nodes ")
         import time
        # main.RamCloud4.start_serv()
-        main.Zookeeper1.start()
+        main.ONOS5.stop_all()
+        main.ONOS6.stop_all()
+        main.ONOS7.stop_all()
+    
+            
+        main.Zookeeper4.start()
         time.sleep(5)
         
         main.RamCloud4.del_db()
@@ -446,10 +402,109 @@
             else:
                 break
         utilities.assert_equals(expect=main.TRUE,actual=data,onpass="ONOS is up and running!",onfail="ONOS didn't start...")
+        
+        time.sleep(10)
+    
+    def CASE5(self,main):
+        
+        main.case("Starting ONOS scale-up/down to 5 nodes ")
+        import time
+       # main.RamCloud4.start_serv()
+        main.ONOS6.stop_all()
+        main.ONOS7.stop_all()
+        #pdata = main.ONOS5.isup()
+    
+        main.Zookeeper5.start()
+        time.sleep(5)
+        
+        main.RamCloud5.del_db()
+        time.sleep(3)
+        main.RamCloud5.start_serv()
+        time.sleep(3)
+        main.ONOS5.start()
+        main.ONOS5.start_rest()
+        time.sleep(5)
+        data = main.ONOS1.isup() and main.ONOS2.isup() and main.ONOS3.isup() and main.ONOS4.isup() and main.ONOS5.isup()
+        for i in range(3):
+            if data == main.FALSE: 
+                #main.log.report("Something is funny... restarting ONOS")
+                #main.ONOS1.stop()
+                time.sleep(3)
+                #main.ONOS1.start()
+                #time.sleep(5) 
+                data = main.ONOS1.isup() and main.ONOS2.isup() and main.ONOS3.isup() and main.ONOS4.isup() and main.ONOS5.isup() 
+            else:
+                break
+        utilities.assert_equals(expect=main.TRUE,actual=data,onpass="ONOS is up and running!",onfail="ONOS didn't start...")
         time.sleep(10)
 
     def CASE6(self,main):
         
+        main.case("Starting ONOS scale-up/down to 6 nodes ")
+        import time
+       # main.RamCloud4.start_serv()
+        main.ONOS7.stop_all()
+        #pdata = main.ONOS6.isup()
+
+        main.Zookeeper6.start()
+        time.sleep(5)
+        
+        main.RamCloud6.del_db()
+        time.sleep(3)
+        main.RamCloud6.start_serv()
+        time.sleep(3)
+        main.ONOS6.start()
+        main.ONOS6.start_rest()
+        time.sleep(5)
+        data = main.ONOS1.isup() and main.ONOS2.isup() and main.ONOS3.isup() and main.ONOS4.isup() and main.ONOS5.isup() and main.ONOS6.isup()
+        for i in range(3):
+            if data == main.FALSE: 
+                #main.log.report("Something is funny... restarting ONOS")
+                #main.ONOS1.stop()
+                time.sleep(3)
+                #main.ONOS1.start()
+                #time.sleep(5) 
+                data = main.ONOS1.isup() and main.ONOS2.isup() and main.ONOS3.isup() and main.ONOS4.isup() and main.ONOS5.isup() and main.ONOS6.isup()
+            else:
+                break
+        utilities.assert_equals(expect=main.TRUE,actual=data,onpass="ONOS is up and running!",onfail="ONOS didn't start...")
+        time.sleep(10)
+
+    def CASE7(self,main):
+        
+        main.case("Starting ONOS scale-up/down to 7 nodes ")
+        import time
+       # main.RamCloud4.start_serv()
+        #pdata = main.ONOS7.isup()
+    
+        main.Zookeeper7.start()
+        time.sleep(5)
+        
+        main.RamCloud7.del_db()            
+        time.sleep(3)
+        main.RamCloud7.start_serv()
+        time.sleep(3)
+        main.ONOS7.start()
+        main.ONOS7.start_rest()
+        time.sleep(5)
+        data = main.ONOS1.isup() and main.ONOS2.isup() and main.ONOS3.isup() and main.ONOS4.isup() and main.ONOS5.isup() and main.ONOS6.isup() and main.ONOS7.isup()
+        for i in range(3):
+            if data == main.FALSE: 
+                #main.log.report("Something is funny... restarting ONOS")
+                #main.ONOS1.stop()
+                time.sleep(3)
+                #main.ONOS1.start()
+                #time.sleep(5) 
+                data = main.ONOS1.isup() and main.ONOS2.isup() and main.ONOS3.isup() and main.ONOS4.isup() and main.ONOS5.isup() and main.ONOS6.isup() and main.ONOS7.isup()
+            else:
+                break
+        utilities.assert_equals(expect=main.TRUE,actual=data,onpass="ONOS is up and running!",onfail="ONOS didn't start...")
+        time.sleep(10)
+
+
+
+    def CASE41(self,main):
+        main.case("Starting SB test for 4 nodes")
         ip1 = main.params['CTRL']['ip1']
         ip2 = main.params['CTRL']['ip2']
         ip3 = main.params['CTRL']['ip3']
@@ -460,6 +515,7 @@
         switches_num = main.params['switches_num']
         port = main.params['port']
         print loop
+        sleep_init = int(main.params['sleep_init'])
         sleep_t =int( main.params['sleep_t'])
         main.case("Starting SB load on 4 nodes from mininet with " + rate1 +"  added/removed/s for " + run_dur)
         #main.Mininet2.handle.sendline("./loadgen_SB.sh startload \"" + ip1 + " " + ip2 + " " + ip3 + " " + ip4 + "\"" + " " + switches_num + " " + port + " " + rate1 + " " + run_dur +  "  \"11\"")
@@ -467,6 +523,7 @@
         main.Mininet2.handle.expect("Starting SB load....", timeout=900)
         import time
         import json
+        time.sleep(sleep_init)
         open("/home/admin/TestON/tests/scaleONOS7nodes/logs/scale4nodesrate1", 'w').close()
         url1 = "http://10.128.10.1:8080/wm/onos/metrics"
         url2 = "http://10.128.10.2:8080/wm/onos/metrics"
@@ -476,77 +533,51 @@
         f = open("/home/admin/TestON/tests/scaleONOS7nodes/logs/scale4nodesrate1", "a")
         #time.sleep(10)
         for i in range(int (loop)):
-            json_str1 = main.ONOS1.get_json(url1)
-            json_str2 = main.ONOS2.get_json(url2)
-            json_str3 = main.ONOS3.get_json(url3)
-            json_str4 = main.ONOS4.get_json(url4)
-            if json_str1 != "" and json_str2 != "" and json_str3 != "" and json_str4 != "":
+            j1 = main.ONOS2.get_json(url1)
+            j2 = main.ONOS2.get_json(url2)
+            j3 = main.ONOS2.get_json(url3)
+            j4 = main.ONOS2.get_json(url4)
+            json_str = []
+            json_str.append(0)
+            json_str.append(j1)
+            json_str.append(j2)
+            json_str.append(j3)
+            json_str.append(j4)
+            if json_str[1] != "" and json_str[2] != "" and json_str[3] != "" and json_str[4] != "":
                 # write_str = str(json_str["meters"][4]["meter"][2])
                 #print str(json_str["meters"][4])
                 #f.write(str(json_str["meters"][4]))
                 #f.write('\n')
                 #time.sleep(3)
-
-                f.write("ONOS1 \n")
-                f.write(str(json_str1["meters"][4]['meter']['count']))
-                f.write('\t')
-                f.write(str(json_str1["meters"][4]['meter']['m1_rate']))
-                f.write('\t')
-                f.write(str(json_str1["meters"][4]['meter']['m5_rate']))
-                f.write('\t')
-                f.write(str(json_str1["meters"][4]['meter']['m15_rate']))
-                f.write('\t')
-                f.write(str(json_str1["meters"][4]['meter']['mean_rate']))
+                for j in range(1,5):
+                    f.write("ONOS" + str(j) + "\n")
+                    f.write(str(json_str[j]["meters"][4]['meter']['count']))
+                    f.write('\t')
+                    f.write(str(json_str[j]["meters"][4]['meter']['m1_rate']))
+                    f.write('\t')
+                    f.write(str(json_str[j]["meters"][4]['meter']['m5_rate']))
+                    f.write('\t')
+                    f.write(str(json_str[j]["meters"][4]['meter']['m15_rate']))
+                    f.write('\t')
+                    f.write(str(json_str[j]["meters"][4]['meter']['mean_rate']))
+                    f.write('\n')
+                
                 f.write('\n')
-
-                f.write("ONOS2 \n")
-                f.write(str(json_str2["meters"][4]['meter']['count']))
-                f.write('\t')
-                f.write(str(json_str2["meters"][4]['meter']['m1_rate']))
-                f.write('\t')
-                f.write(str(json_str2["meters"][4]['meter']['m5_rate']))
-                f.write('\t')
-                f.write(str(json_str2["meters"][4]['meter']['m15_rate']))
-                f.write('\t')
-                f.write(str(json_str2["meters"][4]['meter']['mean_rate']))
-                f.write('\n')
-
-                f.write("ONOS3 \n")
-                f.write(str(json_str3["meters"][4]['meter']['count']))
-                f.write('\t')
-                f.write(str(json_str3["meters"][4]['meter']['m1_rate']))
-                f.write('\t')
-                f.write(str(json_str3["meters"][4]['meter']['m5_rate']))
-                f.write('\t')
-                f.write(str(json_str3["meters"][4]['meter']['m15_rate']))
-                f.write('\t')
-                f.write(str(json_str3["meters"][4]['meter']['mean_rate']))
-                f.write('\n')
-
-                f.write("ONOS4 \n")
-                f.write(str(json_str4["meters"][4]['meter']['count']))
-                f.write('\t')
-                f.write(str(json_str4["meters"][4]['meter']['m1_rate']))
-                f.write('\t')
-                f.write(str(json_str4["meters"][4]['meter']['m5_rate']))
-                f.write('\t')
-                f.write(str(json_str4["meters"][4]['meter']['m15_rate']))
-                f.write('\t')
-                f.write(str(json_str4["meters"][4]['meter']['mean_rate']))
-                f.write('\n')
-
                 f.write('\n')
                 
+                f.write("--------------------------------------------------------------------------------- \n") 
                 time.sleep(sleep_t)
         f.close() 
+        
         #main.Mininet2.handle.expect("\$", timeout=900)
         #main.Mininet2.handle.sendline("sudo mn -c")
         #main.Mininet2.handle.expect("\$")
         time.sleep(5)
         main.Mininet2.handle.expect("\$", timeout=900)
+        time.sleep(180)
         
 
-    def CASE7(self,main):
+    def CASE42(self,main):
         
         ip1 = main.params['CTRL']['ip1']
         ip2 = main.params['CTRL']['ip2']
@@ -558,6 +589,7 @@
         rate2 = main.params['RATE2']
         run_dur = main.params['RUN_DUR']
         loop = int(main.params['loop'])
+        sleep_init = int(main.params['sleep_init'])
         sleep_t = int(main.params['sleep_t'])
         switches_num = main.params['switches_num']
         port = main.params['port']
@@ -565,7 +597,7 @@
         #main.Mininet2.handle.sendline("./loadgen_SB.sh startload \"" + ip1 + " " + ip2 + " " + ip3 + " " + ip4 +  "\"" + " " + switches_num + " " + port +  " " + rate2 + " " + run_dur +  "  \"11\"")
         main.Mininet2.handle.sendline("sudo ./loadgen_SB.py -u \"" + ip1 + " " + ip2 + " " + ip3 + " " + ip4 +  "\"" + " -s " + switches_num + " -p " + port + " -a " + rate2 + " -d " + rate2 + " -l " + run_dur)
         main.Mininet2.handle.expect("Starting SB load....", timeout=900 )
-        
+        time.sleep(sleep_init)
         open("/home/admin/TestON/tests/scaleONOS7nodes/logs/scale4nodesrate2", 'w').close()
         url1 = "http://10.128.10.1:8080/wm/onos/metrics"
         url2 = "http://10.128.10.2:8080/wm/onos/metrics"
@@ -574,66 +606,44 @@
         f = open("/home/admin/TestON/tests/scaleONOS7nodes/logs/scale4nodesrate2", "a")
         #time.sleep(10)
         for i in range(int (loop)):
-            json_str1 = main.ONOS1.get_json(url1)
-            json_str2 = main.ONOS2.get_json(url2)
-            json_str3 = main.ONOS3.get_json(url3)
-            json_str4 = main.ONOS4.get_json(url4)
-            if json_str1 != "" and json_str2 != "" and json_str3 != "" and json_str4 != "":
-
-                f.write("ONOS1 \n")
-                f.write(str(json_str1["meters"][4]['meter']['count']))
-                f.write('\t')
-                f.write(str(json_str1["meters"][4]['meter']['m1_rate']))
-                f.write('\t')
-                f.write(str(json_str1["meters"][4]['meter']['m5_rate']))
-                f.write('\t')
-                f.write(str(json_str1["meters"][4]['meter']['m15_rate']))
-                f.write('\t')
-                f.write(str(json_str1["meters"][4]['meter']['mean_rate']))
+            j1 = main.ONOS2.get_json(url1)
+            j2 = main.ONOS2.get_json(url2)
+            j3 = main.ONOS2.get_json(url3)
+            j4 = main.ONOS2.get_json(url4)
+            json_str = []
+            json_str.append(0)
+            json_str.append(j1)
+            json_str.append(j2)
+            json_str.append(j3)
+            json_str.append(j4)
+            if json_str[1] != "" and json_str[2] != "" and json_str[3] != "" and json_str[4] != "":
+                # write_str = str(json_str["meters"][4]["meter"][2])
+                #print str(json_str["meters"][4])
+                #f.write(str(json_str["meters"][4]))
+                #f.write('\n')
+                #time.sleep(3)
+                for j in range(1,5):
+                    f.write("ONOS" + str(j) + "\n")
+                    f.write(str(json_str[j]["meters"][4]['meter']['count']))
+                    f.write('\t')
+                    f.write(str(json_str[j]["meters"][4]['meter']['m1_rate']))
+                    f.write('\t')
+                    f.write(str(json_str[j]["meters"][4]['meter']['m5_rate']))
+                    f.write('\t')
+                    f.write(str(json_str[j]["meters"][4]['meter']['m15_rate']))
+                    f.write('\t')
+                    f.write(str(json_str[j]["meters"][4]['meter']['mean_rate']))
+                    f.write('\n')
+                
+                f.write('\n')
                 f.write('\n')
                 
-                f.write("ONOS2 \n")
-                f.write(str(json_str2["meters"][4]['meter']['count']))
-                f.write('\t')
-                f.write(str(json_str2["meters"][4]['meter']['m1_rate']))
-                f.write('\t')
-                f.write(str(json_str2["meters"][4]['meter']['m5_rate']))
-                f.write('\t')
-                f.write(str(json_str2["meters"][4]['meter']['m15_rate']))
-                f.write('\t')
-                f.write(str(json_str2["meters"][4]['meter']['mean_rate']))
-                f.write('\n')
-                
-                f.write("ONOS3 \n")
-                f.write(str(json_str3["meters"][4]['meter']['count']))
-                f.write('\t')
-                f.write(str(json_str3["meters"][4]['meter']['m1_rate']))
-                f.write('\t')
-                f.write(str(json_str3["meters"][4]['meter']['m5_rate']))
-                f.write('\t')
-                f.write(str(json_str3["meters"][4]['meter']['m15_rate']))
-                f.write('\t')
-                f.write(str(json_str3["meters"][4]['meter']['mean_rate']))
-                f.write('\n')
-                
-                f.write("ONOS4 \n")
-                f.write(str(json_str4["meters"][4]['meter']['count']))
-                f.write('\t')
-                f.write(str(json_str4["meters"][4]['meter']['m1_rate']))
-                f.write('\t')
-                f.write(str(json_str4["meters"][4]['meter']['m5_rate']))
-                f.write('\t')
-                f.write(str(json_str4["meters"][4]['meter']['m15_rate']))
-                f.write('\t')
-                f.write(str(json_str4["meters"][4]['meter']['mean_rate']))
-                f.write('\n')
-
-                f.write('\n')
-                
+                f.write("--------------------------------------------------------------------------------- \n") 
                 time.sleep(sleep_t)
-        f.close()
+        f.close() 
+        time.sleep(180)
 
-    def CASE8(self,main):
+    def CASE43(self,main):
         
         main.case("Starting NB Throughput test after scaling up to 4 onos nodes")
         ip1 = main.params['CTRL']['ip1']
@@ -672,112 +682,916 @@
         f = open("/home/admin/TestON/tests/scaleONOS7nodes/logs/NBscale4nodesrate1", "a")
         #time.sleep(10)
         for i in range(8):
-            json_str1 = main.ONOS1.get_json(url1)
-            json_str2 = main.ONOS2.get_json(url2)
-            json_str3 = main.ONOS3.get_json(url3)
-            json_str4 = main.ONOS4.get_json(url4)
-
-            if json_str1 != "" and json_str2 != "" and json_str3 != "":
-                f.write("ONOS1......IncomingRate \n ")
-                f.write(str(json_str1["meters"][0]['meter']['count']))
-                f.write('\t')
-                f.write(str(json_str1["meters"][0]['meter']['m1_rate']))
-                f.write('\t')
-                f.write(str(json_str1["meters"][0]['meter']['m5_rate']))
-                f.write('\t')
-                f.write(str(json_str1["meters"][0]['meter']['m15_rate']))
-                f.write('\t')
-                f.write(str(json_str1["meters"][0]['meter']['mean_rate']))
-                f.write('\n')
-                f.write("ONOS2......IncomingRate \n")
-                f.write(str(json_str2["meters"][0]['meter']['count']))
-                f.write('\t')
-                f.write(str(json_str2["meters"][0]['meter']['m1_rate']))
-                f.write('\t')
-                f.write(str(json_str2["meters"][0]['meter']['m5_rate']))
-                f.write('\t')
-                f.write(str(json_str2["meters"][0]['meter']['m15_rate']))
-                f.write('\t')
-                f.write(str(json_str2["meters"][0]['meter']['mean_rate']))
-                f.write('\n')
-                f.write("ONOS3......IncomingRate \n")
-                f.write(str(json_str3["meters"][0]['meter']['count']))
-                f.write('\t')
-                f.write(str(json_str3["meters"][0]['meter']['m1_rate']))
-                f.write('\t')
-                f.write(str(json_str3["meters"][0]['meter']['m5_rate']))
-                f.write('\t')
-                f.write(str(json_str3["meters"][0]['meter']['m15_rate']))
-                f.write('\t')
-                f.write(str(json_str3["meters"][0]['meter']['mean_rate']))
-                f.write('\n')
-                f.write("ONOS4......IncomingRate \n")
-                f.write(str(json_str4["meters"][0]['meter']['count']))
-                f.write('\t')
-                f.write(str(json_str4["meters"][0]['meter']['m1_rate']))
-                f.write('\t')
-                f.write(str(json_str4["meters"][0]['meter']['m5_rate']))
-                f.write('\t')
-                f.write(str(json_str4["meters"][0]['meter']['m15_rate']))
-                f.write('\t')
-                f.write(str(json_str4["meters"][0]['meter']['mean_rate']))
-                f.write('\n')
-                f.write('\n')
-
-                f.write("--------------------------------------------------------------------------------- \n") 
+            j1 = main.ONOS2.get_json(url1)
+            j2 = main.ONOS2.get_json(url2)
+            j3 = main.ONOS2.get_json(url3)
+            j4 = main.ONOS2.get_json(url4)
+            json_str = []
+            json_str.append(0)
+            json_str.append(j1)
+            json_str.append(j2)
+            json_str.append(j3)
+            json_str.append(j4)
+            if json_str[1] != "" and json_str[2] != "" and json_str[3] != "" and json_str[4] != "":
+                for j in range(1,5):
+                    f.write("*****************ONOS" + str(j) + " INCOMING RATE****************************" "\n")
+                    f.write(str(json_str[j]["meters"][0]['meter']['count']))
+                    f.write('\t')
+                    f.write(str(json_str[j]["meters"][0]['meter']['m1_rate']))
+                    f.write('\t')
+                    f.write(str(json_str[j]["meters"][0]['meter']['m5_rate']))
+                    f.write('\t')
+                    f.write(str(json_str[j]["meters"][0]['meter']['m15_rate']))
+                    f.write('\t')
+                    f.write(str(json_str[j]["meters"][0]['meter']['mean_rate']))
+                    f.write('\n')
                 
-                f.write("ONOS1......ProcessingRate \n ")
-                f.write(str(json_str1["meters"][1]['meter']['count']))
-                f.write('\t')
-                f.write(str(json_str1["meters"][1]['meter']['m1_rate']))
-                f.write('\t')
-                f.write(str(json_str1["meters"][1]['meter']['m5_rate']))
-                f.write('\t')
-                f.write(str(json_str1["meters"][1]['meter']['m15_rate']))
-                f.write('\t')
-                f.write(str(json_str1["meters"][1]['meter']['mean_rate']))
-                f.write('\n')
-                f.write("ONOS2......ProcessingRate \n")
-                f.write(str(json_str2["meters"][1]['meter']['count']))
-                f.write('\t')
-                f.write(str(json_str2["meters"][1]['meter']['m1_rate']))
-                f.write('\t')
-                f.write(str(json_str2["meters"][1]['meter']['m5_rate']))
-                f.write('\t')
-                f.write(str(json_str2["meters"][1]['meter']['m15_rate']))
-                f.write('\t')
-                f.write(str(json_str2["meters"][1]['meter']['mean_rate']))
-                f.write('\n')
-                f.write("ONOS3......ProcessingRate \n")
-                f.write(str(json_str3["meters"][1]['meter']['count']))
-                f.write('\t')
-                f.write(str(json_str3["meters"][1]['meter']['m1_rate']))
-                f.write('\t')
-                f.write(str(json_str3["meters"][1]['meter']['m5_rate']))
-                f.write('\t')
-                f.write(str(json_str3["meters"][1]['meter']['m15_rate']))
-                f.write('\t')
-                f.write(str(json_str3["meters"][1]['meter']['mean_rate']))
-                f.write('\n')
+                    f.write('\n')
 
-                f.write("ONOS4......ProcessingRate \n")
-                f.write(str(json_str4["meters"][1]['meter']['count']))
-                f.write('\t')
-                f.write(str(json_str4["meters"][1]['meter']['m1_rate']))
-                f.write('\t')
-                f.write(str(json_str4["meters"][1]['meter']['m5_rate']))
-                f.write('\t')
-                f.write(str(json_str4["meters"][1]['meter']['m15_rate']))
-                f.write('\t')
-                f.write(str(json_str4["meters"][1]['meter']['mean_rate']))
-                f.write('\n')
+                    f.write("--------------------------------------------------------------------------------- \n") 
+                
+                    f.write("***************** ONOS" + str(j) + " PROCESSING RATE************************" + " \n ")
+                    f.write(str(json_str[j]["meters"][1]['meter']['count']))
+                    f.write('\t')
+                    f.write(str(json_str[j]["meters"][1]['meter']['m1_rate']))
+                    f.write('\t')
+                    f.write(str(json_str[j]["meters"][1]['meter']['m5_rate']))
+                    f.write('\t')
+                    f.write(str(json_str[j]["meters"][1]['meter']['m15_rate']))
+                    f.write('\t')
+                    f.write(str(json_str[j]["meters"][1]['meter']['mean_rate']))
+                    f.write('\n')
+                    f.write('\n')
+                    f.write('\n')
 
-                f.write('\n')
-
-                f.write("--------------------------------------------------------------------------------- \n") 
-       
-                time.sleep(10)
+                    f.write("--------------------------------------------------------------------------------- \n") 
+                    f.write("--------------------------------------------------------------------------------- \n \n") 
+                    time.sleep(10)
         f.close()
+        
 
         main.ONOS3.handle.expect("\$", timeout=900)
+    
+    
+    def CASE51(self,main):
+        main.case("Starting SB test for 5 nodes")
+        ip1 = main.params['CTRL']['ip1']
+        ip2 = main.params['CTRL']['ip2']
+        ip3 = main.params['CTRL']['ip3']
+        ip4 = main.params['CTRL']['ip4']
+        ip5 = main.params['CTRL']['ip5']
+        rate1 = main.params['RATE1']
+        run_dur = main.params['RUN_DUR']
+        loop = int( main.params['loop'])
+        switches_num = main.params['switches_num']
+        port = main.params['port']
+        print loop
+        sleep_init = int(main.params['sleep_init'])
+        sleep_t =int( main.params['sleep_t'])
+        main.case("Starting SB load on 5 nodes from mininet with " + rate1 +"  added/removed/s for " + run_dur)
+        #main.Mininet2.handle.sendline("./loadgen_SB.sh startload \"" + ip1 + " " + ip2 + " " + ip3 + " " + ip4 + "\"" + " " + switches_num + " " + port + " " + rate1 + " " + run_dur +  "  \"11\"")
+        main.Mininet2.handle.sendline("sudo ./loadgen_SB.py -u \"" + ip1 + " " + ip2 + " " + ip3 + " " + ip4 + " " + ip5 + "\"" + " -s " + switches_num + " -p " + port + " -a " + rate1 + " -d " + rate1 + " -l " + run_dur)
+        main.Mininet2.handle.expect("Starting SB load....", timeout=900)
+        import time
+        import json
+        time.sleep(sleep_init)
+
+        open("/home/admin/TestON/tests/scaleONOS7nodes/logs/scale5nodesrate1", 'w').close()
+        url1 = "http://10.128.10.1:8080/wm/onos/metrics"
+        url2 = "http://10.128.10.2:8080/wm/onos/metrics"
+        url3 = "http://10.128.10.3:8080/wm/onos/metrics"
+        url4 = "http://10.128.10.4:8080/wm/onos/metrics"
+        url5 = "http://10.128.10.5:8080/wm/onos/metrics"
+
+        f = open("/home/admin/TestON/tests/scaleONOS7nodes/logs/scale5nodesrate1", "a")
+        #time.sleep(10)
+        for i in range(int (loop)):
+            j1 = main.ONOS2.get_json(url1)
+            j2 = main.ONOS2.get_json(url2)
+            j3 = main.ONOS2.get_json(url3)
+            j4 = main.ONOS2.get_json(url4)
+            j5 = main.ONOS2.get_json(url5)
+            json_str = []
+            json_str.append(0)
+            json_str.append(j1)
+            json_str.append(j2)
+            json_str.append(j3)
+            json_str.append(j4)
+            json_str.append(j5)
+            if json_str[1] != "" and json_str[2] != "" and json_str[3] != "" and json_str[4] != "" and json_str[5] != "":
+                # write_str = str(json_str["meters"][4]["meter"][2])
+                #print str(json_str["meters"][4])
+                #f.write(str(json_str["meters"][4]))
+                #f.write('\n')
+                #time.sleep(3)
+                for j in range(1,6):
+                    f.write("ONOS" + str(j) + "\n")
+                    f.write(str(json_str[j]["meters"][4]['meter']['count']))
+                    f.write('\t')
+                    f.write(str(json_str[j]["meters"][4]['meter']['m1_rate']))
+                    f.write('\t')
+                    f.write(str(json_str[j]["meters"][4]['meter']['m5_rate']))
+                    f.write('\t')
+                    f.write(str(json_str[j]["meters"][4]['meter']['m15_rate']))
+                    f.write('\t')
+                    f.write(str(json_str[j]["meters"][4]['meter']['mean_rate']))
+                    f.write('\n')
+                
+                f.write('\n')
+                f.write('\n')
+                
+                f.write("--------------------------------------------------------------------------------- \n") 
+                time.sleep(sleep_t)
+        f.close() 
+        
+        #main.Mininet2.handle.expect("\$", timeout=900)
+        #main.Mininet2.handle.sendline("sudo mn -c")
+        #main.Mininet2.handle.expect("\$")
+        time.sleep(5)
+        main.Mininet2.handle.expect("\$", timeout=900)
+        time.sleep(180)
+        
+
+    def CASE52(self,main):
+        
+        ip1 = main.params['CTRL']['ip1']
+        ip2 = main.params['CTRL']['ip2']
+        ip3 = main.params['CTRL']['ip3']
+        ip4 = main.params['CTRL']['ip4']
+        ip5 = main.params['CTRL']['ip5']
+        
+        import time
+        import json
+        rate2 = main.params['RATE2']
+        run_dur = main.params['RUN_DUR']
+        loop = int(main.params['loop'])
+        sleep_t = int(main.params['sleep_t'])
+        sleep_init = int(main.params['sleep_init'])
+        switches_num = main.params['switches_num']
+        port = main.params['port']
+        main.case("Starting SB load on 4 nodes from mininet with " + rate2 +"  added/removed/s for " + run_dur)
+        #main.Mininet2.handle.sendline("./loadgen_SB.sh startload \"" + ip1 + " " + ip2 + " " + ip3 + " " + ip4 +  "\"" + " " + switches_num + " " + port +  " " + rate2 + " " + run_dur +  "  \"11\"")
+        main.Mininet2.handle.sendline("sudo ./loadgen_SB.py -u \"" + ip1 + " " + ip2 + " " + ip3 + " " + ip4 + " " + ip5 + "\"" + " -s " + switches_num + " -p " + port + " -a " + rate2 + " -d " + rate2 + " -l " + run_dur)
+        main.Mininet2.handle.expect("Starting SB load....", timeout=900 )
+        time.sleep(sleep_init)
+        open("/home/admin/TestON/tests/scaleONOS7nodes/logs/scale5nodesrate2", 'w').close()
+        url1 = "http://10.128.10.1:8080/wm/onos/metrics"
+        url2 = "http://10.128.10.2:8080/wm/onos/metrics"
+        url3 = "http://10.128.10.3:8080/wm/onos/metrics"
+        url4 = "http://10.128.10.4:8080/wm/onos/metrics"
+        url5 = "http://10.128.10.5:8080/wm/onos/metrics"
+        f = open("/home/admin/TestON/tests/scaleONOS7nodes/logs/scale5nodesrate2", "a")
+        #time.sleep(10)
+        for i in range(int (loop)):
+            j1 = main.ONOS2.get_json(url1)
+            j2 = main.ONOS2.get_json(url2)
+            j3 = main.ONOS2.get_json(url3)
+            j4 = main.ONOS2.get_json(url4)
+            j5 = main.ONOS2.get_json(url5)
+            json_str = []
+            json_str.append(0)
+            json_str.append(j1)
+            json_str.append(j2)
+            json_str.append(j3)
+            json_str.append(j4)
+            json_str.append(j5)
+            if json_str[1] != "" and json_str[2] != "" and json_str[3] != "" and json_str[4] != "" and json_str[4] != "":
+                # write_str = str(json_str["meters"][4]["meter"][2])
+                #print str(json_str["meters"][4])
+                #f.write(str(json_str["meters"][4]))
+                #f.write('\n')
+                #time.sleep(3)
+                for j in range(1,6):
+                    f.write("ONOS" + str(j) + "\n")
+                    f.write(str(json_str[j]["meters"][4]['meter']['count']))
+                    f.write('\t')
+                    f.write(str(json_str[j]["meters"][4]['meter']['m1_rate']))
+                    f.write('\t')
+                    f.write(str(json_str[j]["meters"][4]['meter']['m5_rate']))
+                    f.write('\t')
+                    f.write(str(json_str[j]["meters"][4]['meter']['m15_rate']))
+                    f.write('\t')
+                    f.write(str(json_str[j]["meters"][4]['meter']['mean_rate']))
+                    f.write('\n')
+                
+                f.write('\n')
+                f.write('\n')
+                
+                f.write("--------------------------------------------------------------------------------- \n") 
+                time.sleep(sleep_t)
+        f.close() 
+        time.sleep(180)
+
+    def CASE53(self,main):
+        
+        main.case("Starting NB Throughput test after scaling up to 4 onos nodes")
+        ip1 = main.params['CTRL']['ip1']
+        ip2 = main.params['CTRL']['ip2']
+        ip3 = main.params['CTRL']['ip3']
+        ip4 = main.params['CTRL']['ip4']
+
+        import time
+        import json
+
+        main.Mininet4.handle.expect("\$")
+        #main.Mininet2.handle.sendline("sudo mn --custom topo-intentTPtest.py --topo mytopo --mac --arp")
+        #main.Mininet2.handle.expect("mininet>" , timeout=400)
+        main.Mininet4.handle.sendline("sudo ovs-vsctl set-controller s1 tcp:10.128.10.1:6633")
+        main.Mininet4.handle.sendline("sudo ovs-vsctl set-controller s2 tcp:10.128.10.2:6633")
+        main.Mininet4.handle.sendline("sudo ovs-vsctl set-controller s3 tcp:10.128.10.3:6633")
+        main.Mininet4.handle.sendline("sudo ovs-vsctl set-controller s4 tcp:10.128.10.4:6633")
+        main.Mininet4.handle.sendline("sudo ovs-vsctl set-controller s5 tcp:10.128.10.1:6633")
+        main.Mininet4.handle.sendline("sudo ovs-vsctl set-controller s6 tcp:10.128.10.2:6633")
+        main.Mininet4.handle.sendline("sudo ovs-vsctl set-controller s7 tcp:10.128.10.4:6633")
+
+        main.ONOS3.handle.sendline("cd ~admin/suibin-dev")
+        main.ONOS3.handle.expect("\$")
+
+        main.ONOS3.handle.sendline("./multiLoadgen_NB.py -u \"10.128.10.1:8080 10.128.10.2:8080 10.128.10.3:8080 10.128.10.4:8080  \" -i 4 -g 100 -a 1 -d 1 -p 0")
+        main.ONOS3.handle.expect("intent group is : 0", timeout=900)
+
+        
+        import json
+        
+        open("/home/admin/TestON/tests/scaleONOS7nodes/logs/NBscale5nodesrate1", 'w').close()
+        url1 = "http://10.128.10.1:8080/wm/onos/metrics"
+        url2 = "http://10.128.10.2:8080/wm/onos/metrics"
+        url3 = "http://10.128.10.3:8080/wm/onos/metrics"
+        url4 = "http://10.128.10.4:8080/wm/onos/metrics"
+        url5 = "http://10.128.10.5:8080/wm/onos/metrics"
+        f = open("/home/admin/TestON/tests/scaleONOS7nodes/logs/NBscale5nodesrate1", "a")
+        #time.sleep(10)
+        for i in range(8):
+            j1 = main.ONOS2.get_json(url1)
+            j2 = main.ONOS2.get_json(url2)
+            j3 = main.ONOS2.get_json(url3)
+            j4 = main.ONOS2.get_json(url4)
+            j5 = main.ONOS2.get_json(url5)
+            json_str = []
+            json_str.append(0)
+            json_str.append(j1)
+            json_str.append(j2)
+            json_str.append(j3)
+            json_str.append(j4)
+            json_str.append(j5)
+            if json_str[1] != "" and json_str[2] != "" and json_str[3] != "" and json_str[4] != "" and json_str[5] != "":
+                for j in range(1,6):
+                    f.write("*****************ONOS" + str(j) + " INCOMING RATE****************************" "\n")
+                    f.write(str(json_str[j]["meters"][0]['meter']['count']))
+                    f.write('\t')
+                    f.write(str(json_str[j]["meters"][0]['meter']['m1_rate']))
+                    f.write('\t')
+                    f.write(str(json_str[j]["meters"][0]['meter']['m5_rate']))
+                    f.write('\t')
+                    f.write(str(json_str[j]["meters"][0]['meter']['m15_rate']))
+                    f.write('\t')
+                    f.write(str(json_str[j]["meters"][0]['meter']['mean_rate']))
+                    f.write('\n')
+                
+                    f.write('\n')
+
+                    f.write("--------------------------------------------------------------------------------- \n") 
+                
+                    f.write("***************** ONOS" + str(j) + " PROCESSING RATE************************" + " \n ")
+                    f.write(str(json_str[j]["meters"][1]['meter']['count']))
+                    f.write('\t')
+                    f.write(str(json_str[j]["meters"][1]['meter']['m1_rate']))
+                    f.write('\t')
+                    f.write(str(json_str[j]["meters"][1]['meter']['m5_rate']))
+                    f.write('\t')
+                    f.write(str(json_str[j]["meters"][1]['meter']['m15_rate']))
+                    f.write('\t')
+                    f.write(str(json_str[j]["meters"][1]['meter']['mean_rate']))
+                    f.write('\n')
+                    f.write('\n')
+                    f.write('\n')
+
+                    f.write("--------------------------------------------------------------------------------- \n") 
+                    f.write("--------------------------------------------------------------------------------- \n \n") 
+                    time.sleep(10)
+        f.close()
+        
+
+        main.ONOS3.handle.expect("\$", timeout=900)
+    
+    def CASE61(self,main):
+        main.case("Starting SB test for 5 nodes")
+        ip1 = main.params['CTRL']['ip1']
+        ip2 = main.params['CTRL']['ip2']
+        ip3 = main.params['CTRL']['ip3']
+        ip4 = main.params['CTRL']['ip4']
+        ip5 = main.params['CTRL']['ip5']
+        ip6 = main.params['CTRL']['ip6']
+        rate1 = main.params['RATE1']
+        run_dur = main.params['RUN_DUR']
+        loop = int( main.params['loop'])
+        switches_num = main.params['switches_num']
+        port = main.params['port']
+        print loop
+        sleep_t =int( main.params['sleep_t'])
+        sleep_init = int(main.params['sleep_init'])
+        main.case("Starting SB load on 6 nodes from mininet with " + rate1 +"  added/removed/s for " + run_dur)
+        #main.Mininet2.handle.sendline("./loadgen_SB.sh startload \"" + ip1 + " " + ip2 + " " + ip3 + " " + ip4 + "\"" + " " + switches_num + " " + port + " " + rate1 + " " + run_dur +  "  \"11\"")
+        main.Mininet2.handle.sendline("sudo ./loadgen_SB.py -u \"" + ip1 + " " + ip2 + " " + ip3 + " " + ip4 + " " + ip5 + " " + ip6 +  "\"" + " -s " + switches_num + " -p " + port + " -a " + rate1 + " -d " + rate1 + " -l " + run_dur)
+        main.Mininet2.handle.expect("Starting SB load....", timeout=900)
+        
+        import time
+        import json
+        time.sleep(sleep_init)
+        open("/home/admin/TestON/tests/scaleONOS7nodes/logs/scale6nodesrate1", 'w').close()
+        url1 = "http://10.128.10.1:8080/wm/onos/metrics"
+        url2 = "http://10.128.10.2:8080/wm/onos/metrics"
+        url3 = "http://10.128.10.3:8080/wm/onos/metrics"
+        url4 = "http://10.128.10.4:8080/wm/onos/metrics"
+        url5 = "http://10.128.10.5:8080/wm/onos/metrics"
+        url5 = "http://10.128.10.5:8080/wm/onos/metrics"
+        url6 = "http://10.128.10.6:8080/wm/onos/metrics"
+
+        f = open("/home/admin/TestON/tests/scaleONOS7nodes/logs/scale6nodesrate1", "a")
+        #time.sleep(10)
+        for i in range(int (loop)):
+            j1 = main.ONOS2.get_json(url1)
+            j2 = main.ONOS2.get_json(url2)
+            j3 = main.ONOS2.get_json(url3)
+            j4 = main.ONOS2.get_json(url4)
+            j5 = main.ONOS2.get_json(url5)
+            j6 = main.ONOS2.get_json(url6)
+            json_str = []
+            json_str.append(0)
+            json_str.append(j1)
+            json_str.append(j2)
+            json_str.append(j3)
+            json_str.append(j4)
+            json_str.append(j5)
+            json_str.append(j6)
+            if json_str[1] != "" and json_str[2] != "" and json_str[3] != "" and json_str[4] != "" and json_str[5] != "" and json_str[6] != "":
+                # write_str = str(json_str["meters"][4]["meter"][2])
+                #print str(json_str["meters"][4])
+                #f.write(str(json_str["meters"][4]))
+                #f.write('\n')
+                #time.sleep(3)
+                for j in range(1,7):
+                    f.write("ONOS" + str(j) + "\n")
+                    f.write(str(json_str[j]["meters"][4]['meter']['count']))
+                    f.write('\t')
+                    f.write(str(json_str[j]["meters"][4]['meter']['m1_rate']))
+                    f.write('\t')
+                    f.write(str(json_str[j]["meters"][4]['meter']['m5_rate']))
+                    f.write('\t')
+                    f.write(str(json_str[j]["meters"][4]['meter']['m15_rate']))
+                    f.write('\t')
+                    f.write(str(json_str[j]["meters"][4]['meter']['mean_rate']))
+                    f.write('\n')
+                
+                f.write('\n')
+                f.write('\n')
+                
+                f.write("--------------------------------------------------------------------------------- \n") 
+                time.sleep(sleep_t)
+        f.close() 
+        
+        #main.Mininet2.handle.expect("\$", timeout=900)
+        #main.Mininet2.handle.sendline("sudo mn -c")
+        #main.Mininet2.handle.expect("\$")
+        time.sleep(5)
+        main.Mininet2.handle.expect("\$", timeout=900)
+        time.sleep(180)
+        
+
+    def CASE62(self,main):
+        
+        ip1 = main.params['CTRL']['ip1']
+        ip2 = main.params['CTRL']['ip2']
+        ip3 = main.params['CTRL']['ip3']
+        ip4 = main.params['CTRL']['ip4']
+        ip5 = main.params['CTRL']['ip5']
+        ip6 = main.params['CTRL']['ip6']
+        
+        import time
+        import json
+        rate2 = main.params['RATE2']
+        run_dur = main.params['RUN_DUR']
+        loop = int(main.params['loop'])
+        sleep_t = int(main.params['sleep_t'])
+        switches_num = main.params['switches_num']
+        sleep_init = int(main.params['sleep_init'])
+        port = main.params['port']
+        main.case("Starting SB load on 4 nodes from mininet with " + rate2 +"  added/removed/s for " + run_dur)
+        #main.Mininet2.handle.sendline("./loadgen_SB.sh startload \"" + ip1 + " " + ip2 + " " + ip3 + " " + ip4 +  "\"" + " " + switches_num + " " + port +  " " + rate2 + " " + run_dur +  "  \"11\"")
+        main.Mininet2.handle.sendline("sudo ./loadgen_SB.py -u \"" + ip1 + " " + ip2 + " " + ip3 + " " + ip4 + " " + ip5 + " " + ip6 + "\"" + " -s " + switches_num + " -p " + port + " -a " + rate2 + " -d " + rate2 + " -l " + run_dur)
+        main.Mininet2.handle.expect("Starting SB load....", timeout=900 )
+        time.sleep(sleep_init)
+        open("/home/admin/TestON/tests/scaleONOS7nodes/logs/scale6nodesrate2", 'w').close()
+        url1 = "http://10.128.10.1:8080/wm/onos/metrics"
+        url2 = "http://10.128.10.2:8080/wm/onos/metrics"
+        url3 = "http://10.128.10.3:8080/wm/onos/metrics"
+        url4 = "http://10.128.10.4:8080/wm/onos/metrics"
+        url5 = "http://10.128.10.5:8080/wm/onos/metrics"
+        url6 = "http://10.128.10.6:8080/wm/onos/metrics"
+        f = open("/home/admin/TestON/tests/scaleONOS7nodes/logs/scale6nodesrate2", "a")
+        #time.sleep(10)
+        for i in range(int (loop)):
+            j1 = main.ONOS2.get_json(url1)
+            j2 = main.ONOS2.get_json(url2)
+            j3 = main.ONOS2.get_json(url3)
+            j4 = main.ONOS2.get_json(url4)
+            j5 = main.ONOS2.get_json(url5)
+            j6 = main.ONOS2.get_json(url6)
+            json_str = []
+            json_str.append(0)
+            json_str.append(j1)
+            json_str.append(j2)
+            json_str.append(j3)
+            json_str.append(j4)
+            json_str.append(j5)
+            json_str.append(j6)
+            if json_str[1] != "" and json_str[2] != "" and json_str[3] != "" and json_str[4] != "" and json_str[5] != "" and json_str[6] != "":
+                # write_str = str(json_str["meters"][4]["meter"][2])
+                #print str(json_str["meters"][4])
+                #f.write(str(json_str["meters"][4]))
+                #f.write('\n')
+                #time.sleep(3)
+                for j in range(1,7):
+                    f.write("ONOS" + str(j) + "\n")
+                    f.write(str(json_str[j]["meters"][4]['meter']['count']))
+                    f.write('\t')
+                    f.write(str(json_str[j]["meters"][4]['meter']['m1_rate']))
+                    f.write('\t')
+                    f.write(str(json_str[j]["meters"][4]['meter']['m5_rate']))
+                    f.write('\t')
+                    f.write(str(json_str[j]["meters"][4]['meter']['m15_rate']))
+                    f.write('\t')
+                    f.write(str(json_str[j]["meters"][4]['meter']['mean_rate']))
+                    f.write('\n')
+                
+                f.write('\n')
+                f.write('\n')
+                
+                f.write("--------------------------------------------------------------------------------- \n") 
+                time.sleep(sleep_t)
+        f.close() 
+        time.sleep(180)
+
+    def CASE63(self,main):
+        
+        main.case("Starting NB Throughput test after scaling up to 4 onos nodes")
+        ip1 = main.params['CTRL']['ip1']
+        ip2 = main.params['CTRL']['ip2']
+        ip3 = main.params['CTRL']['ip3']
+        ip4 = main.params['CTRL']['ip4']
+
+        import time
+        import json
+
+        main.Mininet4.handle.expect("\$")
+        #main.Mininet2.handle.sendline("sudo mn --custom topo-intentTPtest.py --topo mytopo --mac --arp")
+        #main.Mininet2.handle.expect("mininet>" , timeout=400)
+        main.Mininet4.handle.sendline("sudo ovs-vsctl set-controller s1 tcp:10.128.10.1:6633")
+        main.Mininet4.handle.sendline("sudo ovs-vsctl set-controller s2 tcp:10.128.10.2:6633")
+        main.Mininet4.handle.sendline("sudo ovs-vsctl set-controller s3 tcp:10.128.10.3:6633")
+        main.Mininet4.handle.sendline("sudo ovs-vsctl set-controller s4 tcp:10.128.10.4:6633")
+        main.Mininet4.handle.sendline("sudo ovs-vsctl set-controller s5 tcp:10.128.10.1:6633")
+        main.Mininet4.handle.sendline("sudo ovs-vsctl set-controller s6 tcp:10.128.10.2:6633")
+        main.Mininet4.handle.sendline("sudo ovs-vsctl set-controller s7 tcp:10.128.10.4:6633")
+
+        main.ONOS3.handle.sendline("cd ~admin/suibin-dev")
+        main.ONOS3.handle.expect("\$")
+
+        main.ONOS3.handle.sendline("./multiLoadgen_NB.py -u \"10.128.10.1:8080 10.128.10.2:8080 10.128.10.3:8080 10.128.10.4:8080  \" -i 4 -g 100 -a 1 -d 1 -p 0")
+        main.ONOS3.handle.expect("intent group is : 0", timeout=900)
+
+        
+        import json
+        
+        open("/home/admin/TestON/tests/scaleONOS7nodes/logs/NBscale6nodesrate1", 'w').close()
+        url1 = "http://10.128.10.1:8080/wm/onos/metrics"
+        url2 = "http://10.128.10.2:8080/wm/onos/metrics"
+        url3 = "http://10.128.10.3:8080/wm/onos/metrics"
+        url4 = "http://10.128.10.4:8080/wm/onos/metrics"
+        url5 = "http://10.128.10.5:8080/wm/onos/metrics"
+        url6 = "http://10.128.10.6:8080/wm/onos/metrics"
+        f = open("/home/admin/TestON/tests/scaleONOS7nodes/logs/NBscale6nodesrate1", "a")
+        #time.sleep(10)
+        for i in range(8):
+            j1 = main.ONOS2.get_json(url1)
+            j2 = main.ONOS2.get_json(url2)
+            j3 = main.ONOS2.get_json(url3)
+            j4 = main.ONOS2.get_json(url4)
+            j5 = main.ONOS2.get_json(url5)
+            j6 = main.ONOS2.get_json(url6)
+            json_str = []
+            json_str.append(0)
+            json_str.append(j1)
+            json_str.append(j2)
+            json_str.append(j3)
+            json_str.append(j4)
+            json_str.append(j5)
+            json_str.append(j6)
+            if json_str[1] != "" and json_str[2] != "" and json_str[3] != "" and json_str[4] != "" and json_str[5] != "" and json_str[6] != "":
+                for j in range(1,7):
+                    f.write("*****************ONOS" + str(j) + " INCOMING RATE****************************" "\n")
+                    f.write(str(json_str[j]["meters"][0]['meter']['count']))
+                    f.write('\t')
+                    f.write(str(json_str[j]["meters"][0]['meter']['m1_rate']))
+                    f.write('\t')
+                    f.write(str(json_str[j]["meters"][0]['meter']['m5_rate']))
+                    f.write('\t')
+                    f.write(str(json_str[j]["meters"][0]['meter']['m15_rate']))
+                    f.write('\t')
+                    f.write(str(json_str[j]["meters"][0]['meter']['mean_rate']))
+                    f.write('\n')
+                
+                    f.write('\n')
+
+                    f.write("--------------------------------------------------------------------------------- \n") 
+                
+                    f.write("***************** ONOS" + str(j) + " PROCESSING RATE************************" + " \n ")
+                    f.write(str(json_str[j]["meters"][1]['meter']['count']))
+                    f.write('\t')
+                    f.write(str(json_str[j]["meters"][1]['meter']['m1_rate']))
+                    f.write('\t')
+                    f.write(str(json_str[j]["meters"][1]['meter']['m5_rate']))
+                    f.write('\t')
+                    f.write(str(json_str[j]["meters"][1]['meter']['m15_rate']))
+                    f.write('\t')
+                    f.write(str(json_str[j]["meters"][1]['meter']['mean_rate']))
+                    f.write('\n')
+                    f.write('\n')
+                    f.write('\n')
+
+                    f.write("--------------------------------------------------------------------------------- \n") 
+                    f.write("--------------------------------------------------------------------------------- \n \n") 
+                    time.sleep(10)
+        f.close()
+        
+
+        main.ONOS3.handle.expect("\$", timeout=900)
+
+    def CASE71(self,main):
+        main.case("Starting SB test for 7 nodes")
+        ip1 = main.params['CTRL']['ip1']
+        ip2 = main.params['CTRL']['ip2']
+        ip3 = main.params['CTRL']['ip3']
+        ip4 = main.params['CTRL']['ip4']
+        ip5 = main.params['CTRL']['ip5']
+        ip6 = main.params['CTRL']['ip6']
+        ip7 = main.params['CTRL']['ip7']
+        rate1 = main.params['RATE1']
+        run_dur = main.params['RUN_DUR']
+        loop = int( main.params['loop'])
+        switches_num = main.params['switches_num']
+        port = main.params['port']
+        print loop
+        sleep_t =int( main.params['sleep_t'])
+        sleep_init = int(main.params['sleep_init'])
+        main.case("Starting SB load on 6 nodes from mininet with " + rate1 +"  added/removed/s for " + run_dur)
+        #main.Mininet2.handle.sendline("./loadgen_SB.sh startload \"" + ip1 + " " + ip2 + " " + ip3 + " " + ip4 + "\"" + " " + switches_num + " " + port + " " + rate1 + " " + run_dur +  "  \"11\"")
+        main.Mininet2.handle.sendline("sudo ./loadgen_SB.py -u \"" + ip1 + " " + ip2 + " " + ip3 + " " + ip4 + " " + ip5 +  " " + ip6 + " " + ip7 + "\"" + " -s " + switches_num + " -p " + port + " -a " + rate1 + " -d " + rate1 + " -l " + run_dur)
+        main.Mininet2.handle.expect("Starting SB load....", timeout=900)
+        import time
+        import json
+        time.sleep(sleep_init)
+        
+        open("/home/admin/TestON/tests/scaleONOS7nodes/logs/scale7nodesrate1", 'w').close()
+        url1 = "http://10.128.10.1:8080/wm/onos/metrics"
+        url2 = "http://10.128.10.2:8080/wm/onos/metrics"
+        url3 = "http://10.128.10.3:8080/wm/onos/metrics"
+        url4 = "http://10.128.10.4:8080/wm/onos/metrics"
+        url5 = "http://10.128.10.5:8080/wm/onos/metrics"
+        url5 = "http://10.128.10.5:8080/wm/onos/metrics"
+        url6 = "http://10.128.10.6:8080/wm/onos/metrics"
+        url7 = "http://10.128.10.7:8080/wm/onos/metrics"
+
+        f = open("/home/admin/TestON/tests/scaleONOS7nodes/logs/scale7nodesrate1", "a")
+        #time.sleep(10)
+        for i in range(int (loop)):
+            j1 = main.ONOS2.get_json(url1)
+            j2 = main.ONOS2.get_json(url2)
+            j3 = main.ONOS2.get_json(url3)
+            j4 = main.ONOS2.get_json(url4)
+            j5 = main.ONOS2.get_json(url5)
+            j6 = main.ONOS2.get_json(url6)
+            j7 = main.ONOS2.get_json(url7)
+            json_str = []
+            json_str.append(0)
+            json_str.append(j1)
+            json_str.append(j2)
+            json_str.append(j3)
+            json_str.append(j4)
+            json_str.append(j5)
+            json_str.append(j6)
+            json_str.append(j7)
+            if json_str[1] != "" and json_str[2] != "" and json_str[3] != "" and json_str[4] != "" and json_str[5] != "" and json_str[6] != "" and json_str[7] != "":
+                # write_str = str(json_str["meters"][4]["meter"][2])
+                #print str(json_str["meters"][4])
+                #f.write(str(json_str["meters"][4]))
+                #f.write('\n')
+                #time.sleep(3)
+                for j in range(1,8):
+                    f.write("ONOS" + str(j) + "\n")
+                    f.write(str(json_str[j]["meters"][4]['meter']['count']))
+                    f.write('\t')
+                    f.write(str(json_str[j]["meters"][4]['meter']['m1_rate']))
+                    f.write('\t')
+                    f.write(str(json_str[j]["meters"][4]['meter']['m5_rate']))
+                    f.write('\t')
+                    f.write(str(json_str[j]["meters"][4]['meter']['m15_rate']))
+                    f.write('\t')
+                    f.write(str(json_str[j]["meters"][4]['meter']['mean_rate']))
+                    f.write('\n')
+                
+                f.write('\n')
+                f.write('\n')
+                
+                f.write("--------------------------------------------------------------------------------- \n") 
+                time.sleep(sleep_t)
+        f.close() 
+        
+        #main.Mininet2.handle.expect("\$", timeout=900)
+        #main.Mininet2.handle.sendline("sudo mn -c")
+        #main.Mininet2.handle.expect("\$")
+        time.sleep(5)
+        main.Mininet2.handle.expect("\$", timeout=900)
+        time.sleep(180)
+        
+
+    def CASE72(self,main):
+        
+        ip1 = main.params['CTRL']['ip1']
+        ip2 = main.params['CTRL']['ip2']
+        ip3 = main.params['CTRL']['ip3']
+        ip4 = main.params['CTRL']['ip4']
+        ip5 = main.params['CTRL']['ip5']
+        ip6 = main.params['CTRL']['ip6']
+        ip7 = main.params['CTRL']['ip7']
+        
+        import time
+        import json
+        rate2 = main.params['RATE2']
+        run_dur = main.params['RUN_DUR']
+        loop = int(main.params['loop'])
+        sleep_t = int(main.params['sleep_t'])
+        sleep_init = int(main.params['sleep_init'])
+        switches_num = main.params['switches_num']
+        port = main.params['port']
+        main.case("Starting SB load on 7 nodes from mininet with " + rate2 +"  added/removed/s for " + run_dur)
+        #main.Mininet2.handle.sendline("./loadgen_SB.sh startload \"" + ip1 + " " + ip2 + " " + ip3 + " " + ip4 +  "\"" + " " + switches_num + " " + port +  " " + rate2 + " " + run_dur +  "  \"11\"")
+        main.Mininet2.handle.sendline("sudo ./loadgen_SB.py -u \"" + ip1 + " " + ip2 + " " + ip3 + " " + ip4 + " " + ip5 + " " + ip6 + " " + ip7 + "\"" + " -s " + switches_num + " -p " + port + " -a " + rate2 + " -d " + rate2 + " -l " + run_dur)
+        main.Mininet2.handle.expect("Starting SB load....", timeout=900 )
+        
+        time.sleep(sleep_init)
+
+        open("/home/admin/TestON/tests/scaleONOS7nodes/logs/scale7nodesrate2", 'w').close()
+        url1 = "http://10.128.10.1:8080/wm/onos/metrics"
+        url2 = "http://10.128.10.2:8080/wm/onos/metrics"
+        url3 = "http://10.128.10.3:8080/wm/onos/metrics"
+        url4 = "http://10.128.10.4:8080/wm/onos/metrics"
+        url5 = "http://10.128.10.5:8080/wm/onos/metrics"
+        url6 = "http://10.128.10.6:8080/wm/onos/metrics"
+        url7 = "http://10.128.10.7:8080/wm/onos/metrics"
+        f = open("/home/admin/TestON/tests/scaleONOS7nodes/logs/scale6nodesrate2", "a")
+        #time.sleep(10)
+        for i in range(int (loop)):
+            j1 = main.ONOS2.get_json(url1)
+            j2 = main.ONOS2.get_json(url2)
+            j3 = main.ONOS2.get_json(url3)
+            j4 = main.ONOS2.get_json(url4)
+            j5 = main.ONOS2.get_json(url5)
+            j6 = main.ONOS2.get_json(url6)
+            j7 = main.ONOS2.get_json(url7)
+            json_str = []
+            json_str.append(0)
+            json_str.append(j1)
+            json_str.append(j2)
+            json_str.append(j3)
+            json_str.append(j4)
+            json_str.append(j5)
+            json_str.append(j6)
+            json_str.append(j7)
+            if json_str[1] != "" and json_str[2] != "" and json_str[3] != "" and json_str[4] != "" and json_str[5] != "" and json_str[6] != "" and json_str[7] != "":
+                # write_str = str(json_str["meters"][4]["meter"][2])
+                #print str(json_str["meters"][4])
+                #f.write(str(json_str["meters"][4]))
+                #f.write('\n')
+                #time.sleep(3)
+                for j in range(1,8):
+                    f.write("ONOS" + str(j) + "\n")
+                    f.write(str(json_str[j]["meters"][4]['meter']['count']))
+                    f.write('\t')
+                    f.write(str(json_str[j]["meters"][4]['meter']['m1_rate']))
+                    f.write('\t')
+                    f.write(str(json_str[j]["meters"][4]['meter']['m5_rate']))
+                    f.write('\t')
+                    f.write(str(json_str[j]["meters"][4]['meter']['m15_rate']))
+                    f.write('\t')
+                    f.write(str(json_str[j]["meters"][4]['meter']['mean_rate']))
+                    f.write('\n')
+                
+                f.write('\n')
+                f.write('\n')
+                
+                f.write("--------------------------------------------------------------------------------- \n") 
+                time.sleep(sleep_t)
+        f.close() 
+        time.sleep(180)
+
+    def CASE73(self,main):
+        
+        main.case("Starting NB Throughput test after scaling up to 4 onos nodes")
+        ip1 = main.params['CTRL']['ip1']
+        ip2 = main.params['CTRL']['ip2']
+        ip3 = main.params['CTRL']['ip3']
+        ip4 = main.params['CTRL']['ip4']
+
+        import time
+        import json
+
+        main.Mininet4.handle.expect("\$")
+        #main.Mininet2.handle.sendline("sudo mn --custom topo-intentTPtest.py --topo mytopo --mac --arp")
+        #main.Mininet2.handle.expect("mininet>" , timeout=400)
+        main.Mininet4.handle.sendline("sudo ovs-vsctl set-controller s1 tcp:10.128.10.1:6633")
+        main.Mininet4.handle.sendline("sudo ovs-vsctl set-controller s2 tcp:10.128.10.2:6633")
+        main.Mininet4.handle.sendline("sudo ovs-vsctl set-controller s3 tcp:10.128.10.3:6633")
+        main.Mininet4.handle.sendline("sudo ovs-vsctl set-controller s4 tcp:10.128.10.4:6633")
+        main.Mininet4.handle.sendline("sudo ovs-vsctl set-controller s5 tcp:10.128.10.1:6633")
+        main.Mininet4.handle.sendline("sudo ovs-vsctl set-controller s6 tcp:10.128.10.2:6633")
+        main.Mininet4.handle.sendline("sudo ovs-vsctl set-controller s7 tcp:10.128.10.4:6633")
+
+        main.ONOS3.handle.sendline("cd ~admin/suibin-dev")
+        main.ONOS3.handle.expect("\$")
+
+        main.ONOS3.handle.sendline("./multiLoadgen_NB.py -u \"10.128.10.1:8080 10.128.10.2:8080 10.128.10.3:8080 10.128.10.4:8080  \" -i 4 -g 100 -a 1 -d 1 -p 0")
+        main.ONOS3.handle.expect("intent group is : 0", timeout=900)
+
+        
+        import json
+        
+        open("/home/admin/TestON/tests/scaleONOS7nodes/logs/NBscale7nodesrate1", 'w').close()
+        url1 = "http://10.128.10.1:8080/wm/onos/metrics"
+        url2 = "http://10.128.10.2:8080/wm/onos/metrics"
+        url3 = "http://10.128.10.3:8080/wm/onos/metrics"
+        url4 = "http://10.128.10.4:8080/wm/onos/metrics"
+        url5 = "http://10.128.10.5:8080/wm/onos/metrics"
+        url6 = "http://10.128.10.6:8080/wm/onos/metrics"
+        url7 = "http://10.128.10.7:8080/wm/onos/metrics"
+        f = open("/home/admin/TestON/tests/scaleONOS7nodes/logs/NBscale7nodesrate1", "a")
+        #time.sleep(10)
+        for i in range(8):
+            j1 = main.ONOS2.get_json(url1)
+            j2 = main.ONOS2.get_json(url2)
+            j3 = main.ONOS2.get_json(url3)
+            j4 = main.ONOS2.get_json(url4)
+            j5 = main.ONOS2.get_json(url5)
+            j6 = main.ONOS2.get_json(url6)
+            j7 = main.ONOS2.get_json(url7)
+            json_str = []
+            json_str.append(0)
+            json_str.append(j1)
+            json_str.append(j2)
+            json_str.append(j3)
+            json_str.append(j4)
+            json_str.append(j5)
+            json_str.append(j6)
+            json_str.append(j7)
+            if json_str[1] != "" and json_str[2] != "" and json_str[3] != "" and json_str[4] != "" and json_str[5] != "" and json_str[6] != "" and json_str[6] != "":
+                for j in range(1,8):
+                    f.write("*****************ONOS" + str(j) + " INCOMING RATE****************************" "\n")
+                    f.write(str(json_str[j]["meters"][0]['meter']['count']))
+                    f.write('\t')
+                    f.write(str(json_str[j]["meters"][0]['meter']['m1_rate']))
+                    f.write('\t')
+                    f.write(str(json_str[j]["meters"][0]['meter']['m5_rate']))
+                    f.write('\t')
+                    f.write(str(json_str[j]["meters"][0]['meter']['m15_rate']))
+                    f.write('\t')
+                    f.write(str(json_str[j]["meters"][0]['meter']['mean_rate']))
+                    f.write('\n')
+                
+                    f.write('\n')
+
+                    f.write("--------------------------------------------------------------------------------- \n") 
+                
+                    f.write("***************** ONOS" + str(j) + " PROCESSING RATE************************" + " \n ")
+                    f.write(str(json_str[j]["meters"][1]['meter']['count']))
+                    f.write('\t')
+                    f.write(str(json_str[j]["meters"][1]['meter']['m1_rate']))
+                    f.write('\t')
+                    f.write(str(json_str[j]["meters"][1]['meter']['m5_rate']))
+                    f.write('\t')
+                    f.write(str(json_str[j]["meters"][1]['meter']['m15_rate']))
+                    f.write('\t')
+                    f.write(str(json_str[j]["meters"][1]['meter']['mean_rate']))
+                    f.write('\n')
+                    f.write('\n')
+                    f.write('\n')
+
+                    f.write("--------------------------------------------------------------------------------- \n") 
+                    f.write("--------------------------------------------------------------------------------- \n \n") 
+                    time.sleep(10)
+        f.close()
+        
+
+        main.ONOS3.handle.expect("\$", timeout=900)
+
+    def CASE8(self,main):
+        import time
+        main.case("Scaling ONOS down to 6 ONOS instances")
+        main.ONOS7.stop_all()
+        time.sleep(5)
+        data = main.ONOS1.isup() and main.ONOS2.isup() and main.ONOS3.isup() and main.ONOS4.isup() and main.ONOS5.isup() and main.ONOS6.isup()
+        for i in range(3):
+            if data == main.FALSE: 
+                #main.log.report("Something is funny... restarting ONOS")
+                #main.ONOS1.stop()
+                time.sleep(3)
+                #main.ONOS1.start()
+                #time.sleep(5) 
+                data = main.ONOS1.isup() and main.ONOS2.isup() and main.ONOS3.isup() and main.ONOS4.isup() and main.ONOS5.isup() and main.ONOS6.isup()
+            else:
+                break
+        utilities.assert_equals(expect=main.TRUE,actual=data,onpass="ONOS is up and running!",onfail="ONOS didn't start...")
+    
+    def CASE9(self,main):
+
+        main.case("Scaling ONOS down to 5 ONOS instances")
+        main.ONOS6.stop_all()
+        time.sleep(5)
+        data = main.ONOS1.isup() and main.ONOS2.isup() and main.ONOS3.isup() and main.ONOS4.isup() and main.ONOS5.isup()
+        for i in range(3):
+            if data == main.FALSE: 
+                #main.log.report("Something is funny... restarting ONOS")
+                #main.ONOS1.stop()
+                time.sleep(3)
+                #main.ONOS1.start()
+                #time.sleep(5) 
+                data = main.ONOS1.isup() and main.ONOS2.isup() and main.ONOS3.isup() and main.ONOS4.isup() and main.ONOS5.isup()
+            else:
+                break
+        utilities.assert_equals(expect=main.TRUE,actual=data,onpass="ONOS is up and running!",onfail="ONOS didn't start...")
+
+    def CASE10(self,main):
+
+        main.case("Scaling ONOS down to 4 ONOS instances")
+        main.ONOS5.stop_all()
+        time.sleep(5)
+        data = main.ONOS1.isup() and main.ONOS2.isup() and main.ONOS3.isup() and main.ONOS4.isup()
+        for i in range(3):
+            if data == main.FALSE: 
+                #main.log.report("Something is funny... restarting ONOS")
+                #main.ONOS1.stop()
+                time.sleep(3)
+                #main.ONOS1.start()
+                #time.sleep(5) 
+                data = main.ONOS1.isup() and main.ONOS2.isup() and main.ONOS3.isup() and main.ONOS4.isup()
+            else:
+                break
+        utilities.assert_equals(expect=main.TRUE,actual=data,onpass="ONOS is up and running!",onfail="ONOS didn't start...")
+
+    def CASE11(self,main):
+
+        main.case("Scaling ONOS down to 3 ONOS instances")
+        main.ONOS4.stop_all()
+        time.sleep(5)
+        data = main.ONOS1.isup() and main.ONOS2.isup() and main.ONOS3.isup()
+        for i in range(3):
+            if data == main.FALSE: 
+                #main.log.report("Something is funny... restarting ONOS")
+                #main.ONOS1.stop()
+                time.sleep(3)
+                #main.ONOS1.start()
+                #time.sleep(5) 
+                data = main.ONOS1.isup() and main.ONOS2.isup() and main.ONOS3.isup()
+            else:
+                break
+        utilities.assert_equals(expect=main.TRUE,actual=data,onpass="ONOS is up and running!",onfail="ONOS didn't start...")
+
+    def CASE100(self,main):
+        import os
+        import time
+        global timestr
+        timestr = time.strftime("%Y%m%d-%H%M%S")
+        main.case("Scale-up tests complete...now making final changes")
+        main.log.info("moving logs....")
+        os.system("sudo mkdir ~admin/TestON/tests/scaleONOS7nodes/logs/ONOSscale_up" + timestr + "")
+        time.sleep(2)
+        os.system("sudo  cp ~admin/TestON/tests/scaleONOS7nodes/logs/*scale* ~admin/TestON/tests/scaleONOS7nodes/logs/ONOSscale_up" + timestr + "")
+        time.sleep(2)
+        os.system("sudo rm ~admin/TestON/tests/scaleONOS7nodes/logs/*")
+        time.sleep(2)
+
+    def CASE101(self,main):
+        
+        import os
+        import time
+        main.case("Scale-down tests complete...now making final changes")
+        global timestr
+        main.case("Scale-down tests complete...now making final changes")
+        main.log.info("moving logs....")
+        os.system("sudo mkdir ~admin/TestON/tests/scaleONOS7nodes/logs/ONOSscale_dwn" + timestr + "")
+        time.sleep(2)
+        os.system("sudo  cp ~admin/TestON/tests/scaleONOS7nodes/logs/*scale* ~admin/TestON/tests/scaleONOS7nodes/logs/ONOSscale_dwn" + timestr + "")
+        time.sleep(2)
+        os.system("sudo rm ~admin/TestON/tests/scaleONOS7nodes/logs/*")
+        time.sleep(2)
+
 
