diff --git a/TestON/drivers/common/cli/onosclidriver.py b/TestON/drivers/common/cli/onosclidriver.py
index 8df4dce..253ee0e 100644
--- a/TestON/drivers/common/cli/onosclidriver.py
+++ b/TestON/drivers/common/cli/onosclidriver.py
@@ -570,6 +570,76 @@
             main.cleanup()
             main.exit()
 
+    def add_host_intent(self, host_id_one, host_id_two):
+        '''
+        Required:
+            * host_id_one: ONOS host id for host1
+            * host_id_two: ONOS host id for host2
+        Description:
+            Adds a host-to-host intent (bidrectional) by
+            specifying the two hosts. 
+        '''
+        try:
+            self.handle.sendline("")
+            self.handle.expect("onos>")
+            
+            self.handle.sendline("add-host-intent "+
+                    str(host_id_one) + " " + str(host_id_two))
+            self.handle.expect("onos>")
+
+            self.handle.sendline("")
+            self.handle.expect("onos>")
+
+            handle = self.handle.before
+
+            main.log.info("Intent installed between "+
+                    str(host_id_one) + " and " + str(host_id_two))
+
+            return handle
+        
+        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(self.name+" ::::::")
+            main.cleanup()
+            main.exit()
+
+    def intents(self):
+        '''
+        Description:
+            Obtain intents currently installed 
+        '''
+        try:
+            self.handle.sendline("")
+            self.handle.expect("onos>")
+
+            self.handle.sendline("intents")
+            self.handle.expect("onos>")
+
+            self.handle.sendline("")
+            self.handle.expect("onos>")
+
+            handle = self.handle.before
+
+            return handle
+
+        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(self.name+" ::::::")
+            main.cleanup()
+            main.exit()
+
     #Wrapper functions ****************
     #Wrapper functions use existing driver
     #functions and extends their use case.
diff --git a/TestON/tests/ONOSNextTest/ONOSNextTest.py b/TestON/tests/ONOSNextTest/ONOSNextTest.py
index 0e7a707..b8b75b4 100755
--- a/TestON/tests/ONOSNextTest/ONOSNextTest.py
+++ b/TestON/tests/ONOSNextTest/ONOSNextTest.py
@@ -22,7 +22,8 @@
         onos-install -f
         onos-wait-for-start
         '''
-        
+        import time
+
         cell_name = main.params['ENV']['cellName']
         ONOS1_ip = main.params['CTRL']['ip1']
         ONOS1_port = main.params['CTRL']['port1']
@@ -33,20 +34,21 @@
         #params: (bench ip, cell name, mininet ip, *onos ips)
         cell_file_result = main.ONOSbench.create_cell_file(
                 "10.128.20.10", "temp_cell_2", "10.128.10.90",
-                "10.128.10.11", "10.128.10.12", "10.128.10.13")
+                "onos-core-trivial,onos-app-fwd",
+                "10.128.20.11")
 
         main.step("Applying cell variable to environment")
-        cell_result = main.ONOSbench.set_cell(cell_name)
+        #cell_result = main.ONOSbench.set_cell(cell_name)
+        cell_result = main.ONOSbench.set_cell("temp_cell_2")
         verify_result = main.ONOSbench.verify_cell()
         
         main.step("Git checkout and pull master")
-        main.ONOSbench.git_checkout("master")
-        git_pull_result = main.ONOSbench.git_pull()
-
-
+        #main.ONOSbench.git_checkout("master")
+        #git_pull_result = main.ONOSbench.git_pull()
+        
         main.step("Using mvn clean & install")
-        clean_install_result = main.ONOSbench.clean_install()
-        #clean_install_result = main.TRUE
+        #clean_install_result = main.ONOSbench.clean_install()
+        clean_install_result = main.TRUE
 
         main.step("Creating ONOS package")
         package_result = main.ONOSbench.onos_package()
@@ -65,6 +67,8 @@
                 onpass="Test startup successful",
                 onfail="Test startup NOT successful")
 
+        time.sleep(10)
+
     def CASE11(self, main):
         '''
         Cleanup sequence:
@@ -160,7 +164,8 @@
         ONOS cli driver functions can be used for.
         '''
         import time
-        
+        import json
+
         cell_name = main.params['ENV']['cellName']
         ONOS1_ip = main.params['CTRL']['ip1']
         
@@ -176,8 +181,8 @@
         topology_obj = main.ONOScli.topology()
 
         main.step("issue various feature:install <str> commands")
-        main.ONOScli.feature_install("onos-app-fwd")
-        main.ONOScli.feature_install("onos-rest")
+        #main.ONOScli.feature_install("onos-app-fwd")
+        #main.ONOScli.feature_install("onos-rest")
 
         main.step("Add a bad node")
         node_result = main.ONOScli.add_node("111", "10.128.20.")
@@ -220,9 +225,54 @@
         if device_role_result == main.TRUE:
             main.log.report("Device role successfully set")
 
+        main.step("Revert device role to master")
+        device_role = main.ONOScli.device_role(
+                devices_id_list[0], node_id_list[0], "master")
+
         main.step("Check devices / role again")
         dev_result = main.ONOScli.devices()
         main.log.info(dev_result)
+       
+        #Sample steps to push intents ***********
+        # * Obtain host id in ONOS format 
+        # * Push intents
+        main.step("Get list of hosts from Mininet")
+        host_list = main.Mininet2.get_hosts()
+        main.log.info(host_list)
+
+        main.step("Get host list in ONOS format")
+        host_onos_list = main.ONOScli.get_hosts_id(host_list)
+        main.log.info(host_onos_list)
+
+        main.step("Ensure that reactive forwarding is installed")
+        feature_result = main.ONOScli.feature_install("onos-app-fwd")
+
+        time.sleep(5)
+
+        main.Mininet2.handle.sendline("\r")
+        main.Mininet2.handle.sendline("h4 ping h5 -c 1")
+
+        time.sleep(5)
+
+        main.step("Get hosts")
+        main.ONOScli.handle.sendline("hosts")
+        main.ONOScli.handle.expect("onos>")
+        hosts = main.ONOScli.handle.before
+        main.log.info(hosts)
+
+        main.step("Install host-to-host-intents between h4 and h5")
+        intent_install = main.ONOScli.add_host_intent(
+                host_onos_list[3], host_onos_list[4])
+        main.log.info(intent_install)
+
+        main.step("Uninstall reactive forwarding to test host-to-host intent")
+        main.ONOScli.feature_uninstall("onos-app-fwd")
+
+        main.step("Get intents installed on ONOS")
+        get_intent_result = main.ONOScli.intents()
+        main.log.info(get_intent_result)
+        #****************************************
+
 
 ######
 #jhall@onlab.us
diff --git a/TestON/tests/ONOSNextTest/ONOSNextTest.topo b/TestON/tests/ONOSNextTest/ONOSNextTest.topo
index a5f544a..118e57c 100755
--- a/TestON/tests/ONOSNextTest/ONOSNextTest.topo
+++ b/TestON/tests/ONOSNextTest/ONOSNextTest.topo
@@ -22,7 +22,7 @@
         <ONOS1>
             <host>10.128.20.11</host>
             <user>sdn</user>
-            <password>sdn</password>
+            <password>rocks</password>
             <type>OnosDriver</type>
             <connect_order>3</connect_order>
             <COMPONENTS> </COMPONENTS>
diff --git a/TestON/tests/TopoPerfNext/TopoPerfNext.params b/TestON/tests/TopoPerfNext/TopoPerfNext.params
index 25ae644..d8d8b37 100644
--- a/TestON/tests/TopoPerfNext/TopoPerfNext.params
+++ b/TestON/tests/TopoPerfNext/TopoPerfNext.params
@@ -12,6 +12,7 @@
     </GIT>
 
     <CTRL>
+        <user>sdn</user>
         <ip1>10.128.20.11</ip1>
         <port1>6633</port1>
         <ip2>10.128.20.12</ip2>
diff --git a/TestON/tests/TopoPerfNext/TopoPerfNext.py b/TestON/tests/TopoPerfNext/TopoPerfNext.py
index ce71272..2fe521b 100644
--- a/TestON/tests/TopoPerfNext/TopoPerfNext.py
+++ b/TestON/tests/TopoPerfNext/TopoPerfNext.py
@@ -32,7 +32,7 @@
 
         main.step("Creating cell file")
         cell_file_result = main.ONOSbench.create_cell_file(
-                BENCH_ip, cell_name, MN1_ip,
+                BENCH_ip, cell_name, MN1_ip, "onos-core",
                 ONOS1_ip, ONOS2_ip, ONOS3_ip)
 
         main.step("Applying cell file to environment")
@@ -74,10 +74,16 @@
         Assign s1 to ONOS1 and measure latency
         '''
         import time
