Some changes for deldb
diff --git a/TestON/drivers/common/cli/onosclidriver.py b/TestON/drivers/common/cli/onosclidriver.py
index f5a70d4..fd9df50 100644
--- a/TestON/drivers/common/cli/onosclidriver.py
+++ b/TestON/drivers/common/cli/onosclidriver.py
@@ -1076,7 +1076,7 @@
                 else:
                     pass
                     #these should be the old logs
-            main.log.report(str(count) + "Exceptions were found on "+self.name)
+            main.log.report(str(count) + " Exceptions were found on "+self.name)
             return output
         except pexpect.TIMEOUT:
             main.log.error(self.name + ": Timeout exception found in check_exceptions function")
diff --git a/TestON/drivers/common/cli/ramcloudclidriver.py b/TestON/drivers/common/cli/ramcloudclidriver.py
index 52f8e7d..90e92bc 100644
--- a/TestON/drivers/common/cli/ramcloudclidriver.py
+++ b/TestON/drivers/common/cli/ramcloudclidriver.py
@@ -194,16 +194,16 @@
         self.handle.expect(["\$",pexpect.EOF,pexpect.TIMEOUT])
         self.handle.sendline("cd "+self.home)
         self.handle.sendline("./onos.sh rc deldb")
-        self.handle.expect(["[y/N]",pexpect.EOF,pexpect.TIMEOUT])
+        self.handle.expect(["\[y/N\]",pexpect.EOF,pexpect.TIMEOUT])
         self.handle.sendline("y")
         self.handle.expect(["\$",pexpect.EOF,pexpect.TIMEOUT])
         response = self.handle.before + self.handle.after
-        main.log.info(response)
-        if re.search("DONE",response):
+        if re.search("DONE",response) or re.search("Terminated",response):
             main.log.info("RAMCloud Database Cleaned")
             return main.TRUE
         else:
             main.log.warn("Something wrong in Cleaning Database")
+            main.log.warn(self.handle.before)
             return main.FALSE
            
 
