diff --git a/TestON/drivers/common/cli/onosdriver.py b/TestON/drivers/common/cli/onosdriver.py
new file mode 100644
index 0000000..bfb65dc
--- /dev/null
+++ b/TestON/drivers/common/cli/onosdriver.py
@@ -0,0 +1,67 @@
+#!/usr/bin/env python
+'''
+TODO: Document
+'''
+
+
+import time
+import pexpect
+import re
+import traceback
+sys.path.append("../")
+from drivers.common.clidriver import CLI
+
+class OnosDriver(CLI):
+
+    def __init__(self):
+        super(CLI, self).__init__()
+
+    def connect(self,**connectargs):
+        '''
+        Creates ssh handle for ONOS "bench".
+        '''
+        try:
+            for key in connectargs:
+                vars(self)[key] = connectargs[key]
+            self.home = "~/ONOS"
+            for key in self.options:
+                if key == "home":
+                    self.home = self.options['home']
+                    break
+
+
+            self.name = self.options['name']
+            self.handle = super(OnosCliDriver,self).connect(user_name = self.user_name, ip_address = self.ip_address,port = self.port, pwd = self.pwd, home = self.home)
+
+            if self.handle:
+                return self.handle
+            else :
+                main.log.info("NO ONOS HANDLE")
+                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()
+        except:
+            main.log.info(self.name + ":::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::")
+            main.log.error( traceback.print_exc() )
+            main.log.info(":::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::")
+            main.cleanup()
+            main.exit()
+
+    def disconnect(self):
+        '''
+        Called when Test is complete to disconnect the ONOS handle.
+        '''
+        response = ''
+        try:
+            self.handle.sendline("exit")
+            self.handle.expect("closed")
+        except pexpect.EOF:
+            main.log.error(self.name + ": EOF exception found")
+            main.log.error(self.name + ":     " + self.handle.before)
+        except:
+            main.log.error(self.name + ": Connection failed to the host")
+            response = main.FALSE
+        return response
