Merge branch 'master' of https://github.com/opennetworkinglab/ONLabTest into newMNdriver

Conflicts:
	TestON/drivers/common/cli/emulator/mininetclidriver.py
diff --git a/TestON/dependencies/Jenkins_getresult_HA.py b/TestON/dependencies/Jenkins_getresult_HA.py
index f3ea459..859612d 100755
--- a/TestON/dependencies/Jenkins_getresult_HA.py
+++ b/TestON/dependencies/Jenkins_getresult_HA.py
@@ -101,7 +101,9 @@
     f.close()
     #https://wiki.onosproject.org/display/OST/Test+Results+-+HA#Test+Results+-+HA
     #Example anchor on new wiki:        #TestResults-HA-TestHATestSanity
-    page_name = "TestResults-HA-Test"
+    page_name = "Master+-+HA"
+    if "ONOS-HA-Maint" in job:
+        page_name = "1.0+-+HA"
 
     header += "<li><a href=\'#" + str(page_name) + str(test) + "\'> " + str(test) + " - Results: " + str(passes) + " Passed, " + str(fails) + " Failed</a></li>"
 
diff --git a/TestON/dependencies/onos.properties.proactive b/TestON/dependencies/onos.properties.proactive
deleted file mode 100644
index 2b5150a..0000000
--- a/TestON/dependencies/onos.properties.proactive
+++ /dev/null
@@ -1,16 +0,0 @@
-floodlight.modules = net.floodlightcontroller.core.FloodlightProvider,\
-net.floodlightcontroller.threadpool.ThreadPool,\
-net.onrc.onos.core.topology.TopologyPublisher, \
-net.onrc.onos.core.datagrid.HazelcastDatagrid,\
-net.onrc.onos.core.flowprogrammer.FlowProgrammer,\
-net.onrc.onos.core.intent.runtime.PathCalcRuntimeModule,\
-net.onrc.onos.core.intent.runtime.PlanInstallModule,\
-net.onrc.onos.core.registry.ZookeeperRegistry
-net.floodlightcontroller.restserver.RestApiServer.port = 8080
-net.floodlightcontroller.core.FloodlightProvider.openflowport = 6633
-net.floodlightcontroller.core.FloodlightProvider.workerthreads = 16
-net.floodlightcontroller.forwarding.Forwarding.idletimeout = 5
-net.floodlightcontroller.forwarding.Forwarding.hardtimeout = 0
-net.onrc.onos.core.datagrid.HazelcastDatagrid.datagridConfig = conf/hazelcast.xml
-net.onrc.onos.ofcontroller.floodlightlistener.NetworkGraphPublisher.dbconf = conf/ramcloud.conf
-net.onrc.onos.ofcontroller.floodlightlistener.NetworkGraphPublisher.graph_db_store = ramcloud
diff --git a/TestON/dependencies/onos.properties.reactive b/TestON/dependencies/onos.properties.reactive
deleted file mode 100644
index 8d78222..0000000
--- a/TestON/dependencies/onos.properties.reactive
+++ /dev/null
@@ -1,19 +0,0 @@
-floodlight.modules = net.floodlightcontroller.core.FloodlightProvider,\
-net.floodlightcontroller.threadpool.ThreadPool,\
-net.onrc.onos.core.topology.TopologyPublisher, \
-net.onrc.onos.core.datagrid.HazelcastDatagrid,\
-net.onrc.onos.core.flowprogrammer.FlowProgrammer,\
-net.onrc.onos.core.intent.runtime.PathCalcRuntimeModule,\
-net.onrc.onos.core.intent.runtime.PlanInstallModule,\
-net.onrc.onos.core.registry.ZookeeperRegistry,\
-net.onrc.onos.apps.proxyarp.ProxyArpManager,\
-net.onrc.onos.core.main.config.DefaultConfiguration,\
-net.onrc.onos.apps.forwarding.Forwarding
-net.floodlightcontroller.restserver.RestApiServer.port = 8080
-net.floodlightcontroller.core.FloodlightProvider.openflowport = 6633
-net.floodlightcontroller.core.FloodlightProvider.workerthreads = 16
-net.floodlightcontroller.forwarding.Forwarding.idletimeout = 5
-net.floodlightcontroller.forwarding.Forwarding.hardtimeout = 0
-net.onrc.onos.core.datagrid.HazelcastDatagrid.datagridConfig = conf/hazelcast.xml
-net.onrc.onos.ofcontroller.floodlightlistener.NetworkGraphPublisher.dbconf = conf/ramcloud.conf
-net.onrc.onos.ofcontroller.floodlightlistener.NetworkGraphPublisher.graph_db_store = ramcloud
diff --git a/TestON/dependencies/pyintents.py b/TestON/dependencies/pyintents.py
deleted file mode 100755
index b593845..0000000
--- a/TestON/dependencies/pyintents.py
+++ /dev/null
@@ -1,46 +0,0 @@
-#! /usr/bin/env python
-'''
-This file creates the ONOS intents for the sanity 4 nodes tests. These intents will be translated into flows by ONOS and pushed to the switches.
-'''
-
-import json
-import requests
-
-url = 'http://127.0.0.1:8080/wm/onos/datagrid/add/intents/json'
-headers = {'Content-type': 'application/json', 'Accept': 'application/json'}
-
-
-'''response
-[{'intent_id':'5','status':'CREATED','log':['created, time:73268214932534']}]
-'''
-
-
-
-for i in range(6,16):
-    #intent = [{'intent_id': '%d' %i,'intent_type':'shortest_intent_type','intent_op':'add','srcSwitch':'8249','srcPort':1,'srcMac':'00:00:00:00:00:01','dstSwitch':'4103','dstPort':1,'dstMac':'00:00:00:00:00:02'}]
-    srcMac = '00:00:00:00:00:'+ str(hex(i)[2:]).zfill(2)
-    dstMac = '00:00:00:00:00:'+ str(hex(i+10)[2:])
-    srcSwitch = '00:00:00:00:00:00:10:'+ str(i).zfill(2)
-    dstSwitch = '00:00:00:00:00:00:20:'+ str(i+25)
-    srcPort = 1 
-    dstPort = 1 
-
-    intent = [{'intent_id': '%d' %(i),'intent_type':'shortest_intent_type','intent_op':'add','srcSwitch':srcSwitch,'srcPort':srcPort,'srcMac':srcMac,'dstSwitch':dstSwitch,'dstPort':dstPort,'dstMac':dstMac}]
-
-
-    print json.dumps(intent, sort_keys = True)
-
-
-    #r = requests.post(url, data=json.dumps(iid, sort_keys=True)+json.dumps(intent, sort_keys=True), headers = headers)
-    r = requests.post(url, data=json.dumps(intent, sort_keys=True), headers = headers)
-    print r
-    print r.content
-
-
-
-    intent = [{'intent_id': '%d' %(i+10),'intent_type':'shortest_intent_type','intent_op':'add','srcSwitch':dstSwitch,'srcPort':dstPort,'srcMac':dstMac,'dstSwitch':srcSwitch,'dstPort':srcPort,'dstMac':srcMac}]
-    print json.dumps(intent, sort_keys = True)
-    r = requests.post(url, data=json.dumps(intent, sort_keys=True), headers = headers)
-    print r
-    print r.content
-
diff --git a/TestON/dependencies/rmpyintents.py b/TestON/dependencies/rmpyintents.py
deleted file mode 100755
index 10bb5d4..0000000
--- a/TestON/dependencies/rmpyintents.py
+++ /dev/null
@@ -1,49 +0,0 @@
-#! /usr/bin/env python
-
-'''
-This file removes the ONOS intents for the sanity 4 nodes tests. The flows associated with these intents should be deleted from the switches.
-'''
-
-import json
-import requests
-
-
-
-url = 'http://127.0.0.1:8080/wm/onos/datagrid/add/intents/json'
-headers = {'Content-type': 'application/json', 'Accept': 'application/json'}
-
-
-'''response
-[{'intent_id':'5','status':'CREATED','log':['created, time:73268214932534']}]
-'''
-
-
-
-for i in range(6,16):
-    #intent = [{'intent_id': '%d' %i,'intent_type':'shortest_intent_type','intent_op':'remove','srcSwitch':'8249','srcPort':1,'srcMac':'00:00:00:00:00:01','dstSwitch':'4103','dstPort':1,'dstMac':'00:00:00:00:00:02'}]
-    srcMac = '00:00:00:00:00:'+ str(hex(i)[2:]).zfill(2)
-    dstMac = '00:00:00:00:00:'+ str(hex(i+10)[2:])
-    srcSwitch = '00:00:00:00:00:00:10:'+ str(i).zfill(2)
-    dstSwitch = '00:00:00:00:00:00:20:'+ str(i+25)
-    srcPort = 1 
-    dstPort = 1 
-
-    intent = [{'intent_id': '%d' %(i),'intent_type':'shortest_intent_type','intent_op':'remove','srcSwitch':srcSwitch,'srcPort':srcPort,'srcMac':srcMac,'dstSwitch':dstSwitch,'dstPort':dstPort,'dstMac':dstMac}]
-
-
-    print json.dumps(intent, sort_keys = True)
-
-
-    #r = requests.post(url, data=json.dumps(iid, sort_keys=True)+json.dumps(intent, sort_keys=True), headers = headers)
-    r = requests.post(url, data=json.dumps(intent, sort_keys=True), headers = headers)
-    print r
-    print r.content
-
-
-
-    intent = [{'intent_id': '%d' %(i+10),'intent_type':'shortest_intent_type','intent_op':'remove','srcSwitch':dstSwitch,'srcPort':dstPort,'srcMac':dstMac,'dstSwitch':srcSwitch,'dstPort':srcPort,'dstMac':srcMac}]
-    print json.dumps(intent, sort_keys = True)
-    r = requests.post(url, data=json.dumps(intent, sort_keys=True), headers = headers)
-    print r
-    print r.content
-
diff --git a/TestON/drivers/common/cli/emulator/lincoedriver.py b/TestON/drivers/common/cli/emulator/lincoedriver.py
index a82cfa4..82179a5 100644
--- a/TestON/drivers/common/cli/emulator/lincoedriver.py
+++ b/TestON/drivers/common/cli/emulator/lincoedriver.py
@@ -329,7 +329,11 @@
             cmd = "sudo kill -9 `pgrep -f linc`"
             self.handle.sendline( cmd )
             self.handle.expect( "\$" )