diff --git a/TestON/drivers/common/clidriver.py_back b/TestON/drivers/common/clidriver.py_back
new file mode 100644
index 0000000..0406e48
--- /dev/null
+++ b/TestON/drivers/common/clidriver.py_back
@@ -0,0 +1,218 @@
+#!/usr/bin/env python
+'''
+Created on 24-Oct-2012
+    
+@authors: Anil Kumar (anilkumar.s@paxterrasolutions.com),
+          Raghav Kashyap(raghavkashyap@paxterrasolutions.com)
+
+
+    TestON is free software: you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 2 of the License, or
+    (at your option) any later version.
+
+    TestON is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with TestON.  If not, see <http://www.gnu.org/licenses/>.		
+
+
+          
+'''
+import pexpect
+import struct, fcntl, os, sys, signal
+import sys, re
+sys.path.append("../")
+
+from drivers.component import Component
+class CLI(Component):
+    '''
+        This will define common functions for CLI included.
+    '''
+    def __init__(self):
+        super(Component, self).__init__()
+        
+    def connect(self,**connectargs):
+        '''
+           Connection will establish to the remote host using ssh.
+           It will take user_name ,ip_address and password as arguments<br>
+           and will return the handle. 
+        '''
+        for key in connectargs:
+            vars(self)[key] = connectargs[key]
+
+        connect_result = super(CLI, self).connect()
+        ssh_newkey = 'Are you sure you want to continue connecting'
+        refused = "ssh: connect to host "+self.ip_address+" port 22: Connection refused"
+        if self.port:
+            self.handle =pexpect.spawn('ssh -p '+self.port+' '+self.user_name+'@'+self.ip_address,maxread=50000)
+        else :
+            self.handle =pexpect.spawn('ssh -X '+self.user_name+'@'+self.ip_address,maxread=50000)
+
+        self.handle.logfile = self.logfile_handler
+        i=self.handle.expect([ssh_newkey,'password:',pexpect.EOF,pexpect.TIMEOUT,refused,'>|#|$'],120)
+
+        if i==0:
+            main.log.info("ssh key confirmation received, send yes")
+            self.handle.sendline('yes')
+            i=self.handle.expect([ssh_newkey,'password:',pexpect.EOF])
+        if i==1:
+            main.log.info("ssh connection asked for password, gave password")
+            self.handle.sendline(self.pwd)
+            self.handle.expect('>|#|$')
+
+        elif i==2:
+            main.log.error("Connection timeout")
+            return main.FALSE
+        elif i==3: #timeout
+            main.log.error("No route to the Host "+self.user_name+"@"+self.ip_address)
+            return main.FALSE
+        elif i==4:
+            main.log.error("ssh: connect to host "+self.ip_address+" port 22: Connection refused")
+            return main.FALSE
+        elif i==5:
+            main.log.info("Password not required logged in")
+
+        self.handle.sendline("\r")
+        self.handle.expect('>|#|$', 2)
+        return self.handle
+
+    
+    def disconnect(self):
+        result = super(CLI, self).disconnect(self)
+        result = main.TRUE
+        #self.execute(cmd="exit",timeout=120,prompt="(.*)")
+    
+    
+    def execute(self, **execparams):
+        '''
+        It facilitates the command line execution of a given command. It has arguments as :
+        cmd => represents command to be executed,
+        prompt => represents expect command prompt or output,
+        timeout => timeout for command execution,
+        more => to provide a key press if it is on.
+
+        It will return output of command exection.
+        '''
+
+        result = super(CLI, self).execute(self)
+        defaultPrompt = '.*[$>\#]'
+        args = utilities.parse_args(["CMD", "TIMEOUT", "PROMPT", "MORE"], **execparams)
+        expectPrompt = args["PROMPT"] if args["PROMPT"] else defaultPrompt
+        self.LASTRSP = ""
+        timeoutVar = args["TIMEOUT"] if args["TIMEOUT"] else 10
+        cmd = ''
+        if args["CMD"]:
+            cmd = args["CMD"]
+        else :
+            return 0
+        if args["MORE"] == None:
+            args["MORE"] = " "
+        self.handle.sendline(cmd)
+        self.lastCommand = cmd
+        index = self.handle.expect([expectPrompt, "--More--", 'Command not found.', pexpect.TIMEOUT,"^:$"], timeout = timeoutVar)
+        if index == 0:
+            self.LASTRSP = self.LASTRSP + self.handle.before + self.handle.after
+            main.log.info("Executed :"+str(cmd)+" \t\t Expected Prompt '"+ str(expectPrompt)+"' Found")
+        elif index == 1:
+            self.LASTRSP = self.LASTRSP + self.handle.before
+            self.handle.send(args["MORE"])
+            main.log.info("Found More screen to go , Sending a key to proceed")
+            indexMore = self.handle.expect(["--More--", expectPrompt], timeout = timeoutVar)
+            while indexMore == 0:
+                main.log.info("Found anoother More screen to go , Sending a key to proceed")
+                self.handle.send(args["MORE"])
+                indexMore = self.handle.expect(["--More--", expectPrompt], timeout = timeoutVar)
+                self.LASTRSP = self.LASTRSP + self.handle.before
+        elif index ==2:
+            main.log.error("Command not found")
+            self.LASTRSP = self.LASTRSP + self.handle.before
+        elif index ==3:
+            main.log.error("Expected Prompt not found , Time Out!!") 
+            main.log.error( expectPrompt ) 
+            return "Expected Prompt not found , Time Out!!"
+        
+        elif index == 4:
+            self.LASTRSP = self.LASTRSP + self.handle.before
+            #self.handle.send(args["MORE"])
+            self.handle.sendcontrol("D")
+            main.log.info("Found More screen to go , Sending a key to proceed")
+            indexMore = self.handle.expect(["^:$", expectPrompt], timeout = timeoutVar)
+            while indexMore == 0:
+                main.log.info("Found anoother More screen to go , Sending a key to proceed")
+                self.handle.sendcontrol("D")
+                indexMore = self.handle.expect(["^:$", expectPrompt], timeout = timeoutVar)
+                self.LASTRSP = self.LASTRSP + self.handle.before
+        
+        main.last_response = self.remove_contol_chars(self.LASTRSP)
+        return self.LASTRSP
+    
+    def remove_contol_chars(self,response):
+        #RE_XML_ILLEGAL = '([\u0000-\u0008\u000b-\u000c\u000e-\u001f\ufffe-\uffff])|([%s-%s][^%s-%s])|([^%s-%s][%s-%s])|([%s-%s]$)|(^[%s-%s])'%(unichr(0xd800),unichr(0xdbff),unichr(0xdc00),unichr(0xdfff),unichr(0xd800),unichr(0xdbff),unichr(0xdc00),unichr(0xdfff),unichr(0xd800),unichr(0xdbff),unichr(0xdc00),unichr(0xdfff))  
+        #response = re.sub(RE_XML_ILLEGAL, "\n", response) 
+        response = re.sub(r"[\x01-\x1F\x7F]", "", response)
+        #response = re.sub(r"\[\d+\;1H", "\n", response)
+        response = re.sub(r"\[\d+\;\d+H", "", response)
+        return response
+        
+    def runAsSudoUser(self,handle,pwd,default):
+        
+        i = handle.expect([".ssword:*",default, pexpect.EOF])
+        if i==0:
+            handle.sendline(pwd)
+            handle.sendline("\r")
+
+        if i==1:
+            handle.expect(default)
+        
+        if i==2:
+            main.log.error("Unable to run as Sudo user")
+            
+        return handle
+        
+    def onfail(self):
+        if main.componentDictionary[self.name].has_key('onfail'):
+            commandList = main.componentDictionary[self.name]['onfail'].split(",")
+            for command in commandList :
+                response = self.execute(cmd=command,prompt="(.*)",timeout=120)
+
+    def secureCopy(self,user_name, ip_address,filepath, pwd,dst_path):
+        
+        #scp openflow@192.168.56.101:/home/openflow/sample /home/paxterra/Desktop/
+
+        '''
+           Connection will establish to the remote host using ssh.
+           It will take user_name ,ip_address and password as arguments<br>
+           and will return the handle. 
+        '''
+        ssh_newkey = 'Are you sure you want to continue connecting'
+        refused = "ssh: connect to host "+ip_address+" port 22: Connection refused"
+        self.handle =pexpect.spawn('scp '+user_name+'@'+ip_address+':'+filepath+' '+dst_path)
+        i=self.handle.expect([ssh_newkey,'password:',pexpect.EOF,pexpect.TIMEOUT,refused],120)
+        
+        if i==0:    
+            main.log.info("ssh key confirmation received, send yes")
+            self.handle.sendline('yes')
+            i=self.handle.expect([ssh_newkey,'password:',pexpect.EOF])
+        if i==1:
+            main.log.info("ssh connection asked for password, gave password")
+            self.handle.sendline(pwd)
+            #self.handle.expect(user_name)
+            
+        elif i==2:
+            main.log.error("Connection timeout")
+            pass
+        elif i==3: #timeout
+            main.log.error("No route to the Host "+user_name+"@"+ip_address)
+            return main.FALSE
+        elif i==4:
+            main.log.error("ssh: connect to host "+ip_address+" port 22: Connection refused")
+            return main.FALSE
+
+        self.handle.sendline("\r")
+        
+        return self.handle
+    
diff --git a/TestON/drivers/common/clidriver.py_new b/TestON/drivers/common/clidriver.py_new
new file mode 100644
index 0000000..9db8f6f
--- /dev/null
+++ b/TestON/drivers/common/clidriver.py_new
@@ -0,0 +1,218 @@
+#!/usr/bin/env python
+'''
+Created on 24-Oct-2012
+    
+@authors: Anil Kumar (anilkumar.s@paxterrasolutions.com),
+          Raghav Kashyap(raghavkashyap@paxterrasolutions.com)
+
+
+    TestON is free software: you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation, either version 2 of the License, or
+    (at your option) any later version.
+
+    TestON is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with TestON.  If not, see <http://www.gnu.org/licenses/>.		
+
+
+          
+'''
+import pexpect
+import struct, fcntl, os, sys, signal
+import sys, re
+sys.path.append("../")
+
+from drivers.component import Component
+class CLI(Component):
+    '''
+        This will define common functions for CLI included.
+    '''
+    def __init__(self):
+        super(Component, self).__init__()
+        
+    def connect(self,**connectargs):
+        '''
+           Connection will establish to the remote host using ssh.
+           It will take user_name ,ip_address and password as arguments<br>
+           and will return the handle. 
+        '''
+        for key in connectargs:
+            vars(self)[key] = connectargs[key]
+
+        connect_result = super(CLI, self).connect()
+        ssh_newkey = 'Are you sure you want to continue connecting'
+        refused = "ssh: connect to host "+self.ip_address+" port 22: Connection refused"
+        if self.port:
+            self.handle =pexpect.spawn('ssh -p '+self.port+' '+self.user_name+'@'+self.ip_address,maxread=50000)
+        else :
+            self.handle =pexpect.spawn('ssh -X '+self.user_name+'@'+self.ip_address,maxread=50000)
+
+        self.handle.logfile = self.logfile_handler
+        i=self.handle.expect([ssh_newkey,'password:',pexpect.EOF,pexpect.TIMEOUT,refused,'>|#|\$'],120)
+
+        if i==0:
+            main.log.info("ssh key confirmation received, send yes")
+            self.handle.sendline('yes')
+            i=self.handle.expect([ssh_newkey,'password:',pexpect.EOF])
+        if i==1:
+            main.log.info("ssh connection asked for password, gave password")
+            self.handle.sendline(self.pwd)
+            self.handle.expect('>|#|\$')
+
+        elif i==2:
+            main.log.error("Connection timeout")
+            return main.FALSE
+        elif i==3: #timeout
+            main.log.error("No route to the Host "+self.user_name+"@"+self.ip_address)
+            return main.FALSE
+        elif i==4:
+            main.log.error("ssh: connect to host "+self.ip_address+" port 22: Connection refused")
+            return main.FALSE
+        elif i==5:
+            main.log.info("Password not required logged in")
+
+        self.handle.sendline("\n")
+        self.handle.expect('>|#|\$', 2)
+        return self.handle
+
+    
+    def disconnect(self):
+        result = super(CLI, self).disconnect(self)
+        result = main.TRUE
+        #self.execute(cmd="exit",timeout=120,prompt="(.*)")
+    
+    
+    def execute(self, **execparams):
+        '''
+        It facilitates the command line execution of a given command. It has arguments as :
+        cmd => represents command to be executed,
+        prompt => represents expect command prompt or output,
+        timeout => timeout for command execution,
+        more => to provide a key press if it is on.
+
+        It will return output of command exection.
+        '''
+
+        result = super(CLI, self).execute(self)
+        defaultPrompt = '.*[\$>\#]'
+        args = utilities.parse_args(["CMD", "TIMEOUT", "PROMPT", "MORE"], **execparams)
+        expectPrompt = args["PROMPT"] if args["PROMPT"] else defaultPrompt
+        self.LASTRSP = ""
+        timeoutVar = args["TIMEOUT"] if args["TIMEOUT"] else 10
+        cmd = ''
+        if args["CMD"]:
+            cmd = args["CMD"]
+        else :
+            return 0
+        if args["MORE"] == None:
+            args["MORE"] = " "
+        self.handle.sendline(cmd)
+        self.lastCommand = cmd
+        index = self.handle.expect([expectPrompt, "--More--", 'Command not found.', pexpect.TIMEOUT,"^:$"], timeout = timeoutVar)
+        if index == 0:
+            self.LASTRSP = self.LASTRSP + self.handle.before + self.handle.after
+            main.log.info("Executed :"+str(cmd)+" \t\t Expected Prompt '"+ str(expectPrompt)+"' Found")
+        elif index == 1:
+            self.LASTRSP = self.LASTRSP + self.handle.before
+            self.handle.send(args["MORE"])
+            main.log.info("Found More screen to go , Sending a key to proceed")
+            indexMore = self.handle.expect(["--More--", expectPrompt], timeout = timeoutVar)
+            while indexMore == 0:
+                main.log.info("Found anoother More screen to go , Sending a key to proceed")
+                self.handle.send(args["MORE"])
+                indexMore = self.handle.expect(["--More--", expectPrompt], timeout = timeoutVar)
+                self.LASTRSP = self.LASTRSP + self.handle.before
+        elif index ==2:
+            main.log.error("Command not found")
+            self.LASTRSP = self.LASTRSP + self.handle.before
+        elif index ==3:
+            main.log.error("Expected Prompt not found , Time Out!!") 
+            main.log.error( expectPrompt ) 
+            return "Expected Prompt not found , Time Out!!"
+        
+        elif index == 4:
+            self.LASTRSP = self.LASTRSP + self.handle.before
+            #self.handle.send(args["MORE"])
+            self.handle.sendcontrol("D")
+            main.log.info("Found More screen to go , Sending a key to proceed")
+            indexMore = self.handle.expect(["^:$", expectPrompt], timeout = timeoutVar)
+            while indexMore == 0:
+                main.log.info("Found anoother More screen to go , Sending a key to proceed")
+                self.handle.sendcontrol("D")
+                indexMore = self.handle.expect(["^:$", expectPrompt], timeout = timeoutVar)
+                self.LASTRSP = self.LASTRSP + self.handle.before
+        
+        main.last_response = self.remove_contol_chars(self.LASTRSP)
+        return self.LASTRSP
+    
+    def remove_contol_chars(self,response):
+        #RE_XML_ILLEGAL = '([\u0000-\u0008\u000b-\u000c\u000e-\u001f\ufffe-\uffff])|([%s-%s][^%s-%s])|([^%s-%s][%s-%s])|([%s-%s]$)|(^[%s-%s])'%(unichr(0xd800),unichr(0xdbff),unichr(0xdc00),unichr(0xdfff),unichr(0xd800),unichr(0xdbff),unichr(0xdc00),unichr(0xdfff),unichr(0xd800),unichr(0xdbff),unichr(0xdc00),unichr(0xdfff))  
+        #response = re.sub(RE_XML_ILLEGAL, "\n", response) 
+        response = re.sub(r"[\x01-\x1F\x7F]", "", response)
+        #response = re.sub(r"\[\d+\;1H", "\n", response)
+        response = re.sub(r"\[\d+\;\d+H", "", response)
+        return response
+        
+    def runAsSudoUser(self,handle,pwd,default):
+        
+        i = handle.expect([".ssword:*",default, pexpect.EOF])
+        if i==0:
+            handle.sendline(pwd)
+            handle.sendline("\n")
+
+        if i==1:
+            handle.expect(default)
+        
+        if i==2:
+            main.log.error("Unable to run as Sudo user")
+            
+        return handle
+        
+    def onfail(self):
+        if main.componentDictionary[self.name].has_key('onfail'):
+            commandList = main.componentDictionary[self.name]['onfail'].split(",")
+            for command in commandList :
+                response = self.execute(cmd=command,prompt="(.*)",timeout=120)
+
+    def secureCopy(self,user_name, ip_address,filepath, pwd,dst_path):
+        
+        #scp openflow@192.168.56.101:/home/openflow/sample /home/paxterra/Desktop/
+
+        '''
+           Connection will establish to the remote host using ssh.
+           It will take user_name ,ip_address and password as arguments<br>
+           and will return the handle. 
+        '''
+        ssh_newkey = 'Are you sure you want to continue connecting'
+        refused = "ssh: connect to host "+ip_address+" port 22: Connection refused"
+        self.handle =pexpect.spawn('scp '+user_name+'@'+ip_address+':'+filepath+' '+dst_path)
+        i=self.handle.expect([ssh_newkey,'password:',pexpect.EOF,pexpect.TIMEOUT,refused],120)
+        
+        if i==0:    
+            main.log.info("ssh key confirmation received, send yes")
+            self.handle.sendline('yes')
+            i=self.handle.expect([ssh_newkey,'password:',pexpect.EOF])
+        if i==1:
+            main.log.info("ssh connection asked for password, gave password")
+            self.handle.sendline(pwd)
+            #self.handle.expect(user_name)
+            
+        elif i==2:
+            main.log.error("Connection timeout")
+            pass
+        elif i==3: #timeout
+            main.log.error("No route to the Host "+user_name+"@"+ip_address)
+            return main.FALSE
+        elif i==4:
+            main.log.error("ssh: connect to host "+ip_address+" port 22: Connection refused")
+            return main.FALSE
+
+        self.handle.sendline("\n")
+        
+        return self.handle
+    
diff --git a/TestON/tests/ONOSSanity4/ONOSSanity4.py b/TestON/tests/ONOSSanity4/ONOSSanity4.py
index df460c3..6bd2367 100644
--- a/TestON/tests/ONOSSanity4/ONOSSanity4.py
+++ b/TestON/tests/ONOSSanity4/ONOSSanity4.py
@@ -51,10 +51,19 @@
             main.ONOS4.git_compile()
         main.ONOS1.print_version()
         main.step("Start up ZK, RC, and ONOS")
