Fix regular expression in connect to look for the $ character instead of the end of line anchor
diff --git a/TestON/drivers/common/cli/emulator/mininetclidriver.py b/TestON/drivers/common/cli/emulator/mininetclidriver.py
index f2d1f69..cfa0ecc 100644
--- a/TestON/drivers/common/cli/emulator/mininetclidriver.py
+++ b/TestON/drivers/common/cli/emulator/mininetclidriver.py
@@ -155,7 +155,7 @@
         '''
         args = utilities.parse_args(["SRC","TARGET"],**pingParams)
         #command = args["SRC"] + " ping -" + args["CONTROLLER"] + " " +args ["TARGET"]
-        command = args["SRC"] + " ping "+args ["TARGET"]+" -c 1 -i .2 -W 8"
+        command = args["SRC"] + " ping "+args ["TARGET"]+" -c 1 -i 1 -w 8"
         try:
             main.log.warn("Sending: " + command)
             #response = self.execute(cmd=command,prompt="mininet",timeout=10 )
@@ -433,7 +433,9 @@
         option = args["OPTION"] if args["OPTION"] != None else ""
         command = "link "+str(end1) + " " + str(end2)+ " " + str(option)
         try:
-            response = self.execute(cmd=command,prompt="mininet>",timeout=10)
+            #response = self.execute(cmd=command,prompt="mininet>",timeout=10)
+            self.handle.sendline(command)
+            self.handle.expect("mininet>")    
         except pexpect.EOF:  
             main.log.error(self.name + ": EOF exception found")
             main.log.error(self.name + ":     " + self.handle.before)
@@ -566,6 +568,7 @@
             try:
                 response = self.execute(cmd="exit",prompt="(.*)",timeout=120)
                 response = self.execute(cmd="exit",prompt="(.*)",timeout=120)
+                self.handle.sendline("sudo mn -c")
             except pexpect.EOF:  
                 main.log.error(self.name + ": EOF exception found")
                 main.log.error(self.name + ":     " + self.handle.before)
diff --git a/TestON/drivers/common/cli/onosclidriver.py b/TestON/drivers/common/cli/onosclidriver.py
index 87df2fe..66c6733 100644
--- a/TestON/drivers/common/cli/onosclidriver.py
+++ b/TestON/drivers/common/cli/onosclidriver.py
@@ -122,7 +122,18 @@
             main.log.info(":::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::")
             main.cleanup()
             main.exit()
- 
+
+    def start_all(self):
+        '''
+        starts ZK, RC, and ONOS
+        '''
+        self.handle.sendline("cd "+self.home)
+        self.handle.sendline("./onos.sh start")
+        self.handle.expect("./onos.sh start")
+        self.handle.expect(["\$",pexpect.TIMEOUT])
+
+
+
     def start_rest(self):
         '''
         Starts the rest server on ONOS.
@@ -196,23 +207,25 @@
             self.execute(cmd="\n",prompt="\$",timeout=10)
             tail2 = self.execute(cmd="tail " + self.home + "/onos-logs/onos.*.log",prompt="\$",timeout=10)
             pattern = '(.*)1 instance(.*)'
+            patternUp = 'Sending LLDP out'
             pattern2 = '(.*)Exception: Connection refused(.*)'
            # if utilities.assert_matches(expect=pattern,actual=response,onpass="ONOS process is running...",onfail="ONOS process not running..."):
             
             if re.search(pattern, response):
-                main.log.info(self.name + ": ONOS process is running...")
-                if tail1 == tail2:
-                    main.log.error(self.name + ": ONOS is frozen...")#logs aren't moving
-                    return main.FALSE
-                elif re.search( pattern2,tail1 ):
-                    main.log.info(self.name + ": Connection Refused found in onos log")
-                    return main.FALSE
-                elif re.search( pattern2,tail2 ):
-                    main.log.info(self.name + ": Connection Refused found in onos log")
-                    return main.FALSE
-                else:
-                    main.log.info(self.name + ": Onos log is moving! It's looking good!")
-                    return main.TRUE
+                if re.search(patternUp,tail2):
+                    main.log.info(self.name + ": ONOS process is running...")
+                    if tail1 == tail2:
+                        main.log.error(self.name + ": ONOS is frozen...")#logs aren't moving
+                        return main.FALSE
+                    elif re.search( pattern2,tail1 ):
+                        main.log.info(self.name + ": Connection Refused found in onos log")
+                        return main.FALSE
+                    elif re.search( pattern2,tail2 ):
+                        main.log.info(self.name + ": Connection Refused found in onos log")
+                        return main.FALSE
+                    else:
+                        main.log.info(self.name + ": Onos log is moving! It's looking good!")
+                        return main.TRUE
             else:
                 main.log.error(self.name + ": ONOS process not running...")
                 return main.FALSE