-
+            # Close the ssh connection
+            self.handle.sendline( "" )
+            self.handle.expect( "\$" )
+            self.handle.sendline( "exit" )
+            self.handle.expect( "closed" )
         except pexpect.EOF:
             main.log.error( self.name + ": EOF exception" )
             main.log.error( self.name + ":    " + self.handle.before )
diff --git a/TestON/drivers/common/cli/emulator/mininetclidriver.py b/TestON/drivers/common/cli/emulator/mininetclidriver.py
index cd64fd0..b7dc847 100644
--- a/TestON/drivers/common/cli/emulator/mininetclidriver.py
+++ b/TestON/drivers/common/cli/emulator/mininetclidriver.py
@@ -97,9 +97,18 @@
             main.cleanup()
             main.exit()
 
+<<<<<<< HEAD
 
     def startNet( self, topoFile = '', args = '', timeout = 120 ):
+=======
+>>>>>>> 42efbd8869b8e52ac17c3f0966cdf12979e41e0f
 
+    def startNet( self, topoFile = '', args = '', timeout = 120 ):
+        """
+        Starts Mininet accepts a topology(.py) file and/or an optional
+        arguement ,to start the mininet, as a parameter.
+        Returns true if the mininet starts successfully
+        """
         if self.handle:
             main.log.info(
                 self.name +
@@ -1236,7 +1245,12 @@
 
     def disconnect( self ):
         """
+<<<<<<< HEAD
         Called at the end of the test to disconnect the handle.
+=======
+        Called at the end of the test to stop the mininet and
+        disconnect the handle.
+>>>>>>> 42efbd8869b8e52ac17c3f0966cdf12979e41e0f
         """
         self.handle.sendline('')
         i = 1
@@ -1250,7 +1264,11 @@
             self.handle.expect( "exit" )
             self.handle.expect( "(.*)" )
             main.log.info( "Mininet CLI is successfully disconnected" )
+<<<<<<< HEAD
             response = self.handle.before
+=======
+            response = main.TRUE
+>>>>>>> 42efbd8869b8e52ac17c3f0966cdf12979e41e0f
         else:
             main.log.error( "Connection failed to the host" )
             response = main.FALSE
@@ -1258,6 +1276,13 @@
         return response
 
     def stopNet( self ):
+<<<<<<< HEAD
+=======
+        """
+        Stops mininet. returns true if the mininet succesfully stops.
+        """
+        
+>>>>>>> 42efbd8869b8e52ac17c3f0966cdf12979e41e0f
         main.log.info( self.name + ": Disconnecting mininet..." )
         response = ''
         if self.handle:
diff --git a/TestON/drivers/common/cli/emulator/remotemininetdriver.py b/TestON/drivers/common/cli/emulator/remotemininetdriver.py
index e15e53c..3d91a20 100644
--- a/TestON/drivers/common/cli/emulator/remotemininetdriver.py
+++ b/TestON/drivers/common/cli/emulator/remotemininetdriver.py
@@ -380,12 +380,13 @@
             self.handle.sendline( "exit" )
             self.handle.expect( "exit" )
             self.handle.expect( "(.*)" )
-            response = self.handle.before
-
+            # Close the ssh connection
+            self.handle.sendline( "" )
+            self.handle.expect( "\$" )
+            self.handle.sendline( "exit" )
+            self.handle.expect( "closed" )
         else:
             main.log.error( "Connection failed to the host" )
-            response = main.FALSE
-        return response
 
     def getFlowTable( self, protoVersion, sw ):
         """
diff --git a/TestON/drivers/common/cli/onosclidriver.py b/TestON/drivers/common/cli/onosclidriver.py
index 23d71e6..e79cf1b 100644
--- a/TestON/drivers/common/cli/onosclidriver.py
+++ b/TestON/drivers/common/cli/onosclidriver.py
@@ -19,7 +19,6 @@
 import sys
 import pexpect
 import re
-import traceback
 sys.path.append( "../" )
 from drivers.common.clidriver import CLI
 
@@ -62,15 +61,16 @@
             else:
                 main.log.info( "NO ONOS HANDLE" )
                 return main.FALSE
+        except TypeError:
+            main.log.exception( self.name + ": Object not as expected" )
+            return None
         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.log.exception( self.name + ": Uncaught exception!" )
             main.cleanup()
             main.exit()
 
@@ -92,11 +92,14 @@
             self.handle.sendline( "exit" )
             self.handle.expect( "closed" )
 
+        except TypeError:
+            main.log.exception( self.name + ": Object not as expected" )
+            return None
         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" )
+            main.log.exception( self.name + ": Connection failed to the host" )
             response = main.FALSE
         return response
 
@@ -115,6 +118,9 @@
             elif i == 1:
                 return main.TRUE
 
+        except TypeError:
+            main.log.exception( self.name + ": Object not as expected" )
+            return None
         except pexpect.EOF:
             main.log.error( self.name + ": eof exception found" )
             main.log.error( self.name + ":    " +
@@ -122,9 +128,7 @@
             main.cleanup()
             main.exit()
         except:
-            main.log.info( self.name + " ::::::" )
-            main.log.error( traceback.print_exc() )
-            main.log.info( self.name + " ::::::" )
+            main.log.exception( self.name + ": Uncaught exception!" )
             main.cleanup()
             main.exit()
 
@@ -157,15 +161,16 @@
 
                 return main.TRUE
 
+        except TypeError:
+            main.log.exception( self.name + ": Object not as expected" )
+            return None
         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.log.exception( self.name + ": Uncaught exception!" )
             main.cleanup()
             main.exit()
 
@@ -234,15 +239,16 @@
                                     str( ONOSIp ) + " timeout" )
                     return main.FALSE
 
+        except TypeError:
+            main.log.exception( self.name + ": Object not as expected" )
+            return None
         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.log.exception( self.name + ": Uncaught exception!" )
             main.cleanup()
             main.exit()
 
@@ -311,15 +317,16 @@
 
 
             return output
+        except TypeError:
+            main.log.exception( self.name + ": Object not as expected" )
+            return None
         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.log.exception( self.name + ": Uncaught exception!" )
             main.cleanup()
             main.exit()
 
@@ -350,15 +357,16 @@
             else:
                 main.log.info( "Node " + str( ONOSIp ) + " added" )
                 return main.TRUE
+        except TypeError:
+            main.log.exception( self.name + ": Object not as expected" )
+            return None
         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.log.exception( self.name + ": Uncaught exception!" )
             main.cleanup()
             main.exit()
 
@@ -377,15 +385,16 @@
 
             return main.TRUE
 
+        except TypeError:
+            main.log.exception( self.name + ": Object not as expected" )
+            return None
         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.log.exception( self.name + ": Uncaught exception!" )
             main.cleanup()
             main.exit()
 
@@ -399,15 +408,16 @@
             cmdStr = "nodes"
             handle = self.sendline( cmdStr )
             return handle
+        except TypeError:
+            main.log.exception( self.name + ": Object not as expected" )
+            return None
         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.log.exception( self.name + ": Uncaught exception!" )
             main.cleanup()
             main.exit()
 
@@ -422,15 +432,16 @@
             handle = self.sendline( cmdStr )
             main.log.info( "onos:topology returned: " + str( handle ) )
             return handle
+        except TypeError:
+            main.log.exception( self.name + ": Object not as expected" )
+            return None
         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.log.exception( self.name + ": Uncaught exception!" )
             main.cleanup()
             main.exit()
 
@@ -444,6 +455,9 @@
             self.sendline( cmdStr )
             # TODO: Check for possible error responses from karaf
             return main.TRUE
+        except TypeError:
+            main.log.exception( self.name + ": Object not as expected" )
+            return None
         except pexpect.EOF:
             main.log.error( self.name + ": EOF exception found" )
             main.log.error( self.name + ":    " + self.handle.before )
@@ -452,11 +466,9 @@
             main.cleanup()
             main.exit()
         except:
-            main.log.info( self.name + " ::::::" )
-            main.log.error( traceback.print_exc() )
+            main.log.exception( self.name + ": Uncaught exception!" )
             main.log.report( "Failed to install feature" )
             main.log.report( "Exiting test" )
-            main.log.info( self.name + " ::::::" )
             main.cleanup()
             main.exit()
 
@@ -470,15 +482,16 @@
             self.sendline( cmdStr )
             # TODO: Check for possible error responses from karaf
             return main.TRUE
+        except TypeError:
+            main.log.exception( self.name + ": Object not as expected" )
+            return None
         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.log.exception( self.name + ": Uncaught exception!" )
             main.cleanup()
             main.exit()
 
@@ -512,15 +525,16 @@
                 cmdStr = "devices"
                 handle = self.sendline( cmdStr )
                 return handle
+        except TypeError:
+            main.log.exception( self.name + ": Object not as expected" )
+            return None
         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.log.exception( self.name + ": Uncaught exception!" )
             main.cleanup()
             main.exit()
 
@@ -535,15 +549,16 @@
             self.sendline( cmdStr )
             # TODO: Check for error responses from ONOS
             return main.TRUE
+        except TypeError:
+            main.log.exception( self.name + ": Object not as expected" )
+            return None
         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.log.exception( self.name + ": Uncaught exception!" )
             main.cleanup()
             main.exit()
 
@@ -577,15 +592,16 @@
                 cmdStr = "links"
                 handle = self.sendline( cmdStr )
                 return handle
+        except TypeError:
+            main.log.exception( self.name + ": Object not as expected" )
+            return None
         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.log.exception( self.name + ": Uncaught exception!" )
             main.cleanup()
             main.exit()
 
@@ -620,15 +636,16 @@
                 cmdStr = "ports"
                 handle = self.sendline( cmdStr )
                 return handle
+        except TypeError:
+            main.log.exception( self.name + ": Object not as expected" )
+            return None
         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.log.exception( self.name + ": Uncaught exception!" )
             main.cleanup()
             main.exit()
 
@@ -665,15 +682,16 @@
                 cmdStr = "roles"
                 handle = self.sendline( cmdStr )
                 return handle
+        except TypeError:
+            main.log.exception( self.name + ": Object not as expected" )
+            return None
         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.log.exception( self.name + ": Uncaught exception!" )
             main.cleanup()
             main.exit()
 
@@ -701,16 +719,16 @@
                     if str( deviceId ) in device[ 'id' ]:
                         return device
             return None
-
+        except TypeError:
+            main.log.exception( self.name + ": Object not as expected" )
+            return None
         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.log.exception( self.name + ": Uncaught exception!" )
             main.cleanup()
             main.exit()
 
@@ -732,15 +750,16 @@
                     return main.FALSE
             return main.TRUE
 
+        except TypeError:
+            main.log.exception( self.name + ": Object not as expected" )
+            return None
         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.log.exception( self.name + ": Uncaught exception!" )
             main.cleanup()
             main.exit()
 
@@ -759,15 +778,16 @@
                 path = handle.split( ";" )[ 0 ]
                 cost = handle.split( ";" )[ 1 ]
                 return ( path, cost )
+        except TypeError:
+            main.log.exception( self.name + ": Object not as expected" )
+            return ( handle, "Error" )
         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.log.exception( self.name + ": Uncaught exception!" )
             main.cleanup()
             main.exit()
 
@@ -801,15 +821,16 @@
                 cmdStr = "hosts"
                 handle = self.sendline( cmdStr )
                 return handle
+        except TypeError:
+            main.log.exception( self.name + ": Object not as expected" )
+            return None
         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.log.exception( self.name + ": Uncaught exception!" )
             main.cleanup()
             main.exit()
 
@@ -833,18 +854,21 @@
                 # search json for the host with mac then return the device
                 for host in hostsJson:
                     # print "%s in  %s?" % ( mac, host[ 'id' ] )
-                    if mac in host[ 'id' ]:
+                    if not host:
+                        pass
+                    elif mac in host[ 'id' ]:
                         return host
             return None
+        except TypeError:
+            main.log.exception( self.name + ": Object not as expected" )
+            return None
         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.log.exception( self.name + ": Uncaught exception!" )
             main.cleanup()
             main.exit()
 
@@ -877,15 +901,16 @@
 
             return onosHostList
 
+        except TypeError:
+            main.log.exception( self.name + ": Object not as expected" )
+            return None
         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.log.exception( self.name + ": Uncaught exception!" )
             main.cleanup()
             main.exit()
 
@@ -910,15 +935,16 @@
                            str( hostIdOne ) + " and " + str( hostIdTwo ) )
                 return main.TRUE
 
+        except TypeError:
+            main.log.exception( self.name + ": Object not as expected" )
+            return None
         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.log.exception( self.name + ": Uncaught exception!" )
             main.cleanup()
             main.exit()
 
@@ -939,15 +965,16 @@
                 return handle
             else:
                 return main.TRUE
+        except TypeError:
+            main.log.exception( self.name + ": Object not as expected" )
+            return None
         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.log.exception( self.name + ": Uncaught exception!" )
             main.cleanup()
             main.exit()
 
@@ -1058,15 +1085,16 @@
                 return main.FALSE
             else:
                 return main.TRUE
+        except TypeError:
+            main.log.exception( self.name + ": Object not as expected" )
+            return None
         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.log.exception( self.name + ": Uncaught exception!" )
             main.cleanup()
             main.exit()
 
@@ -1205,15 +1233,16 @@
                 return self.handle
             else:
                 return main.TRUE
+        except TypeError:
+            main.log.exception( self.name + ": Object not as expected" )
+            return None
         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.log.exception( self.name + ": Uncaught exception!" )
             main.cleanup()
             main.exit()
 
@@ -1234,15 +1263,16 @@
             else:
                 # TODO: Should this be main.TRUE
                 return handle
+        except TypeError:
+            main.log.exception( self.name + ": Object not as expected" )
+            return None
         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.log.exception( self.name + ": Uncaught exception!" )
             main.cleanup()
             main.exit()
 
@@ -1265,15 +1295,16 @@
                 cmdStr = "routes"
                 handle = self.sendline( cmdStr )
             return handle
+        except TypeError:
+            main.log.exception( self.name + ": Object not as expected" )
+            return None
         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.log.exception( self.name + ": Uncaught exception!" )
             main.cleanup()
             main.exit()
 
@@ -1294,15 +1325,16 @@
                 cmdStr = "intents"
                 handle = self.sendline( cmdStr )
             return handle
+        except TypeError:
+            main.log.exception( self.name + ": Object not as expected" )
+            return None
         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.log.exception( self.name + ": Uncaught exception!" )
             main.cleanup()
             main.exit()
 
@@ -1326,15 +1358,16 @@
                 main.log.error( self.name + ".flows() response: " +
                                 str( handle ) )
             return handle
+        except TypeError:
+            main.log.exception( self.name + ": Object not as expected" )
+            return None
         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.log.exception( self.name + ": Uncaught exception!" )
             main.cleanup()
             main.exit()
 
@@ -1384,15 +1417,16 @@
                 return latResult
             else:
                 return main.TRUE
+        except TypeError:
+            main.log.exception( self.name + ": Object not as expected" )
+            return None
         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.log.exception( self.name + ": Uncaught exception!" )
             main.cleanup()
             main.exit()
 
@@ -1413,15 +1447,16 @@
                 cmdStr = "intents-events-metrics"
                 handle = self.sendline( cmdStr )
             return handle
+        except TypeError:
+            main.log.exception( self.name + ": Object not as expected" )
+            return None
         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.log.exception( self.name + ": Uncaught exception!" )
             main.cleanup()
             main.exit()
 
@@ -1442,15 +1477,16 @@
                 cmdStr = "topology-events-metrics"
                 handle = self.sendline( cmdStr )
             return handle
+        except TypeError:
+            main.log.exception( self.name + ": Object not as expected" )
+            return None
         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.log.exception( self.name + ": Uncaught exception!" )
             main.cleanup()
             main.exit()
 
@@ -1493,15 +1529,16 @@
 
             return intentIdList
 
+        except TypeError:
+            main.log.exception( self.name + ": Object not as expected" )
+            return None
         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.log.exception( self.name + ": Uncaught exception!" )
             main.cleanup()
             main.exit()
 
@@ -1538,15 +1575,16 @@
                 idList.append( arg.split( "id=" )[ 1 ] )
             return idList
 
+        except TypeError:
+            main.log.exception( self.name + ": Object not as expected" )
+            return None
         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.log.exception( self.name + ": Uncaught exception!" )
             main.cleanup()
             main.exit()
 
@@ -1577,15 +1615,16 @@
 
             return idList
 
+        except TypeError:
+            main.log.exception( self.name + ": Object not as expected" )
+            return None
         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.log.exception( self.name + ": Uncaught exception!" )
             main.cleanup()
             main.exit()
 
@@ -1608,15 +1647,16 @@
                     if dpid in device[ 'id' ]:
                         return device
             return None
+        except TypeError:
+            main.log.exception( self.name + ": Object not as expected" )
+            return None
         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.log.exception( self.name + ": Uncaught exception!" )
             main.cleanup()
             main.exit()
 
@@ -1673,15 +1713,16 @@
             else:
                 main.log.info( output )
             return result
+        except TypeError:
+            main.log.exception( self.name + ": Object not as expected" )
+            return None
         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.log.exception( self.name + ": Uncaught exception!" )
             main.cleanup()
             main.exit()
 
@@ -1715,15 +1756,16 @@
                 main.log.error( "Invalid 'role' given to device_role(). " +
                                 "Value was '" + str(role) + "'." )
                 return main.FALSE
+        except TypeError:
+            main.log.exception( self.name + ": Object not as expected" )
+            return None
         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.log.exception( self.name + ": Uncaught exception!" )
             main.cleanup()
             main.exit()
 
@@ -1757,15 +1799,16 @@
                 cmdStr = "clusters"
                 handle = self.sendline( cmdStr )
                 return handle
+        except TypeError:
+            main.log.exception( self.name + ": Object not as expected" )
+            return None
         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.log.exception( self.name + ": Uncaught exception!" )
             main.cleanup()
             main.exit()
 
@@ -1808,15 +1851,16 @@
                                 "unexpected response" )
                 main.log.error( repr( response ) )
                 return main.FALSE
+        except TypeError:
+            main.log.exception( self.name + ": Object not as expected" )
+            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( self.name + " ::::::" )
+            main.log.exception( self.name + ": Uncaught exception!" )
             main.cleanup()
             main.exit()
 
@@ -1848,15 +1892,16 @@
                                 "unexpected response" )
                 main.log.error( repr( response ) )
                 return main.FALSE
+        except TypeError:
+            main.log.exception( self.name + ": Object not as expected" )
+            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( self.name + " ::::::" )
+            main.log.exception( self.name + ": Uncaught exception!" )
             main.cleanup()
             main.exit()
 
@@ -1888,15 +1933,16 @@
                                 "unexpected response" )
                 main.log.error( repr( response ) )
                 return main.FALSE
+        except TypeError:
+            main.log.exception( self.name + ": Object not as expected" )
+            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( self.name + " ::::::" )
+            main.log.exception( self.name + ": Uncaught exception!" )
             main.cleanup()
             main.exit()
 
@@ -1913,15 +1959,16 @@
                 return ( output, "Error" )
             else:
                 return output
+        except TypeError:
+            main.log.exception( self.name + ": Object not as expected" )
+            return ( output, "Error" )
         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.log.exception( self.name + ": Uncaught exception!" )
             main.cleanup()
             main.exit()
 
@@ -1938,15 +1985,16 @@
                 return ( output, "Error " )
             else:
                 return output
+        except TypeError:
+            main.log.exception( self.name + ": Object not as expected" )
+            return ( output, "Error " )
         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.log.exception( self.name + ": Uncaught exception!" )
             main.cleanup()
             main.exit()
 
@@ -1962,14 +2010,36 @@
                 return ( output, "Error" )
             else:
                 return output
+        except TypeError:
+            main.log.exception( self.name + ": Object not as expected" )
+            return ( output, "Error" )
         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.log.exception( self.name + ": Uncaught exception!" )
+            main.cleanup()
+            main.exit()
+
+    def testExceptions( self, obj ):
+        """
+        Test exception logging
+        """
+        # FIXME: Remove this before you commit
+
+        try:
+            return obj[ 'dedf' ]
+        except TypeError:
+            main.log.exception( self.name + ": Object not as expected" )
+            return None
+        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.exception( self.name + ": Uncaught exception!" )
             main.cleanup()
             main.exit()
diff --git a/TestON/tests/HATestClusterRestart/HATestClusterRestart.py b/TestON/tests/HATestClusterRestart/HATestClusterRestart.py
index 791d55c..ff38cfe 100644
--- a/TestON/tests/HATestClusterRestart/HATestClusterRestart.py
+++ b/TestON/tests/HATestClusterRestart/HATestClusterRestart.py
@@ -104,6 +104,9 @@
         cleanInstallResult = main.TRUE
         gitPullResult = main.TRUE
 
+        main.step( "Starting Mininet" )
+        main.Mininet1.startNet( )
+
         main.step( "Compiling the latest version of ONOS" )
         if PULLCODE:
             # TODO Configure branch in params
@@ -116,7 +119,7 @@
         else:
             main.log.warn( "Did not pull new code so skipping mvn " +
                            "clean install" )
-    main.ONOSbench.getVersion( report=True )
+        main.ONOSbench.getVersion( report=True )
 
         main.step( "Creating ONOS package" )
         packageResult = main.ONOSbench.onosPackage()
@@ -436,19 +439,36 @@
                 str( hex( i )[ 2: ] ).zfill( 2 ).upper()
             host2 = "00:00:00:00:00:" + \
                 str( hex( i + 10 )[ 2: ] ).zfill( 2 ).upper()
-            host1Id = main.ONOScli1.getHost( host1 )[ 'id' ]
-            host2Id = main.ONOScli1.getHost( host2 )[ 'id' ]
-            # NOTE: get host can return None
+            # NOTE: getHost can return None
+            host1Dict = main.ONOScli1.getHost( host1 )
+            host2Dict = main.ONOScli1.getHost( host2 )
+            host1Id = None
+            host2Id = None
+            if host1Dict and host2Dict:
+                host1Id = host1Dict.get( 'id', None )
+                host2Id = host2Dict.get( 'id', None )
             if host1Id and host2Id:
                 tmpResult = main.ONOScli1.addHostIntent(
                     host1Id,
                     host2Id )
             else:
                 main.log.error( "Error, getHost() failed" )
+                main.log.warn( json.dumps( json.loads( main.ONOScli1.hosts() ),
+                                           sort_keys=True,
+                                           indent=4,
+                                           separators=( ',', ': ' ) ) )
                 tmpResult = main.FALSE
             intentAddResult = bool( pingResult and intentAddResult
                                      and tmpResult )
             # TODO Check that intents were added?
+        # Print the intent states
+        intents = main.ONOScli1.intents( )
+        intentStates = []
+        for intent in json.loads( intents ):  # Iter through intents of a node
+            intentStates.append( intent.get( 'state', None ) )
+        out = [ (i, intentStates.count( i ) ) for i in set( intentStates ) ]
+        main.log.info( dict( out ) )
+
         utilities.assert_equals(
             expect=True,
             actual=intentAddResult,
@@ -1290,6 +1310,24 @@
             actual=intentCheck,
             onpass="Intents are consistent across all ONOS nodes",
             onfail="ONOS nodes have different views of intents" )
+        # Print the intent states
+        intents = []
+        intents.append( ONOS1Intents )
+        intents.append( ONOS2Intents )
+        intents.append( ONOS3Intents )
+        intents.append( ONOS4Intents )
+        intents.append( ONOS5Intents )
+        intents.append( ONOS6Intents )
+        intents.append( ONOS7Intents )
+        intentStates = []
+        for node in intents:  # Iter through ONOS nodes
+            nodeStates = []
+            for intent in json.loads( node ):  # Iter through intents of a node
+                nodeStates.append( intent[ 'state' ] )
+            intentStates.append( nodeStates )
+            out = [ (i, nodeStates.count( i ) ) for i in set( nodeStates ) ]
+            main.log.info( dict( out ) )
+
 
         # NOTE: Hazelcast has no durability, so intents are lost across system
         # restarts
@@ -1297,7 +1335,8 @@
         main.step( "Compare current intents with intents before the failure" )
         # NOTE: this requires case 5 to pass for intentState to be set.
         #      maybe we should stop the test if that fails?
-        if intentState == ONOS1Intents:
+        sameIntents = main.TRUE
+        if intentState and intentState == ONOS1Intents:
             sameIntents = main.TRUE
             main.log.report( "Intents are consistent with before failure" )
         # TODO: possibly the states have changed? we may need to figure out
@@ -1486,7 +1525,6 @@
             for controller in range( 0, len( hosts ) ):
                 controllerStr = str( controller + 1 )
                 for host in hosts[ controller ]:
-                    host
                     if host[ 'ips' ] == []:
                         main.log.error(
                             "DEBUG:Error with host ips on controller" +
@@ -1639,7 +1677,7 @@
         note = "note it takes about " + str( int( cliTime ) ) + \
             " seconds for the test to make all the cli calls to fetch " +\
             "the topology from each ONOS instance"
-        main.log.report(
+        main.log.info(
             "Very crass estimate for topology discovery/convergence( " +
             str( note ) + " ): " + str( elapsed ) + " seconds, " +
             str( count ) + " tries" )
diff --git a/TestON/tests/HATestMinorityRestart/HATestMinorityRestart.py b/TestON/tests/HATestMinorityRestart/HATestMinorityRestart.py
index 6cca54b..3d9adc7 100644
--- a/TestON/tests/HATestMinorityRestart/HATestMinorityRestart.py
+++ b/TestON/tests/HATestMinorityRestart/HATestMinorityRestart.py
@@ -104,6 +104,9 @@
         cleanInstallResult = main.TRUE
         gitPullResult = main.TRUE
 
+        main.step( "Starting Mininet" )
+        main.Mininet1.startNet( )
+
         main.step( "Compiling the latest version of ONOS" )
         if PULLCODE:
             # TODO Configure branch in params
@@ -434,19 +437,37 @@
                 str( hex( i )[ 2: ] ).zfill( 2 ).upper()
             host2 = "00:00:00:00:00:" + \
                 str( hex( i + 10 )[ 2: ] ).zfill( 2 ).upper()
-            host1Id = main.ONOScli1.getHost( host1 )[ 'id' ]
-            host2Id = main.ONOScli1.getHost( host2 )[ 'id' ]
-            # NOTE: get host can return None
+            # NOTE: getHost can return None
+            host1Dict = main.ONOScli1.getHost( host1 )
+            host2Dict = main.ONOScli1.getHost( host2 )
+            host1Id = None
+            host2Id = None
+            if host1Dict and host2Dict:
+                host1Id = host1Dict.get( 'id', None )
+                host2Id = host2Dict.get( 'id', None )
             if host1Id and host2Id:
-                tmpResult = main.ONOScli1.addHostIntent(
+                #Changed onos node to test something
+                tmpResult = main.ONOScli4.addHostIntent(
                     host1Id,
                     host2Id )
             else:
                 main.log.error( "Error, getHost() failed" )
+                main.log.warn( json.dumps( json.loads( main.ONOScli1.hosts() ),
+                                           sort_keys=True,
+                                           indent=4,
+                                           separators=( ',', ': ' ) ) )
                 tmpResult = main.FALSE
             intentAddResult = bool( pingResult and intentAddResult
                                      and tmpResult )
             # TODO Check that intents were added?
+        # Print the intent states
+        intents = main.ONOScli1.intents( )
+        intentStates = []
+        for intent in json.loads( intents ):  # Iter through intents of a node
+            intentStates.append( intent.get( 'state', None ) )
+        out = [ (i, intentStates.count( i ) ) for i in set( intentStates ) ]
+        main.log.info( dict( out ) )
+
         utilities.assert_equals(
             expect=True,
             actual=intentAddResult,
@@ -906,12 +927,6 @@
         hosts.append( main.ONOScli5.hosts() )
         hosts.append( main.ONOScli6.hosts() )
         hosts.append( main.ONOScli7.hosts() )
-        for controller in range( 0, len( hosts ) ):
-            controllerStr = str( controller + 1 )
-            for host in hosts[ controller ]:
-                if host[ 'ips' ] == []:
-                    main.log.error( "DEBUG:Error with host ips on controller" +
-                                    controllerStr + ": " + str( host ) )
         ports = []
         ports.append( main.ONOScli1.ports() )
         ports.append( main.ONOScli2.ports() )
@@ -1287,13 +1302,32 @@
             actual=intentCheck,
             onpass="Intents are consistent across all ONOS nodes",
             onfail="ONOS nodes have different views of intents" )
+        # Print the intent states
+        intents = []
+        intents.append( ONOS1Intents )
+        intents.append( ONOS2Intents )
+        intents.append( ONOS3Intents )
+        intents.append( ONOS4Intents )
+        intents.append( ONOS5Intents )
+        intents.append( ONOS6Intents )
+        intents.append( ONOS7Intents )
+        intentStates = []
+        for node in intents:  # Iter through ONOS nodes
+            nodeStates = []
+            for intent in json.loads( node ):  # Iter through intents of a node
+                nodeStates.append( intent[ 'state' ] )
+            intentStates.append( nodeStates )
+            out = [ (i, nodeStates.count( i ) ) for i in set( nodeStates ) ]
+            main.log.info( dict( out ) )
+
 
         # NOTE: Hazelcast has no durability, so intents are lost across system
         # restarts
         main.step( "Compare current intents with intents before the failure" )
         # NOTE: this requires case 5 to pass for intentState to be set.
         #      maybe we should stop the test if that fails?
-        if intentState == ONOS1Intents:
+        sameIntents = main.TRUE
+        if intentState and intentState == ONOS1Intents:
             sameIntents = main.TRUE
             main.log.report( "Intents are consistent with before failure" )
         # TODO: possibly the states have changed? we may need to figure out
@@ -1487,7 +1521,6 @@
             for controller in range( 0, len( hosts ) ):
                 controllerStr = str( controller + 1 )
                 for host in hosts[ controller ]:
-                    host
                     if host[ 'ips' ] == []:
                         main.log.error(
                             "DEBUG:Error with host ips on controller" +
@@ -1640,7 +1673,7 @@
         note = "note it takes about " + str( int( cliTime ) ) + \
             " seconds for the test to make all the cli calls to fetch " +\
             "the topology from each ONOS instance"
-        main.log.report(
+        main.log.info(
             "Very crass estimate for topology discovery/convergence( " +
             str( note ) + " ): " + str( elapsed ) + " seconds, " +
             str( count ) + " tries" )
diff --git a/TestON/tests/HATestSanity/HATestSanity.py b/TestON/tests/HATestSanity/HATestSanity.py
index 9a95e78..58f9954 100644
--- a/TestON/tests/HATestSanity/HATestSanity.py
+++ b/TestON/tests/HATestSanity/HATestSanity.py
@@ -104,6 +104,9 @@
         cleanInstallResult = main.TRUE
         gitPullResult = main.TRUE
 
+        main.step( "Starting Mininet" )
+        main.Mininet1.startNet( )
+
         main.step( "Compiling the latest version of ONOS" )
         if PULLCODE:
             # TODO Configure branch in params
@@ -434,19 +437,36 @@
                 str( hex( i )[ 2: ] ).zfill( 2 ).upper()
             host2 = "00:00:00:00:00:" + \
                 str( hex( i + 10 )[ 2: ] ).zfill( 2 ).upper()
-            host1Id = main.ONOScli1.getHost( host1 )[ 'id' ]
-            host2Id = main.ONOScli1.getHost( host2 )[ 'id' ]
-            # NOTE: get host can return None
+            # NOTE: getHost can return None
+            host1Dict = main.ONOScli1.getHost( host1 )
+            host2Dict = main.ONOScli1.getHost( host2 )
+            host1Id = None
+            host2Id = None
+            if host1Dict and host2Dict:
+                host1Id = host1Dict.get( 'id', None )
+                host2Id = host2Dict.get( 'id', None )
             if host1Id and host2Id:
                 tmpResult = main.ONOScli1.addHostIntent(
                     host1Id,
                     host2Id )
             else:
                 main.log.error( "Error, getHost() failed" )
+                main.log.warn( json.dumps( json.loads( main.ONOScli1.hosts() ),
+                                           sort_keys=True,
+                                           indent=4,
+                                           separators=( ',', ': ' ) ) )
                 tmpResult = main.FALSE
             intentAddResult = bool( pingResult and intentAddResult
                                      and tmpResult )
             # TODO Check that intents were added?
+        # Print the intent states
+        intents = main.ONOScli1.intents( )
+        intentStates = []
+        for intent in json.loads( intents ):  # Iter through intents of a node
+            intentStates.append( intent.get( 'state', None ) )
+        out = [ (i, intentStates.count( i ) ) for i in set( intentStates ) ]
+        main.log.info( dict( out ) )
+
         utilities.assert_equals(
             expect=True,
             actual=intentAddResult,
@@ -1258,13 +1278,32 @@
             actual=intentCheck,
             onpass="Intents are consistent across all ONOS nodes",
             onfail="ONOS nodes have different views of intents" )
+        # Print the intent states
+        intents = []
+        intents.append( ONOS1Intents )
+        intents.append( ONOS2Intents )
+        intents.append( ONOS3Intents )
+        intents.append( ONOS4Intents )
+        intents.append( ONOS5Intents )
+        intents.append( ONOS6Intents )
+        intents.append( ONOS7Intents )
+        intentStates = []
+        for node in intents:  # Iter through ONOS nodes
+            nodeStates = []
+            for intent in json.loads( node ):  # Iter through intents of a node
+                nodeStates.append( intent[ 'state' ] )
+            intentStates.append( nodeStates )
+            out = [ (i, nodeStates.count( i ) ) for i in set( nodeStates ) ]
+            main.log.info( dict( out ) )
+
 
         # NOTE: Hazelcast has no durability, so intents are lost across system
         # restarts
         main.step( "Compare current intents with intents before the failure" )
         # NOTE: this requires case 5 to pass for intentState to be set.
         #      maybe we should stop the test if that fails?
-        if intentState == ONOS1Intents:
+        sameIntents = main.TRUE
+        if intentState and intentState == ONOS1Intents:
             sameIntents = main.TRUE
             main.log.report( "Intents are consistent with before failure" )
         # TODO: possibly the states have changed? we may need to figure out
@@ -1454,7 +1493,6 @@
             for controller in range( 0, len( hosts ) ):
                 controllerStr = str( controller + 1 )
                 for host in hosts[ controller ]:
-                    host
                     if host[ 'ips' ] == []:
                         main.log.error(
                             "DEBUG:Error with host ips on controller" +
@@ -1608,7 +1646,7 @@
                 note = "note it takes about " + str( int( cliTime ) ) + \
                     " seconds for the test to make all the cli calls to fetch " +\
                     "the topology from each ONOS instance"
-                main.log.report(
+                main.log.info(
                     "Very crass estimate for topology discovery/convergence( " +
                     str( note ) + " ): " + str( elapsed ) + " seconds, " +
                     str( count ) + " tries" )
diff --git a/TestON/tests/HATestSingleInstanceRestart/HATestSingleInstanceRestart.py b/TestON/tests/HATestSingleInstanceRestart/HATestSingleInstanceRestart.py
index 39ce920..4b9b287 100644
--- a/TestON/tests/HATestSingleInstanceRestart/HATestSingleInstanceRestart.py
+++ b/TestON/tests/HATestSingleInstanceRestart/HATestSingleInstanceRestart.py
@@ -104,6 +104,9 @@
         cleanInstallResult = main.TRUE
         gitPullResult = main.TRUE
 
+        main.step( "Starting Mininet" )
+        main.Mininet1.startNet( )
+
         main.step( "Compiling the latest version of ONOS" )
         if PULLCODE:
             # TODO Configure branch in params
@@ -236,19 +239,36 @@
                 str( hex( i )[ 2: ] ).zfill( 2 ).upper()
             host2 = "00:00:00:00:00:" + \
                 str( hex( i + 10 )[ 2: ] ).zfill( 2 ).upper()
-            host1Id = main.ONOScli1.getHost( host1 )[ 'id' ]
-            host2Id = main.ONOScli1.getHost( host2 )[ 'id' ]
-            # NOTE: get host can return None
+            # NOTE: getHost can return None
+            host1Dict = main.ONOScli1.getHost( host1 )
+            host2Dict = main.ONOScli1.getHost( host2 )
+            host1Id = None
+            host2Id = None
+            if host1Dict and host2Dict:
+                host1Id = host1Dict.get( 'id', None )
+                host2Id = host2Dict.get( 'id', None )
             if host1Id and host2Id:
                 tmpResult = main.ONOScli1.addHostIntent(
                     host1Id,
                     host2Id )
             else:
                 main.log.error( "Error, getHost() failed" )
+                main.log.warn( json.dumps( json.loads( main.ONOScli1.hosts() ),
+                                           sort_keys=True,
+                                           indent=4,
+                                           separators=( ',', ': ' ) ) )
                 tmpResult = main.FALSE
             intentAddResult = bool( pingResult and intentAddResult
                                      and tmpResult )
             # TODO Check that intents were added?
+        # Print the intent states
+        intents = main.ONOScli1.intents( )
+        intentStates = []
+        for intent in json.loads( intents ):  # Iter through intents of a node
+            intentStates.append( intent.get( 'state', None ) )
+        out = [ (i, intentStates.count( i ) ) for i in set( intentStates ) ]
+        main.log.info( dict( out ) )
+
         utilities.assert_equals(
             expect=True,
             actual=intentAddResult,
@@ -562,6 +582,18 @@
             actual=intentCheck,
             onpass="Intents are consistent across all ONOS nodes",
             onfail="ONOS nodes have different views of intents" )
+        # Print the intent states
+        intents = []
+        intents.append( ONOS1Intents )
+        intentStates = []
+        for node in intents:  # Iter through ONOS nodes
+            nodeStates = []
+            for intent in json.loads( node ):  # Iter through intents of a node
+                nodeStates.append( intent[ 'state' ] )
+            intentStates.append( nodeStates )
+            out = [ (i, nodeStates.count( i ) ) for i in set( nodeStates ) ]
+            main.log.info( dict( out ) )
+
 
         # NOTE: Hazelcast has no durability, so intents are lost across system
         # restarts
@@ -569,7 +601,8 @@
         main.step( "Compare current intents with intents before the failure" )
         # NOTE: this requires case 5 to pass for intentState to be set.
         #      maybe we should stop the test if that fails?
-        if intentState == ONOS1Intents:
+        sameIntents = main.TRUE
+        if intentState and intentState == ONOS1Intents:
             sameIntents = main.TRUE
             main.log.report( "Intents are consistent with before failure" )
         # TODO: possibly the states have changed? we may need to figure out
@@ -770,7 +803,7 @@
         note = "note it takes about " + str( int( cliTime ) ) + \
             " seconds for the test to make all the cli calls to fetch " +\
             "the topology from each ONOS instance"
-        main.log.report(
+        main.log.info(
             "Very crass estimate for topology discovery/convergence( " +
             str( note ) + " ): " + str( elapsed ) + " seconds, " +
             str( count ) + " tries" )
diff --git a/TestON/tests/IntentPerfNext/IntentPerfNext.params b/TestON/tests/IntentPerfNext/IntentPerfNext.params
index 8909059..88f2bc7 100644
--- a/TestON/tests/IntentPerfNext/IntentPerfNext.params
+++ b/TestON/tests/IntentPerfNext/IntentPerfNext.params
@@ -1,5 +1,5 @@
 <PARAMS>
-    <testcases>1,4,5,2,3,4,5,2,3,4,5,2,3,4</testcases>
+    <testcases>1,4,5,4,5,4,5,4</testcases>
 
     <ENV>
         <cellName>intent_perf_test</cellName>
@@ -36,7 +36,7 @@
 
     <TEST>
         #Number of times to iterate each case
-        <numIter>3</numIter>
+        <numIter>8</numIter>
         <numIgnore>2</numIgnore>
         <numSwitch>8</numSwitch>
         <batchThresholdMin>0</batchThresholdMin>
diff --git a/TestON/tests/IntentPerfNext/IntentPerfNext.py b/TestON/tests/IntentPerfNext/IntentPerfNext.py
index 40a1276..c965612 100644
--- a/TestON/tests/IntentPerfNext/IntentPerfNext.py
+++ b/TestON/tests/IntentPerfNext/IntentPerfNext.py
@@ -37,13 +37,17 @@
         main.ONOSbench.onosUninstall( nodeIp=ONOS4Ip )
         main.ONOSbench.onosUninstall( nodeIp=ONOS5Ip )
         main.ONOSbench.onosUninstall( nodeIp=ONOS6Ip )
-        main.ONOSbench.onosUninstall( nodeIp=ONOS7Ip )
+        #TODO: Investigate why node 7 uninstall fails
+        #main.ONOSbench.onosUninstall( nodeIp=ONOS7Ip )
 
         MN1Ip = main.params[ 'MN' ][ 'ip1' ]
         BENCHIp = main.params[ 'BENCH' ][ 'ip' ]
 
         main.case( "Setting up test environment" )
 
+        main.step( "Starting mininet topology" )
+        main.Mininet1.startNet()
+
         main.step( "Creating cell file" )
         cellFileResult = main.ONOSbench.createCellFile(
             BENCHIp, cellName, MN1Ip,
@@ -724,7 +728,13 @@
                             line = line[ 1: ]
                             line = line.split( ": " )
                             main.log.info( "Line read: " + str( line ) )
-                            result = line[ 1 ].split( " " )[ 0 ]
+                            #Prevent split method if line doesn't have
+                            #space
+                            if " " in str(line):
+                                result = line[ 1 ].split( " " )[ 0 ]
+                            else:
+                                main.log.warn( "Empty line read" )
+                                result = 0
                             # TODO: add parameters before appending latency
                             if lineCount == 0:
                                 batchInstallLat.append( int( result ) )
@@ -732,6 +742,10 @@
                             elif lineCount == 1:
                                 batchWithdrawLat.append( int( result ) )
                                 withdrawResult = result
+                            else:
+                                main.log.warn("Invalid results")
+                                installResult = 'NA'
+                                withdrawResult = 'NA'
                             lineCount += 1
                     main.log.info( "Batch install latency for ONOS" +
                                    str( node ) + " with " +
@@ -757,16 +771,20 @@
                 time.sleep( 5 )
 
             if maxInstallLat:
-                avgInstallLat = str( sum( maxInstallLat ) /
-                                      len( maxInstallLat ) )
+                avgInstallLat = str( round(
+                                            sum( maxInstallLat ) /
+                                            len( maxInstallLat )
+                                          , 2 ))
             else:
                 avgInstallLat = "NA"
                 main.log.report( "Batch installation failed" )
                 assertion = main.FALSE
 
             if maxWithdrawLat:
-                avgWithdrawLat = str( sum( maxWithdrawLat ) /
-                                       len( maxWithdrawLat ) )
+                avgWithdrawLat = str( round(
+                                            sum( maxWithdrawLat ) /
+                                            len( maxWithdrawLat )
+                                            , 2 ))
             else:
                 avgWithdrawLat = "NA"
                 main.log.report( "Batch withdraw failed" )
@@ -776,18 +794,28 @@
                              "of size " + str( batchIntentSize ) + ": " +
                              str( avgInstallLat ) + " ms" )
             main.log.report( "Std Deviation of batch installation latency " +
-                             ": " + str( numpy.std( maxInstallLat ) ) + " ms" )
+                             ": " +
+                             str( round(numpy.std( maxInstallLat ),2)) +
+                             " ms" )
 
             main.log.report( "Avg of batch withdraw latency " +
                              "of size " + str( batchIntentSize ) + ": " +
                              str( avgWithdrawLat ) + " ms" )
             main.log.report( "Std Deviation of batch withdraw latency " +
                              ": " +
-                             str( numpy.std( maxWithdrawLat ) ) +
+                             str( round(numpy.std( maxWithdrawLat ),2)) +
                              " ms" )
 
-            batchIntentSize = batchIntentSize + 1000
-            main.log.report( "Increasing batch intent size to " +
+            if batch == 0:
+                batchIntentSize = 10
+            elif batch == 1:
+                batchIntentSize = 100
+            elif batch == 2:
+                batchIntentSize = 1000
+            elif batch == 3:
+                batchIntentSize = 2000
+            if batch < 4:
+                main.log.report( "Increasing batch intent size to " +
                              str(batchIntentSize) )
 
         #main.log.info( "Removing all intents for next test case" )
diff --git a/TestON/tests/MultiProd/MultiProd.py b/TestON/tests/MultiProd/MultiProd.py
index d3ed757..52519d8 100644
--- a/TestON/tests/MultiProd/MultiProd.py
+++ b/TestON/tests/MultiProd/MultiProd.py
@@ -55,7 +55,7 @@
         main.step( "Git checkout, pull and get version" )
         #main.ONOSbench.gitCheckout( "master" )
         gitPullResult = main.ONOSbench.gitPull()
-        print "git_pull_result = ", gitPullResult
+        main.log.info( "git_pull_result = " + str( gitPullResult ))
         versionResult = main.ONOSbench.getVersion( report=True )
 
         if gitPullResult == 1:
@@ -106,6 +106,12 @@
         print startcli2
         print startcli3
 
+        # Starting the mininet using the old way
+        main.step( "Starting Mininet ..." )
+        netIsUp = main.Mininet1.startNet()
+        if netIsUp:
+            main.log.info("Mininet CLI is up")
+
         case1Result = ( packageResult and
                         cellResult and verifyResult and onosInstallResult and
                         onosIsup and startResult )
diff --git a/TestON/tests/MultiProd13/MultiProd13.py b/TestON/tests/MultiProd13/MultiProd13.py
index d3ed757..52519d8 100644
--- a/TestON/tests/MultiProd13/MultiProd13.py
+++ b/TestON/tests/MultiProd13/MultiProd13.py
@@ -55,7 +55,7 @@
         main.step( "Git checkout, pull and get version" )
         #main.ONOSbench.gitCheckout( "master" )
         gitPullResult = main.ONOSbench.gitPull()
-        print "git_pull_result = ", gitPullResult
+        main.log.info( "git_pull_result = " + str( gitPullResult ))
         versionResult = main.ONOSbench.getVersion( report=True )
 
         if gitPullResult == 1:
@@ -106,6 +106,12 @@
         print startcli2
         print startcli3
 
+        # Starting the mininet using the old way
+        main.step( "Starting Mininet ..." )
+        netIsUp = main.Mininet1.startNet()
+        if netIsUp:
+            main.log.info("Mininet CLI is up")
+
         case1Result = ( packageResult and
                         cellResult and verifyResult and onosInstallResult and
                         onosIsup and startResult )
diff --git a/TestON/tests/PingallExample/PingallExample.params b/TestON/tests/PingallExample/PingallExample.params
index 85a576e..aecaab6 100644
--- a/TestON/tests/PingallExample/PingallExample.params
+++ b/TestON/tests/PingallExample/PingallExample.params
@@ -1,22 +1,12 @@
 <PARAMS>
     <testcases>1,2,3</testcases>
     <ENV>
-        <cellName>kelvin</cellName>
+        <cellName>HA</cellName>
     </ENV>
     <Git>True</Git>
 
-    <TOPO1>
-        <file>~/mininet/examples/attTopo.py</file>
-        <args>--mac</args>
-    </TOPO1>
-
-    <TOPO2>
-        <file></file>
-        <args></args>
-    </TOPO2>
-
     <CTRL>
-        <ip1>10.128.10.21</ip1>
+        <ip1>10.128.30.11</ip1>
         <port1>6633</port1>
     </CTRL>
 </PARAMS>
diff --git a/TestON/tests/PingallExample/PingallExample.topo b/TestON/tests/PingallExample/PingallExample.topo
index a50b8d3..1712756 100644
--- a/TestON/tests/PingallExample/PingallExample.topo
+++ b/TestON/tests/PingallExample/PingallExample.topo
@@ -2,36 +2,34 @@
     <COMPONENT>
 
         <ONOSbench>
-            <host>10.128.10.20</host>
+            <host>10.128.30.10</host>
             <user>admin</user>
-            <password>onos_test</password>
+            <password></password>
             <type>OnosDriver</type>
             <connect_order>1</connect_order>
-            <COMPONENTS>
-                <home>~/onos</home>
-            </COMPONENTS>
+            <COMPONENTS> </COMPONENTS>
         </ONOSbench>
 
         <ONOScli1>
-            <host>10.128.10.20</host>
+            <host>10.128.30.10</host>
             <user>admin</user>
-            <password>onos_test</password>
+            <password></password>
             <type>OnosCliDriver</type>
             <connect_order>2</connect_order>
             <COMPONENTS> </COMPONENTS>
         </ONOScli1>
 
         <ONOS1>
-            <host>10.128.10.21</host>
-            <user>admin</user>
-            <password>onos_test</password>
+            <host>10.128.30.11</host>
+            <user>sdn</user>
+            <password>rocks</password>
             <type>OnosDriver</type>
             <connect_order>3</connect_order>
             <COMPONENTS> </COMPONENTS>
         </ONOS1>
 
         <Mininet1>
-            <host>10.128.10.20</host>
+            <host>10.128.30.9</host>
             <user>admin</user>
             <password></password>
             <type>MininetCliDriver</type>
diff --git a/TestON/tests/ProdFunc/ProdFunc.py b/TestON/tests/ProdFunc/ProdFunc.py
index 5e31df3..645ae22 100755
--- a/TestON/tests/ProdFunc/ProdFunc.py
+++ b/TestON/tests/ProdFunc/ProdFunc.py
@@ -17,6 +17,7 @@
         self.default = ''
 
     def CASE1( self, main ):
+        import time
         """
         Startup sequence:
         cell <name>
@@ -46,7 +47,7 @@
         main.step( "Git checkout and get version" )
         #main.ONOSbench.gitCheckout( "master" )
         gitPullResult = main.ONOSbench.gitPull()
-        main.log.info( "git_pull_result = " + gitPullResult )
+        main.log.info( "git_pull_result = " + str( gitPullResult ))
         main.ONOSbench.getVersion( report=True )
 
         if gitPullResult == 1:
@@ -78,7 +79,14 @@
         startResult = main.ONOSbench.onosStart( ONOS1Ip )
 
         main.ONOS2.startOnosCli( ONOSIp=main.params[ 'CTRL' ][ 'ip1' ] )
-
+        main.step( "Starting Mininet CLI..." )
+        
+        # Starting the mininet using the old way
+        main.step( "Starting Mininet ..." )
+        netIsUp = main.Mininet1.startNet()
+        if netIsUp:
+            main.log.info("Mininet CLI is up")
+        
         case1Result = ( packageResult and
                         cellResult and verifyResult
                         and onosInstallResult and
@@ -184,6 +192,7 @@
         main.case( "Disconnecting mininet and restarting ONOS" )
         main.step( "Disconnecting mininet and restarting ONOS" )
         mininetDisconnect = main.Mininet1.disconnect()
+        print "mininetDisconnect = ", mininetDisconnect        
 
         main.step( "Removing raft logs before a clen installation of ONOS" )
         main.ONOSbench.onosRemoveRaftLogs()
@@ -271,7 +280,7 @@
 
         print "devices_result = ", devicesResult
         devicesLinewise = devicesResult.split( "\n" )
-        devicesLinewise = devicesLinewise[ 1:-1 ]
+        devicesLinewise = devicesLinewise[ 1: ]
         roadmCount = 0
         packetLayerSWCount = 0
         for line in devicesLinewise:
@@ -631,11 +640,10 @@
 
         main.step( "Pingall" )
         pingResult = main.FALSE
-        while pingResult == main.FALSE:
-            time1 = time.time()
-            pingResult = main.Mininet1.pingall()
-            time2 = time.time()
-            print "Time for pingall: %2f seconds" % ( time2 - time1 )
+        time1 = time.time()
+        pingResult = main.Mininet1.pingall()
+        time2 = time.time()
+        print "Time for pingall: %2f seconds" % ( time2 - time1 )
 
         # Start onos cli again because u might have dropped out of
         # onos prompt to the shell prompt
@@ -734,6 +742,8 @@
             host1Id = main.ONOS2.getHost( host1 )[ 'id' ]
             host2Id = main.ONOS2.getHost( host2 )[ 'id' ]
             main.ONOS2.addHostIntent( host1Id, host2Id )
+            hIntents = main.ONOS2.intents( jsonFormat=False )
+            main.log.info( "intents:" + hIntents )
 
         time.sleep( 10 )
         hIntents = main.ONOS2.intents( jsonFormat=False )
@@ -1055,17 +1065,17 @@
 
     def CASE8( self ):
         """
-        Host intents removal
+        Intent removal
         """
+        import time
         main.log.report( "This testcase removes any previously added intents" +
-                         " before adding the same intents or point intents" )
+                         " before adding any new set of intents" )
         main.log.report( "__________________________________" )
-        main.log.info( "Host intents removal" )
-        main.case( "Removing host intents" )
+        main.log.info( "intent removal" )
+        main.case( "Removing installed intents" )
         main.step( "Obtain the intent id's" )
         intentResult = main.ONOS2.intents( jsonFormat=False )
         main.log.info( "intent_result = " + intentResult )
-
         intentLinewise = intentResult.split( "\n" )
         intentList = []
         for line in intentLinewise:
@@ -1113,11 +1123,11 @@
             # Note: If the ping result failed, that means the intents have been
             # withdrawn correctly.
         if PingResult == main.TRUE:
-            main.log.report( "Host intents have not been withdrawn correctly" )
+            main.log.report( "Installed intents have not been withdrawn correctly" )
             # main.cleanup()
             # main.exit()
         if PingResult == main.FALSE:
-            main.log.report( "Host intents have been withdrawn correctly" )
+            main.log.report( "Installed intents have been withdrawn correctly" )
 
         case8Result = case8Result and PingResult
 
@@ -1332,8 +1342,7 @@
             "___________________________________________________________" )
 
         flowHandle = main.ONOS2.flows()