+        main.Zookeeper1.start()
+        main.Zookeeper2.start()
+        main.Zookeeper3.start()
+        main.Zookeeper4.start()
+        main.RC1.del_db()
+        main.RC2.del_db()
+        main.RC3.del_db()
+        main.RC4.del_db()
         main.ONOS1.start_all()
         main.ONOS2.start_all()
         main.ONOS3.start_all()
         main.ONOS4.start_all()
+
         #main.step("Start Up Mininet")
         main.step("Start up Rest Server")
         main.ONOS1.start_rest()
@@ -140,8 +149,16 @@
         for i in range(25):
             if i<3:
                 main.Mininet1.assign_sw_controller(sw=str(i+1),ip1=main.params['CTRL']['ip1'],port1=main.params['CTRL']['port1'])
-
+            elif i<5:
+                main.Mininet1.assign_sw_controller(sw=str(i+1),ip1=main.params['CTRL']['ip2'],port1=main.params['CTRL']['port2'])
+            elif i<16:
+                main.Mininet1.assign_sw_controller(sw=str(i+1),ip1=main.params['CTRL']['ip3'],port1=main.params['CTRL']['port3'])
+            else:
+                main.Mininet1.assign_sw_controller(sw=str(i+1),ip1=main.params['CTRL']['ip4'],port1=main.params['CTRL']['port4'])
         main.step("Verify Master controllers of each switch")
