Driver fixes, Device device discovery in Sanity, two case additions to Perf
diff --git a/TestON/drivers/common/cli/emulator/mininetclidriver.py b/TestON/drivers/common/cli/emulator/mininetclidriver.py
index 4e60f46..97c5db3 100644
--- a/TestON/drivers/common/cli/emulator/mininetclidriver.py
+++ b/TestON/drivers/common/cli/emulator/mininetclidriver.py
@@ -131,7 +131,7 @@
         *requires fping to be installed on machine running mininet 
         ''' 
         args = utilities.parse_args(["SRC","TARGET"],**pingParams)
-        command = args["SRC"] + " fping -i 100 -t 10 -C 1 -q "+args["TARGET"]
+        command = args["SRC"] + " fping -i 100 -t 20 -C 1 -q "+args["TARGET"]
         self.handle.sendline(command) 
         self.handle.expect(args["TARGET"]) 
         self.handle.expect("mininet")
@@ -139,7 +139,7 @@
         if re.search(":\s-" ,response):
             main.log.info("Ping fail") 
             return main.FALSE
-        elif re.search(":\s\d\.\d\d", response):
+        elif re.search(":\s\d{1,2}\.\d\d", response):
             main.log.info("Ping good!")
             return main.TRUE
         main.log.info("Install fping on mininet machine... ") 
@@ -150,7 +150,7 @@
         
         args = utilities.parse_args(["SRC","TARGET"],**pingParams)
         #command = args["SRC"] + " ping -" + args["CONTROLLER"] + " " +args ["TARGET"]
-        command = args["SRC"] + " ping "+args ["TARGET"]+" -c 2 -i .2"
+        command = args["SRC"] + " ping "+args ["TARGET"]+" -c 1 -i .2"
         response = self.execute(cmd=command,prompt="mininet",timeout=10 )
         if utilities.assert_matches(expect=',\s0\%\spacket\sloss',actual=response,onpass="No Packet loss",onfail="Host is not reachable"):
             main.log.info("NO PACKET LOSS, HOST IS REACHABLE")
@@ -276,12 +276,12 @@
         return main.TRUE
         
 
-    def yank(self, **yangargs):
+    def yank(self,**yankargs):
 	'''
-	yank out a mininet switch interfacet to host
+	yank a mininet switch interface to a host
 	'''
-	main.log.info('Yang out the switch interface attached to a host')
-	args = utilities.parse_args(["SW","INTF"])
+	main.log.info('Yank the switch interface attached to a host')
+	args = utilities.parse_args(["SW","INTF"],**yankargs)
 	sw = args["SW"] if args["SW"] !=None else ""
 	intf = args["INTF"] if args["INTF"] != None else ""
 	command = "py "+ str(sw) + '.detach("' + str(intf) + '")'
@@ -293,7 +293,7 @@
         plug the yanked mininet switch interface to a switch
         '''
         main.log.info('Plug the switch interface attached to a switch')
-        args = utilities.parse_args(["SW","INTF"])
+        args = utilities.parse_args(["SW","INTF"],**plugargs)
         sw = args["SW"] if args["SW"] !=None else ""
         intf = args["INTF"] if args["INTF"] != None else ""
         command = "py "+ str(sw) + '.attach("' + str(intf) + '")'
@@ -349,6 +349,8 @@
         port6 = args["PORT6"] if args["PORT6"] != None else ""
         port7 = args["PORT7"] if args["PORT7"] != None else ""
         port8 = args["PORT8"] if args["PORT8"] != None else ""
+        ptcpA = int(args["PORT1"])+int(sw) if args["PORT1"] != None else ""
+        ptcpB = "ptcp:"+str(ptcpA) if ip1 != "" else ""
         tcp1 = "tcp:"+str(ip1)+":"+str(port1) if ip1 != "" else ""
         tcp2 = "tcp:"+str(ip2)+":"+str(port2) if ip2 != "" else ""
         tcp3 = "tcp:"+str(ip3)+":"+str(port3) if ip3 != "" else ""
