Merge branch 'ONOS-Next' of https://github.com/OPENNETWORKINGLAB/ONLabTest into ONOS-Next
diff --git a/TestON/drivers/common/cli/emulator/mininetclidriver.py b/TestON/drivers/common/cli/emulator/mininetclidriver.py
index ad07d95..5f7d8a3 100644
--- a/TestON/drivers/common/cli/emulator/mininetclidriver.py
+++ b/TestON/drivers/common/cli/emulator/mininetclidriver.py
@@ -573,14 +573,20 @@
             result = re.match(pattern, line)
             if result:
                 version = result.group(0)
-        return version 
+        return version
 
-    def get_sw_controller_sanity(self, sw):
+    def get_sw_controller(self, sw):
+        '''
+        Parameters:
+            sw: The name of an OVS switch. Example "s1"
+        Return:
+            The output of the command from the mininet cli or main.FALSE on timeout
+        '''
         command = "sh ovs-vsctl get-controller "+str(sw)
         try:
-            response = self.execute(cmd=command,prompt="mininet>",timeout=10)
+            response = self.execute(cmd=command, prompt="mininet>", timeout=10)
             if response:
-                return main.TRUE
+                return response
             else:
                 return main.FALSE
         except pexpect.EOF:
@@ -588,26 +594,6 @@
             main.log.error(self.name + ":     " + self.handle.before)
             main.cleanup()
             main.exit()
-        else:
-            main.log.info(response)
-
-    def get_sw_controller(self,sw):
-        command = "sh ovs-vsctl get-controller "+str(sw)
-        try:
-            response = self.execute(cmd=command,prompt="mininet>",timeout=10)
-            print(response)
-            if response:
-                print("**********************")
-                return response
-            else:
-                return main.FALSE
-        except pexpect.EOF:  
-            main.log.error(self.name + ": EOF exception found")
-            main.log.error(self.name + ":     " + self.handle.before)
-            main.cleanup()
-            main.exit()
-        else:
-            main.log.info(response)
 
     def assign_sw_controller(self,**kwargs):
         '''
diff --git a/TestON/drivers/common/cli/onosclidriver.py b/TestON/drivers/common/cli/onosclidriver.py
index 90514d0..89edbda 100644
--- a/TestON/drivers/common/cli/onosclidriver.py
+++ b/TestON/drivers/common/cli/onosclidriver.py
@@ -518,14 +518,10 @@
                 if not grep_str:
                     self.handle.sendline("links")
                     self.handle.expect("onos>")
-                    self.handle.sendline("")
-                    self.handle.expect("onos>")
                 else:
                     self.handle.sendline("links | grep '"+
                         str(grep_str)+"'")
                     self.handle.expect("onos>")
-                    self.handle.sendline("")
-                    self.handle.expect("onos>")
                 handle = self.handle.before
                 #print "handle =",handle
                 return handle
diff --git a/TestON/drivers/common/cli/onosdriver.py b/TestON/drivers/common/cli/onosdriver.py
index 575de1c..1fb180a 100644
--- a/TestON/drivers/common/cli/onosdriver.py
+++ b/TestON/drivers/common/cli/onosdriver.py
@@ -1053,7 +1053,7 @@
         self.handle.sendline("cd ~/ONOS/tools/test/bin")
         self.handle.expect("/bin$")
         self.handle.sendline("./onos-topo-cfg")
-        self.handle.expect("{}admin@onosTestBench")
+        self.handle.expect("{}")
         self.handle.sendline("cd ~")
         self.handle.expect("\$")