+        for i in range(25):
+            if i<3:
+                
 #************************************************************************************************************************************
 
 
diff --git a/TestON/tests/RCOnosPerf4nodes/RCOnosPerf4nodes.py b/TestON/tests/RCOnosPerf4nodes/RCOnosPerf4nodes.py
index 0b73201..90fd3a8 100644
--- a/TestON/tests/RCOnosPerf4nodes/RCOnosPerf4nodes.py
+++ b/TestON/tests/RCOnosPerf4nodes/RCOnosPerf4nodes.py
@@ -12,6 +12,10 @@
         The test will only pass if ONOS is running properly, and has a full view of all topology elements.
         '''
         import time
+
+
+
+
         main.ONOS1.stop()
         main.ONOS2.stop()
         main.ONOS3.stop()
@@ -21,14 +25,21 @@
         main.RamCloud2.stop_serv()
         main.RamCloud3.stop_serv()
         main.RamCloud4.stop_serv()
-        main.ONOS1.handle.sendline("~/ONOS/onos.sh rc deldb")
-        main.ONOS1.handle.sendline("y")
-        main.ONOS2.handle.sendline("~/ONOS/onos.sh rc deldb")
-        main.ONOS2.handle.sendline("y")
-        main.ONOS3.handle.sendline("~/ONOS/onos.sh rc deldb")
-        main.ONOS3.handle.sendline("y")
-        main.ONOS4.handle.sendline("~/ONOS/onos.sh rc deldb")
-        main.ONOS4.handle.sendline("y")
+        main.Zookeeper1.stop()
+        main.Zookeeper2.stop()
+        main.Zookeeper3.stop()
+        main.Zookeeper4.stop()
+
+        main.Zookeeper1.start()
+        main.Zookeeper2.start()
+        main.Zookeeper3.start()
+        main.Zookeeper4.start()
+        main.RamCloud1.del_db()
+        main.RamCloud2.del_db()
+        main.RamCloud3.del_db()
+        main.RamCloud4.del_db()
+
+        
         time.sleep(10)
         main.RamCloud1.start_coor()
         main.RamCloud1.start_serv()
@@ -427,3 +438,19 @@
         result =  result & main.Mininet4.pingKill()
         utilities.assert_equals(expect=main.TRUE,actual=result)
 
+    def CASE66(self, main):
+        main.log.report("Checking ONOS logs for exceptions")
+        check1 = main.ONOS1.check_exceptions()
+        main.log.report("Exceptions in ONOS1 logs: \n" + check1)
+        check2 = main.ONOS2.check_exceptions()
+        main.log.report("Exceptions in ONOS2 logs: \n" + check2)
+        check3 = main.ONOS3.check_exceptions()
+        main.log.report("Exceptions in ONOS3 logs: \n" + check3)
+        check4 = main.ONOS4.check_exceptions()
+        main.log.report("Exceptions in ONOS4 logs: \n" + check4)
+        result = main.FALSE
+        if (check1 or check2 or check3 or check4):
+            result = main.TRUE
+        utilities.assert_equals(expect=main.TRUE,actual=result,onpass="No Exceptions found in the logs",onfail="Exceptions found")
+
+
diff --git a/TestON/tests/RCOnosSanity4nodesJ/RCOnosSanity4nodesJ.py b/TestON/tests/RCOnosSanity4nodesJ/RCOnosSanity4nodesJ.py
index a05c954..ce4dde8 100644
--- a/TestON/tests/RCOnosSanity4nodesJ/RCOnosSanity4nodesJ.py
+++ b/TestON/tests/RCOnosSanity4nodesJ/RCOnosSanity4nodesJ.py
@@ -590,11 +590,22 @@
             main.log.report("\tPING TEST FAIL")
         utilities.assert_equals(expect=main.TRUE,actual=result,onpass="NO PACKET LOSS, HOST IS REACHABLE",onfail="PACKET LOST, HOST IS NOT REACHABLE")
 
+
     def CASE66(self, main):
         main.log.report("Checking ONOS logs for exceptions")
-        main.log.report("Exceptions in ONOS1 logs: \n" + main.ONOS1.check_exceptions())
-        main.log.report("Exceptions in ONOS2 logs: \n" + main.ONOS2.check_exceptions())
-        main.log.report("Exceptions in ONOS3 logs: \n" + main.ONOS3.check_exceptions())
-        main.log.report("Exceptions in ONOS4 logs: \n" + main.ONOS4.check_exceptions())
-        utilities.assert_equals(expect=main.TRUE,actual=main.TRUE,onpass="Exception check pass",onfail="Exception check fail")
+        count = 0
+        check1 = main.ONOS1.check_exceptions()
+        main.log.report("Exceptions in ONOS1 logs: \n" + check1)
+        check2 = main.ONOS2.check_exceptions()
+        main.log.report("Exceptions in ONOS2 logs: \n" + check2)
+        check3 = main.ONOS3.check_exceptions()
+        main.log.report("Exceptions in ONOS3 logs: \n" + check3)
+        check4 = main.ONOS4.check_exceptions()
+        main.log.report("Exceptions in ONOS4 logs: \n" + check4)
+        result = main.FALSE
+        if (check1 or check2 or check3 or check4):
+            result = main.TRUE
+            count = len(check1.splitlines()) + len(check2.splitlines()) + len(check3.splitlines()) + len(check4.splitlines())
+        utilities.assert_equals(expect=main.TRUE,actual=result,onpass="No Exceptions found in the logs",onfail=str(count) + "Exceptions were found in the logs")
+
 
diff --git a/TestON/tests/RCOnosScale4nodes/RCOnosScale4nodes.params b/TestON/tests/RCOnosScale4nodes/RCOnosScale4nodes.params
index f04ef3a..04a4142 100644
--- a/TestON/tests/RCOnosScale4nodes/RCOnosScale4nodes.params
+++ b/TestON/tests/RCOnosScale4nodes/RCOnosScale4nodes.params
@@ -1,5 +1,5 @@
 <PARAMS>
-    <testcases>1,2,3,4</testcases>
+    <testcases>1,2,3,4,66</testcases>
     <Iterations>2</Iterations>
     <WaitTime>50</WaitTime>
     <TargetTime>50</TargetTime>
diff --git a/TestON/tests/RCOnosScale4nodes/RCOnosScale4nodes.py b/TestON/tests/RCOnosScale4nodes/RCOnosScale4nodes.py
index 07fd8ff..53bc154 100644
--- a/TestON/tests/RCOnosScale4nodes/RCOnosScale4nodes.py
+++ b/TestON/tests/RCOnosScale4nodes/RCOnosScale4nodes.py
@@ -21,15 +21,13 @@
         main.RamCloud2.stop_serv()
         main.RamCloud3.stop_serv()
         main.RamCloud4.stop_serv()
-        main.ONOS1.handle.sendline("~/ONOS/onos.sh rc deldb")
-        main.ONOS1.handle.sendline("y")
-        main.ONOS2.handle.sendline("~/ONOS/onos.sh rc deldb")
-        main.ONOS2.handle.sendline("y")
-        main.ONOS3.handle.sendline("~/ONOS/onos.sh rc deldb")
-        main.ONOS3.handle.sendline("y")
-        main.ONOS4.handle.sendline("~/ONOS/onos.sh rc deldb")
-        main.ONOS4.handle.sendline("y") 
+        time.sleep(4)
+        main.RamCloud1.del_db()
+        main.RamCloud2.del_db()
+        main.RamCloud3.del_db()
+        main.RamCloud4.del_db()
         time.sleep(10)
+        
         main.RamCloud1.start_coor()
         time.sleep(10)
         main.RamCloud1.start_serv()
@@ -275,3 +273,19 @@
  
         utilities.assert_equals(expect=main.TRUE,actual=test)
 
+      def CASE66(self, main):
+        main.log.report("Checking ONOS logs for exceptions")
+        check1 = main.ONOS1.check_exceptions()
+        main.log.report("Exceptions in ONOS1 logs: \n" + check1)
+        check2 = main.ONOS2.check_exceptions()
+        main.log.report("Exceptions in ONOS2 logs: \n" + check2)
+        check3 = main.ONOS3.check_exceptions()
+        main.log.report("Exceptions in ONOS3 logs: \n" + check3)
+        check4 = main.ONOS4.check_exceptions()
+        main.log.report("Exceptions in ONOS4 logs: \n" + check4)
+        result = main.FALSE
+        if (check1 or check2 or check3 or check4):
+            result = main.TRUE
+        utilities.assert_equals(expect=main.TRUE,actual=result,onpass="No Exceptions found in the logs",onfail="Exceptions found")
+
+ 
diff --git a/TestON/tests/RRCOnosSanity4nodesJ/RRCOnosSanity4nodesJ.params b/TestON/tests/RRCOnosSanity4nodesJ/RRCOnosSanity4nodesJ.params
index 3f0c13a..5471d4e 100644
--- a/TestON/tests/RRCOnosSanity4nodesJ/RRCOnosSanity4nodesJ.params
+++ b/TestON/tests/RRCOnosSanity4nodesJ/RRCOnosSanity4nodesJ.params
@@ -1,5 +1,5 @@
 <PARAMS>
-    <testcases>1,2,21,31,4,41,5,6,7,4,5,6,7</testcases>
+    <testcases>1,2,21,31,4,41,5,6,7,4,5,6,7,66</testcases>
     <FLOWDEF>~/flowdef_files/Center_Triangle/flowdef_20.txt</FLOWDEF>
     <CASE1>       
         <destination>h6</destination>
diff --git a/TestON/tests/RRCOnosSanity4nodesJ/RRCOnosSanity4nodesJ.py b/TestON/tests/RRCOnosSanity4nodesJ/RRCOnosSanity4nodesJ.py
index 8f64372..a5af4a4 100644
--- a/TestON/tests/RRCOnosSanity4nodesJ/RRCOnosSanity4nodesJ.py
+++ b/TestON/tests/RRCOnosSanity4nodesJ/RRCOnosSanity4nodesJ.py
@@ -28,14 +28,11 @@
         main.Zookeeper2.start()
         main.Zookeeper3.start()
         main.Zookeeper4.start()
-        main.ONOS1.handle.sendline("~/ONOS/onos.sh rc deldb")
-        main.ONOS1.handle.sendline("y")
-        main.ONOS2.handle.sendline("~/ONOS/onos.sh rc deldb")
-        main.ONOS2.handle.sendline("y")
-        main.ONOS3.handle.sendline("~/ONOS/onos.sh rc deldb")
-        main.ONOS3.handle.sendline("y")
-        main.ONOS4.handle.sendline("~/ONOS/onos.sh rc deldb")
-        main.ONOS4.handle.sendline("y")
+        time.sleep(3)
+        main.RamCloud1.del_db()
+        main.RamCloud2.del_db()
+        main.RamCloud3.del_db()
+        main.RamCloud4.del_db()
         for i in range(2):
             uptodate = main.ONOS1.git_pull()
             main.ONOS2.git_pull()
@@ -591,3 +588,20 @@
             main.log.report("\tPING TEST FAIL")
         utilities.assert_equals(expect=main.TRUE,actual=result,onpass="NO PACKET LOSS, HOST IS REACHABLE",onfail="PACKET LOST, HOST IS NOT REACHABLE")
 
+
+    def CASE66(self, main):
+        main.log.report("Checking ONOS logs for exceptions")
+        check1 = main.ONOS1.check_exceptions()
+        main.log.report("Exceptions in ONOS1 logs: \n" + check1)
+        check2 = main.ONOS2.check_exceptions()
+        main.log.report("Exceptions in ONOS2 logs: \n" + check2)
+        check3 = main.ONOS3.check_exceptions()
+        main.log.report("Exceptions in ONOS3 logs: \n" + check3)
+        check4 = main.ONOS4.check_exceptions()
+        main.log.report("Exceptions in ONOS4 logs: \n" + check4)
+        result = main.FALSE
+        if (check1 or check2 or check3 or check4):
+            result = main.TRUE
+        utilities.assert_equals(expect=main.TRUE,actual=result,onpass="No Exceptions found in the logs",onfail="Exceptions found")
+
+