@@ -361,7 +363,7 @@
        # master2 = tcp2+" role master " if args["MASTER"] == 2 else ""
        # master3 = tcp3+" role master " if args["MASTER"] == 3 else ""
        # master4 = tcp4+" role master " if args["MASTER"] == 4 else ""
-        command = "sh ovs-vsctl set-controller "+str(sw)+" "+tcp1+" "+tcp2+" "+tcp3+" "+tcp4+" "+tcp5+" "+tcp6+" "+tcp7+" "+tcp8
+        command = "sh ovs-vsctl set-controller s"+str(sw)+" "+ptcpB+" "+tcp1+" "+tcp2+" "+tcp3+" "+tcp4+" "+tcp5+" "+tcp6+" "+tcp7+" "+tcp8
         self.execute(cmd=command,prompt="mininet>",timeout=5)
 
     def disconnect(self):
diff --git a/TestON/drivers/common/cli/emulator/remotemininetdriver.py b/TestON/drivers/common/cli/emulator/remotemininetdriver.py
index 5452dbe..5668182 100644
--- a/TestON/drivers/common/cli/emulator/remotemininetdriver.py
+++ b/TestON/drivers/common/cli/emulator/remotemininetdriver.py
@@ -72,7 +72,9 @@
         Starts a continuous ping on the mininet host outputing to a file in the /tmp dir. 
         '''
         args = utilities.parse_args(["SRC","TARGET"],**pingParams)
-        command = "mininet/util/m " + args["SRC"] + " ping "+args ["TARGET"]+" -i .1 -D -W 1 > /tmp/ping." + args["SRC"] + " &"
+        precmd = "rm /tmp/ping." + args["SRC"]
+        self.execute(cmd=precmd,prompt="(.*)",timeout=10)
+        command = "mininet/util/m " + args["SRC"] + " ping "+args ["TARGET"]+" -i 1 -W 1 > /tmp/ping." + args["SRC"] + " &"
         main.log.info( command ) 
         self.execute(cmd=command,prompt="(.*)",timeout=10)
         return main.TRUE
diff --git a/TestON/drivers/common/cli/onosclidriver.py b/TestON/drivers/common/cli/onosclidriver.py
index 41505f2..3b9e86b 100644
--- a/TestON/drivers/common/cli/onosclidriver.py
+++ b/TestON/drivers/common/cli/onosclidriver.py
@@ -59,14 +59,12 @@
         '''
         self.handle.sendline("")
         self.handle.expect("\$")
-        self.handle.sendline("cd ~/ONOS")
-        self.handle.expect("ONOS\$")
-        self.handle.sendline("./start-onos.sh start")
+        self.handle.sendline("~/ONOS/start-onos.sh start")
         self.handle.expect("onos.sh start")
         i=self.handle.expect(["Starting\sONOS\scontroller","Cassandra\sis\snot\srunning"])
         if i==0:
             try: 
-                self.handle.expect("ONOS\$", timeout=60)
+                self.handle.expect("\$", timeout=60)
                 main.log.info("ONOS Started ") 
             except:  
                 main.log.info("ONOS NOT Started, stuck while waiting for it to start ") 
@@ -111,8 +109,7 @@
         '''
         Starts the rest server on ONOS.
         '''
-        self.execute(cmd="cd ONOS",prompt="ONOS\$",timeout=10)
-        response = self.execute(cmd="start-rest.sh start",prompt="\$",timeout=10)
+        response = self.execute(cmd="~/ONOS/start-rest.sh start",prompt="\$",timeout=10)
         if re.search("admin",response):
             main.log.info("Rest Server Started Successfully")
             time.sleep(5)