+        import subprocess
+        import json
+        import requests
+        import os
 
         ONOS1_ip = main.params['CTRL']['ip1']
         ONOS2_ip = main.params['CTRL']['ip2']
         ONOS3_ip = main.params['CTRL']['ip3']
+        ONOS_user = main.params['CTRL']['user']
+
         default_sw_port = main.params['CTRL']['port1']
        
         #Number of iterations of case
@@ -90,7 +96,10 @@
         #String to grep in tshark output
         tshark_tcp_string = "TCP 74 "+default_sw_port
         tshark_of_string = "OFP 86 Vendor"
-       
+     
+        #Initialize assertion to TRUE
+        assertion = main.TRUE
+        
         main.log.report("Latency of adding one switch")
 
         for i in range(0, int(num_iter)):
@@ -122,14 +131,83 @@
     
             main.ONOS1.stop_tshark()
 
+            #tshark output is saved in ONOS. Use subprocess
+            #to copy over files to TestON for parsing
+            main.log.info("Copying over tshark files")
+            
+            #TCP CAPTURE ****
+            ssh_tcp_file = subprocess.Popen(['ssh',
+                ONOS_user+"@"+ONOS1_ip, 'cat', 
+                tshark_tcp_output], stdout=subprocess.PIPE)
+            temp_text = ssh_tcp_file.stdout.readline()
+            temp_text = temp_text.split(" ")
 
+            main.log.info("Object read in from TCP capture: "+
+                    str(temp_text))
+            if len(temp_text) > 0:
+                t0_tcp = int(float(temp_text[1])*1000)
+            else:
+                main.log.error("Tshark output file for TCP"+
+                        " returned unexpected results")
+                t0_tcp = 0
+                assertion = main.FALSE
+            #****************
 
+            #OF CAPTURE ****
+            ssh_of_file = subprocess.Popen(['ssh',
+                ONOS_user+"@"+ONOS1_ip, 'cat',
+                tshark_of_output], stdout=subprocess.PIPE)
 
+            while True:
+                temp_text = ssh_of_file.stdout.readline()
+                if line !='':
+                    line_ofp = temp_text
+                else:
+                    break 
+            obj = line_ofp.split(" ")
+            
+            main.log.info("Object read in from OFP capture: "+
+                    str(line_ofp))
+    
+            if len(line_ofp) > 0:
+                t0_ofp = int(float(obj[1])*1000)
+            else:
+                main.log.error("Tshark output file for OFP"+
+                        " returned unexpected results")
+                t0_ofp = 0
+                assertion = main.FALSE
+            #****************
+           
+            #TODO: 
+            #Get json object from all 3 ONOS instances
+            
+            #TODO:
+            #Parse json object for timestamp
+            topo_timestamp_1 = 0
+            topo_timestamp_2 = 0
+            topo_timestamp_3 = 0
 
+            #ONOS processing latency
+            delta_of_1 = int(topo_timestamp_1) - int(t0_ofp)
+            delta_of_2 = int(topo_timestamp_2) - int(t0_ofp)
+            delta_of_3 = int(topo_timestamp_3) - int(t0_ofp)
+    
+            #End-to-end processing latency
+            delta_tcp_1 = int(topo_timestamp_1) - int(t0_tcp)
+            delta_tcp_2 = int(topo_timestamp_2) - int(t0_tcp)
+            delta_tcp_3 = int(topo_timestamp_3) - int(t0_tcp)
 
+            #TODO:
+            #Fetch logs upon threshold excess
 
+            main.log.info("ONOS1 delta OFP: "+str(delta_of_1))
+            main.log.info("ONOS2 delta OFP: "+str(delta_of_2))
+            main.log.info("ONOS3 delta OFP: "+str(delta_of_3))
 
-
+            main.log.info("ONOS1 delta TCP: "+str(delta_tcp_1))
+            main.log.info("ONOS2 delta TCP: "+str(delta_tcp_2))
+            main.log.info("ONOS3 delta TCP: "+str(delta_tcp_3))
+            
 
 
 