-        # print "flowHandle = ", flowHandle
-        main.log.info( "flows :" + flowHandle )
+        #main.log.info( "flows :" + flowHandle )
 
         count = 1
         i = 8
diff --git a/TestON/tests/ProdFunc/ProdFunc.topo b/TestON/tests/ProdFunc/ProdFunc.topo
index 7dff686..c3fe280 100755
--- a/TestON/tests/ProdFunc/ProdFunc.topo
+++ b/TestON/tests/ProdFunc/ProdFunc.topo
@@ -91,13 +91,5 @@
             </COMPONENTS>
         </LincOE2>
 
-        <LincOE3>
-            <host>10.128.20.30</host>
-            <user>admin</user>
-            <password>onos_test</password>
-            <type>LincOEDriver</type>
-            <connect_order>9</connect_order>
-        </LincOE3>
- 
     </COMPONENT>
 </TOPOLOGY>
diff --git a/TestON/tests/ProdFunc13/ProdFunc13.py b/TestON/tests/ProdFunc13/ProdFunc13.py
index b1246c2..13dc26d 100644
--- a/TestON/tests/ProdFunc13/ProdFunc13.py
+++ b/TestON/tests/ProdFunc13/ProdFunc13.py
@@ -17,6 +17,7 @@
         self.default = ''
 
     def CASE1( self, main ):