@@ -805,8 +818,8 @@
 
         '''
         try:
-            main.log.info(self.name + ": Stopping ONOS")
-            self.stop()
+            # main.log.info(self.name + ": Stopping ONOS")
+            #self.stop()
             self.handle.sendline("cd " + self.home)
             self.handle.expect("ONOS\$")
             if comp1=="":
diff --git a/TestON/drivers/common/cli/zookeeperclidriver.py b/TestON/drivers/common/cli/zookeeperclidriver.py
index 752df44..242e07b 100644
--- a/TestON/drivers/common/cli/zookeeperclidriver.py
+++ b/TestON/drivers/common/cli/zookeeperclidriver.py
@@ -135,7 +135,7 @@
         Calls the zookeeper status and returns TRUE if it has an assigned Mode to it. 
         '''
         self.execute(cmd="\n",prompt="\$",timeout=10)
-        response = self.execute(cmd=self.home + "/bin/zkServer.sh status ",prompt="Mode",timeout=10)
+        response = self.execute(cmd=self.home + "/onos.sh zk status ",prompt="Mode",timeout=10)
         pattern = '(.*)Mode(.*)'
         if re.search(pattern, response): 
 	    main.log.info(self.name + ": Zookeeper is up.") 
diff --git a/TestON/drivers/common/clidriver.py b/TestON/drivers/common/clidriver.py
index 0406e48..9db8f6f 100644
--- a/TestON/drivers/common/clidriver.py
+++ b/TestON/drivers/common/clidriver.py
@@ -53,7 +53,7 @@
             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)
+        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")
@@ -62,7 +62,7 @@
         if i==1:
             main.log.info("ssh connection asked for password, gave password")
             self.handle.sendline(self.pwd)
-            self.handle.expect('>|#|$')
+            self.handle.expect('>|#|\$')
 
         elif i==2:
             main.log.error("Connection timeout")
@@ -76,8 +76,8 @@
         elif i==5:
             main.log.info("Password not required logged in")
 
-        self.handle.sendline("\r")
-        self.handle.expect('>|#|$', 2)
+        self.handle.sendline("\n")
+        self.handle.expect('>|#|\$', 2)
         return self.handle
 
     