@@ -190,12 +187,10 @@
         '''
         self.handle.sendline("")
         self.handle.expect("\$")
-        self.handle.sendline("cd ~/ONOS")
-        self.handle.expect("ONOS\$")
-        self.handle.sendline("./start-onos.sh stop")
+        self.handle.sendline("~/ONOS/start-onos.sh stop")
         self.handle.expect("stop", 2)
         result = self.handle.before 
-        self.handle.expect("ONOS\$", 60)
+        self.handle.expect("\$", 60)
         if re.search("Killed", result):
             main.log.info("ONOS Killed Successfully")
             return main.TRUE
@@ -507,7 +502,7 @@
         '''
         Used by CassndraCheck.py to scan ONOS logs for Exceptions
         '''
-        self.handle.sendline(r"dsh 'grep Exception ~/ONOS/onos-logs/onos.*.log'")
+        self.handle.sendline("dsh 'grep Exception ~/ONOS/onos-logs/onos.*.log'")
         self.handle.expect("\$ dsh") 
         self.handle.expect("\$")
         output = self.handle.before
@@ -527,7 +522,8 @@
         self.handle.sendline("cd ~/ONOS") 
         self.handle.expect("ONOS\$")
         self.handle.sendline("git pull")
-        
+       
+        uptodate = 0 
         i=self.handle.expect(['fatal','Username\sfor\s(.*):\s','Unpacking\sobjects',pexpect.TIMEOUT,'Already up-to-date','Aborting'],timeout=180)
         if i==0:
             main.log.error("Git pull had some issue...") 
@@ -553,12 +549,13 @@
             main.log.error("TIMEOUT")
             return main.FALSE
         elif i==4:
-            main.log.info("Already up to date") 
+            main.log.info("Already up to date")
+            uptodate = 1 
         elif i==5:
             main.log.info("Aborting... Are there conflicting git files?")
             return main.FALSE
         
-        
+        '''        
         main.log.info("./setup-local-maven.sh")
         self.handle.sendline("./setup-local-maven.sh")
         self.handle.expect("local-maven.sh")
@@ -575,36 +572,37 @@
             elif i == 3:
                 main.log.error("TIMEOUT!")
                 return main.FALSE
- 
-        main.log.info("mvn clean") 
-        self.handle.sendline("mvn clean")
-        while 1: 
-            i=self.handle.expect(['BUILD\sFAILURE','BUILD\sSUCCESS','ONOS\$',pexpect.TIMEOUT],timeout=30)
-            if i == 0:
-                main.log.error("Build failure!")
-                return main.FALSE
-            elif i == 1:
-                main.log.info("Build success!")
-            elif i == 2:
-                main.log.info("Build complete") 
-                break;
-            elif i == 3:
-                main.log.error("TIMEOUT!")
-                return main.FALSE
+        '''      
+        if uptodate == 0:
+            main.log.info("mvn clean") 
+            self.handle.sendline("mvn clean")
+            while 1: 
+                i=self.handle.expect(['BUILD\sFAILURE','BUILD\sSUCCESS','ONOS\$',pexpect.TIMEOUT],timeout=30)
+                if i == 0:
+                    main.log.error("Build failure!")
+                    return main.FALSE
+                elif i == 1:
+                    main.log.info("Build success!")
+                elif i == 2:
+                    main.log.info("Build complete") 
+                    break;
+                elif i == 3:
+                    main.log.error("TIMEOUT!")
+                    return main.FALSE
         
-        main.log.info("mvn compile") 
-        self.handle.sendline("mvn compile")
-        while 1: 
-            i=self.handle.expect(['BUILD\sFAILURE','BUILD\sSUCCESS','ONOS\$',pexpect.TIMEOUT],timeout=30)
-            if i == 0:
-                main.log.error("Build failure!")
-                return main.FALSE
-            elif i == 1:
-                main.log.info("Build success!")
-            elif i == 2:
-                main.log.info("Build complete") 
-                break;
-            elif i == 3:
-                main.log.error("TIMEOUT!")
-                return main.FALSE
+            main.log.info("mvn compile") 
+            self.handle.sendline("mvn compile")
+            while 1: 
+                i=self.handle.expect(['BUILD\sFAILURE','BUILD\sSUCCESS','ONOS\$',pexpect.TIMEOUT],timeout=30)
+                if i == 0:
+                    main.log.error("Build failure!")
+                    return main.FALSE
+                elif i == 1:
+                    main.log.info("Build success!")
+                elif i == 2:
+                    main.log.info("Build complete") 
+                    break;
+                elif i == 3:
+                    main.log.error("TIMEOUT!")
+                    return main.FALSE