+        import time
         """
         Startup sequence:
         cell <name>
@@ -43,10 +44,10 @@
         main.step( "Removing raft logs before a clen installation of ONOS" )
         main.ONOSbench.onosRemoveRaftLogs()
 
-        main.step( "Git checkout, pull and get version" )
+        main.step( "Git checkout and get version" )
         #main.ONOSbench.gitCheckout( "master" )
         gitPullResult = main.ONOSbench.gitPull()
-        main.log.info( "git_pull_result = " + gitPullResult )
+        main.log.info( "git_pull_result = " + str( gitPullResult ))
         main.ONOSbench.getVersion( report=True )
 
         if gitPullResult == 1:
@@ -78,7 +79,14 @@
         startResult = main.ONOSbench.onosStart( ONOS1Ip )
 
         main.ONOS2.startOnosCli( ONOSIp=main.params[ 'CTRL' ][ 'ip1' ] )
-
+        main.step( "Starting Mininet CLI..." )
+        
+        # Starting the mininet using the old way
+        main.step( "Starting Mininet ..." )
+        netIsUp = main.Mininet1.startNet()
+        if netIsUp:
+            main.log.info("Mininet CLI is up")
+        
         case1Result = ( packageResult and
                         cellResult and verifyResult
                         and onosInstallResult and
@@ -184,6 +192,7 @@
         main.case( "Disconnecting mininet and restarting ONOS" )
         main.step( "Disconnecting mininet and restarting ONOS" )
         mininetDisconnect = main.Mininet1.disconnect()
+        print "mininetDisconnect = ", mininetDisconnect        
 
         main.step( "Removing raft logs before a clen installation of ONOS" )
         main.ONOSbench.onosRemoveRaftLogs()
@@ -271,7 +280,7 @@
 
         print "devices_result = ", devicesResult
         devicesLinewise = devicesResult.split( "\n" )
-        devicesLinewise = devicesLinewise[ 1:-1 ]
+        devicesLinewise = devicesLinewise[ 1: ]
         roadmCount = 0
         packetLayerSWCount = 0
         for line in devicesLinewise:
@@ -631,11 +640,10 @@
 
         main.step( "Pingall" )
         pingResult = main.FALSE
-        while pingResult == main.FALSE:
-            time1 = time.time()
-            pingResult = main.Mininet1.pingall()
-            time2 = time.time()
-            print "Time for pingall: %2f seconds" % ( time2 - time1 )
+        time1 = time.time()
+        pingResult = main.Mininet1.pingall()
+        time2 = time.time()
+        print "Time for pingall: %2f seconds" % ( time2 - time1 )
 
         # Start onos cli again because u might have dropped out of
         # onos prompt to the shell prompt
@@ -734,6 +742,8 @@
             host1Id = main.ONOS2.getHost( host1 )[ 'id' ]
             host2Id = main.ONOS2.getHost( host2 )[ 'id' ]
             main.ONOS2.addHostIntent( host1Id, host2Id )
+            hIntents = main.ONOS2.intents( jsonFormat=False )
+            main.log.info( "intents:" + hIntents )
 
         time.sleep( 10 )
         hIntents = main.ONOS2.intents( jsonFormat=False )
@@ -1055,17 +1065,17 @@
 
     def CASE8( self ):
         """