@@ -99,7 +99,7 @@
         '''
 
         result = super(CLI, self).execute(self)
-        defaultPrompt = '.*[$>\#]'
+        defaultPrompt = '.*[\$>\#]'
         args = utilities.parse_args(["CMD", "TIMEOUT", "PROMPT", "MORE"], **execparams)
         expectPrompt = args["PROMPT"] if args["PROMPT"] else defaultPrompt
         self.LASTRSP = ""
@@ -163,7 +163,7 @@
         i = handle.expect([".ssword:*",default, pexpect.EOF])
         if i==0:
             handle.sendline(pwd)
-            handle.sendline("\r")
+            handle.sendline("\n")
 
         if i==1:
             handle.expect(default)
@@ -212,7 +212,7 @@
             main.log.error("ssh: connect to host "+ip_address+" port 22: Connection refused")
             return main.FALSE
 
-        self.handle.sendline("\r")
+        self.handle.sendline("\n")
         
         return self.handle
     
diff --git a/TestON/tests/RCOnosPerf4nodes/RCOnosPerf4nodes.py b/TestON/tests/RCOnosPerf4nodes/RCOnosPerf4nodes.py
index bd0763d..11ea4f6 100644
--- a/TestON/tests/RCOnosPerf4nodes/RCOnosPerf4nodes.py
+++ b/TestON/tests/RCOnosPerf4nodes/RCOnosPerf4nodes.py
@@ -21,8 +21,6 @@
         main.RamCloud2.start_serv()
         main.RamCloud3.start_serv()
         main.RamCloud4.start_serv()
-        time.sleep(20)
-        main.ONOS1.drop_keyspace()
         main.ONOS1.start()
         time.sleep(10)
         main.ONOS2.start()
@@ -40,7 +38,7 @@
         data =  main.Zookeeper1.isup()
         utilities.assert_equals(expect=main.TRUE,actual=data,onpass="Zookeeper is up!",onfail="Zookeeper is down...")
         main.step("Testing startup RamCloud")
-        data =  main.RamCloud1.isup()
+        data =  main.RamCloud1.server_status()
         if data == main.FALSE:
             main.RamCloud1.stop_coor()
             main.RamCloud1.stop_serv()
@@ -157,10 +155,12 @@
         main.case("Taking care of these flows!") 
         main.step("Cleaning out any leftover flows...")
         main.log.info("deleting...")
-        main.ONOS1.delete_flow("all")
+        main.ONOS1.rm_flow()
+       # main.ONOS1.delete_flow("all")
         main.log.info("adding...")
         t1 = time.time()
-        main.ONOS1.add_flow(main.params['FLOWDEF'])   
+        main.ONOS1.ad_flow()
+       # main.ONOS1.add_flow(main.params['FLOWDEF'])   
         main.log.info("Checking...")
         for i in range(15):
             result = main.ONOS1.check_flow()
diff --git a/TestON/tests/RCOnosSanity4nodesJ/RCOnosSanity4nodesJ.params b/TestON/tests/RCOnosSanity4nodesJ/RCOnosSanity4nodesJ.params
index 8730ce6..29ffc61 100644
--- a/TestON/tests/RCOnosSanity4nodesJ/RCOnosSanity4nodesJ.params
+++ b/TestON/tests/RCOnosSanity4nodesJ/RCOnosSanity4nodesJ.params
@@ -1,5 +1,5 @@
 <PARAMS>
-    <testcases>1,2,3,31,41,4,5,6,7</testcases>
+    <testcases>1,2,21,3,31,4,41,5,6,7,3,4,5,6,7</testcases>
     <FLOWDEF>~/flowdef_files/Center_Triangle/flowdef_20.txt</FLOWDEF>
     <CASE1>       
         <destination>h6</destination>
@@ -44,6 +44,6 @@
 	<restIP1>10.128.4.151</restIP1>
 	<restIP2>10.128.4.152</restIP2>
 	<restPort>8080</restPort>
-	<restURL>/wm/onos/ng/switches/json</restURL>
+	<restURL>/wm/onos/topology/switches/json</restURL>
     </RESTCALL>
 </PARAMS>      
diff --git a/TestON/tests/RCOnosSanity4nodesJ/RCOnosSanity4nodesJ.py b/TestON/tests/RCOnosSanity4nodesJ/RCOnosSanity4nodesJ.py
index 09be2db..1480e76 100644
--- a/TestON/tests/RCOnosSanity4nodesJ/RCOnosSanity4nodesJ.py
+++ b/TestON/tests/RCOnosSanity4nodesJ/RCOnosSanity4nodesJ.py
@@ -9,8 +9,23 @@
 #Tests the startup of Zookeeper1, RamCloud1, and ONOS1 to be certain that all started up successfully
     def CASE1(self,main) :  #Check to be sure ZK, Cass, and ONOS are up, then get ONOS version
         import time
+        main.ONOS1.handle.sendline("cp ~/onos.properties.proactive ~/ONOS/conf/onos.properties")
+        main.ONOS2.handle.sendline("cp ~/onos.properties.proactive ~/ONOS/conf/onos.properties")
+        main.ONOS3.handle.sendline("cp ~/onos.properties.proactive ~/ONOS/conf/onos.properties")
+        main.ONOS4.handle.sendline("cp ~/onos.properties.proactive ~/ONOS/conf/onos.properties")
+        
         main.Zookeeper1.start()
-        time.sleep(20)
+        main.Zookeeper2.start()
+        main.Zookeeper3.start()
+        main.Zookeeper4.start()
+        main.RamCloud1.stop_coor()
+        main.RamCloud1.stop_serv()
+        main.RamCloud2.stop_serv()
+        main.RamCloud3.stop_serv()
+        main.RamCloud4.stop_serv()
+
+        
+        main.Zookeeper1.start()
         main.Zookeeper2.start()
         main.Zookeeper3.start()
         main.Zookeeper4.start()
@@ -28,7 +43,8 @@
                 main.ONOS2.git_pull("ONOS1 master")
                 main.ONOS3.git_pull("ONOS1 master")
                 main.ONOS4.git_pull("ONOS1 master")
-        if uptodate==0:
+       #if uptodate==0
+        if 1:
             main.ONOS1.git_compile()
             main.ONOS2.git_compile()
             main.ONOS3.git_compile()
@@ -43,19 +59,18 @@
        # main.ONOS3.get_version()
        # main.ONOS4.get_version()
         main.RamCloud1.start_coor()
-        time.sleep(20)
+        time.sleep(1)
         main.RamCloud1.start_serv()
         main.RamCloud2.start_serv()
         main.RamCloud3.start_serv()
         main.RamCloud4.start_serv()
-        time.sleep(20)
         main.ONOS1.start()
-        time.sleep(20)
+        time.sleep(5)
         main.ONOS2.start()
         main.ONOS3.start()
         main.ONOS4.start()
         main.ONOS1.start_rest()
-        time.sleep(5)
+        time.sleep(10)
         test= main.ONOS1.rest_status()
         if test == main.FALSE:
             main.ONOS1.start_rest()
@@ -66,7 +81,7 @@
         data =  main.Zookeeper1.isup()
         utilities.assert_equals(expect=main.TRUE,actual=data,onpass="Zookeeper is up!",onfail="Zookeeper is down...")
         main.step("Testing startup RamCloud")   
-        data =  main.RamCloud1.status() 
+        data =  main.RamCloud1.status_serv() 
         if data == main.FALSE:
             main.RamCloud1.stop_coor()
             main.RamCloud1.stop_serv()
@@ -143,10 +158,12 @@
         main.step("Cleaning out any leftover flows...")
         #main.ONOS1.delete_flow("all")
         strtTime = time.time()
-        print("hello")
         main.ONOS1.rm_flow()
         print("world")
         main.ONOS1.ad_flow()
+        time.sleep(2)
+        main.ONOS1.ad_flow()
+        print("hello")
        # main.ONOS1.add_flow(main.params['FLOWDEF']['testONip'],main.params['FLOWDEF']['user'],main.params['FLOWDEF']['password'],main.params['FLOWDEF']['flowDef'])
         main.case("Checking flows")
        
@@ -370,7 +387,7 @@
         main.case("Bringing Link up... ")
         result = main.Mininet1.link(END1=main.params['LINK']['begin'],END2=main.params['LINK']['end'],OPTION="up")
         utilities.assert_equals(expect=main.TRUE,actual=result,onpass="Link UP!",onfail="Link not brought up...")
-      
+        time.sleep(5) 
         strtTime = time.time() 
         result = main.ONOS1.check_status_report(main.params['RestIP'],main.params['NR_Switches'],main.params['NR_Links'])
         for i in range(2):
diff --git a/TestON/tests/RCOnosScale4nodes/RCOnosScale4nodes.params b/TestON/tests/RCOnosScale4nodes/RCOnosScale4nodes.params
index dd4e311..f04ef3a 100644
--- a/TestON/tests/RCOnosScale4nodes/RCOnosScale4nodes.params
+++ b/TestON/tests/RCOnosScale4nodes/RCOnosScale4nodes.params
@@ -3,7 +3,7 @@
     <Iterations>2</Iterations>
     <WaitTime>50</WaitTime>
     <TargetTime>50</TargetTime>
-    <RestIP>10.128.100.1</RestIP>
+    <RestIP>10.128.4.151</RestIP>
     <NR_Switches>100</NR_Switches>
     <NR_Links>198</NR_Links>
 </PARAMS>