-        Host intents removal
+        Intent removal
         """
+        import time
         main.log.report( "This testcase removes any previously added intents" +
-                         " before adding the same intents or point intents" )
+                         " before adding any new set of intents" )
         main.log.report( "__________________________________" )
-        main.log.info( "Host intents removal" )
-        main.case( "Removing host intents" )
+        main.log.info( "intent removal" )
+        main.case( "Removing installed intents" )
         main.step( "Obtain the intent id's" )
         intentResult = main.ONOS2.intents( jsonFormat=False )
         main.log.info( "intent_result = " + intentResult )
-
         intentLinewise = intentResult.split( "\n" )
         intentList = []
         for line in intentLinewise:
@@ -1113,11 +1123,11 @@
             # Note: If the ping result failed, that means the intents have been
             # withdrawn correctly.
         if PingResult == main.TRUE:
-            main.log.report( "Host intents have not been withdrawn correctly" )
+            main.log.report( "Installed intents have not been withdrawn correctly" )
             # main.cleanup()
             # main.exit()
         if PingResult == main.FALSE:
-            main.log.report( "Host intents have been withdrawn correctly" )
+            main.log.report( "Installed intents have been withdrawn correctly" )
 
         case8Result = case8Result and PingResult
 
@@ -1136,9 +1146,9 @@
         main.log.report( "__________________________________" )
         main.log.info( "Adding point intents" )
         main.case(
-            '''Adding bidirectional point for mn hosts
-            ( h8-h18, h9-h19, h10-h20, h11-h21, h12-h22,
-                h13-h23, h14-h24, h15-h25, h16-h26, h17-h27 )''' )
+            "Adding bidirectional point for mn hosts" +
+            "( h8-h18, h9-h19, h10-h20, h11-h21, h12-h22, " +
+            "h13-h23, h14-h24, h15-h25, h16-h26, h17-h27 )" )
 
         main.step( "Add point intents for mn hosts h8 and h18 or" +
                    "ONOS hosts h8 and h12" )
@@ -1332,8 +1342,7 @@
             "___________________________________________________________" )
 
         flowHandle = main.ONOS2.flows()
-        # print "flowHandle = ", flowHandle
-        main.log.info( "flows :" + flowHandle )
+        #main.log.info( "flows :" + flowHandle )
 
         count = 1
         i = 8
diff --git a/TestON/tests/ProdFunc13/ProdFunc13.topo b/TestON/tests/ProdFunc13/ProdFunc13.topo
index c592e18..11a2e6c 100755
--- a/TestON/tests/ProdFunc13/ProdFunc13.topo
+++ b/TestON/tests/ProdFunc13/ProdFunc13.topo
@@ -91,13 +91,5 @@
             </COMPONENTS>
         </LincOE2>
 
-        <LincOE3>
-            <host>10.128.20.30</host>
-            <user>admin</user>
-            <password>onos_test</password>
-            <type>LincOEDriver</type>
-            <connect_order>9</connect_order>
-        </LincOE3>
- 
     </COMPONENT>
 </TOPOLOGY>
diff --git a/TestON/tests/TopoPerfNext/TopoPerfNext.py b/TestON/tests/TopoPerfNext/TopoPerfNext.py
index d0b66c9..24e3c9f 100644
--- a/TestON/tests/TopoPerfNext/TopoPerfNext.py
+++ b/TestON/tests/TopoPerfNext/TopoPerfNext.py
@@ -63,6 +63,9 @@
 
         main.log.report( "Setting up test environment" )
 
+        main.step( "Starting mininet topology " )
+        main.Mininet1.startNet()
+
         main.step( "Cleaning previously installed ONOS if any" )
         main.ONOSbench.onosUninstall( nodeIp=ONOS2Ip )
         main.ONOSbench.onosUninstall( nodeIp=ONOS3Ip )
@@ -309,7 +312,7 @@
             main.log.info( "Object read in from OFP capture: " +
                            str( lineOfp ) )
 
-            if len( lineOfp ) > 1:
+            if len( obj ) > 1:
                 t0Ofp = float( obj[ 1 ] ) * 1000.0
             else:
                 main.log.error( "Tshark output file for OFP" +