Merge "Bgpls scripts updated with Links"
diff --git a/TestON/README.md b/TestON/README.md
index fdb9200..5335503 100644
--- a/TestON/README.md
+++ b/TestON/README.md
@@ -45,7 +45,7 @@
 
        resides into "TestON-master" directory as following:
 
-            paxterra@paxterra-desktop:~/TestON/bin$ ./cli.py
+            sdn@test-station:~/TestON/bin$ ./cli.py
             teston>run MininetTest
 
   2. TAI (Test Authoring Interface) UI based :
@@ -61,7 +61,7 @@
 --------
 For more examples, refer 'examples' directory.
 Please find the below link for examples:
-     https://github.com/Paxterra/TestON/tree/TestOn-1.0.0/examples
+     https://github.com/opennetworkinglab/OnosSystemTest/tree/master/TestON/examples
 
 
 
diff --git a/TestON/bin/cli.py b/TestON/bin/cli.py
index f29a8ec..13423a5 100755
--- a/TestON/bin/cli.py
+++ b/TestON/bin/cli.py
@@ -1,10 +1,11 @@
 #!/usr/bin/env python
 '''
 Created on 20-Dec-2012
+Modified 2016 by ON.Lab
 
-@author: Anil Kumar (anilkumar.s@paxterrasolutions.com)
-
-
+Please refer questions to either the onos test mailing list at <onos-test@onosproject.org>,
+the System Testing Plans and Results wiki page at <https://wiki.onosproject.org/x/voMg>,
+or the System Testing Guide page at <https://wiki.onosproject.org/x/WYQg>
 
     TestON is free software: you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
@@ -261,20 +262,24 @@
         '''
         options = self.initOptions(options)
         try :
-            for index, option in enumerate(args):
+            index = 0
+            while index < len( args ):
+                option = args[index]
                 if index > 0 :
-                    if re.match("logdir|mail|example|testdir|testcases|onoscell", option, flags = 0):
-                        index = index+1
-                        options[option] = args[index]
-                        options = self.testcasesInRange(index,option,args,options)
-                    elif re.match("--params", option, flags=0):
+                    if re.match("--params", option, flags=0):
                         # check if there is a params
-                        index = index + 1
-                        options['params'].append(args[index])
+                        options['params'].append(args[index+1])
+                    elif re.match("logdir|mail|example|testdir|testcases|onoscell", option, flags = 0):
+                        options[option] = args[index+1]
+                        options = self.testcasesInRange(index+1,option,args,options)
+                    index += 2
                 else :
                     options['testname'] = option
+                    index += 1
         except IndexError as e:
-            print e
+            print (e)
+            main.cleanup()
+            main.exit()
 
         return options
 
diff --git a/TestON/core/graph.py b/TestON/core/graph.py
index c893adc..e8c8a7a 100644
--- a/TestON/core/graph.py
+++ b/TestON/core/graph.py
@@ -1,4 +1,13 @@
 #!/usr/bin/env python
+"""
+Created 2016 by ON.Lab
+
+Please refer questions to either the onos test mailing list at <onos-test@onosproject.org>,
+the System Testing Plans and Results wiki page at <https://wiki.onosproject.org/x/voMg>,
+or the System Testing Guide page at <https://wiki.onosproject.org/x/WYQg>
+"""
+
+
 import time
 import random
 
@@ -126,8 +135,9 @@
                                                                                                                                    attributeValueA,
                                                                                                                                    attributeValueB ) )
             if not result:
-                main.log.debug( "Graph: graphDictA: {}".format( graphDictA ) )
-                main.log.debug( "Graph: graphDictB: {}".format( graphDictB ) )
+                #main.log.debug( "Graph: graphDictA: {}".format( graphDictA ) )
+                #main.log.debug( "Graph: graphDictB: {}".format( graphDictB ) )
+                pass
             return result
         except TypeError:
             main.log.exception( "Graph: TypeError exception found" )
@@ -158,7 +168,7 @@
             for chain in self.chains:
                 for edge in chain:
                     nonCutEdges.append( edge )
-            main.log.debug( 'Non-cut-edges: {}'.format( nonCutEdges ) )
+            #main.log.debug( 'Non-cut-edges: {}'.format( nonCutEdges ) )
             return nonCutEdges
         except Exception:
             main.log.exception( "Graph: Uncaught exception" )
@@ -182,14 +192,14 @@
                 # chain, the chain is a cycle chain
                 if chain[ 0 ][ 0 ] == chain[ -1 ][ 1 ]:
                     cycleChains.append( chain )
-            main.log.debug( 'Cycle chains: {}'.format( cycleChains ) )
+            #main.log.debug( 'Cycle chains: {}'.format( cycleChains ) )
             # Get a set of vertices which are the first vertices of a cycle chain (excluding the first
             # cycle chain), and these vertices are a subset of all cut-vertices
             subsetOfCutVertices = []
             if len( cycleChains ) > 1:
                 for cycleChain in cycleChains[ 1: ]:
                     subsetOfCutVertices.append( cycleChain[ 0 ][ 0 ] )
-            main.log.debug( 'Subset of cut vertices: {}'.format( subsetOfCutVertices ) )
+            #main.log.debug( 'Subset of cut vertices: {}'.format( subsetOfCutVertices ) )
             nonCutVertices = []
             assert nonCutEdges != None
             for vertex in self.graphDict.keys():
@@ -204,7 +214,7 @@
                         break
                 if vertexIsNonCut:
                     nonCutVertices.append( vertex )
-            main.log.debug( 'Non-cut-vertices: {}'.format( nonCutVertices ) )
+            #main.log.debug( 'Non-cut-vertices: {}'.format( nonCutVertices ) )
             return nonCutVertices
         except KeyError:
             main.log.exception( "Graph: KeyError exception found" )
diff --git a/TestON/core/logger.py b/TestON/core/logger.py
index 05693ba..79f7c7f 100644
--- a/TestON/core/logger.py
+++ b/TestON/core/logger.py
@@ -1,8 +1,11 @@
 #/usr/bin/env python
 '''
 Created on 07-Jan-2013
+Modified 2015 by ON.Lab
 
-@author: Raghav Kashyap(raghavkashyap@paxterrasolutions.com)
+Please refer questions to either the onos test mailing list at <onos-test@onosproject.org>,
+the System Testing Plans and Results wiki page at <https://wiki.onosproject.org/x/voMg>,
+or the System Testing Guide page at <https://wiki.onosproject.org/x/WYQg>
 
     TestON is free software: you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
diff --git a/TestON/core/openspeak.py b/TestON/core/openspeak.py
index 3794910..b98c68b 100644
--- a/TestON/core/openspeak.py
+++ b/TestON/core/openspeak.py
@@ -1,9 +1,11 @@
 #/usr/bin/env python
 '''
 Created on 20-Dec-2012
+Modified 2015 by ON.Lab
 
-@author: Raghav Kashyap(raghavkashyap@paxterrasolutions.com)
-
+Please refer questions to either the onos test mailing list at <onos-test@onosproject.org>,
+the System Testing Plans and Results wiki page at <https://wiki.onosproject.org/x/voMg>,
+or the System Testing Guide page at <https://wiki.onosproject.org/x/WYQg>
 
     TestON is free software: you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
diff --git a/TestON/core/teston.py b/TestON/core/teston.py
index a770490..e3b50a5 100644
--- a/TestON/core/teston.py
+++ b/TestON/core/teston.py
@@ -1,9 +1,11 @@
 #!/usr/bin/env python
 '''
 Created on 22-Oct-2012
+Modified 2016 by ON.Lab
 
-@author: Anil Kumar (anilkumar.s@paxterrasolutions.com)
-
+Please refer questions to either the onos test mailing list at <onos-test@onosproject.org>,
+the System Testing Plans and Results wiki page at <https://wiki.onosproject.org/x/voMg>,
+or the System Testing Guide page at <https://wiki.onosproject.org/x/WYQg>
 
     TestON is free software: you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
@@ -412,7 +414,7 @@
         argument is given.
 
         Optional Arguments:
-            result: Case insensite string. Can be 'PASS' or 'FAIL' and will set
+            result: Case insensitive string. Can be 'PASS' or 'FAIL' and will set
                     the case result accordingly.
             msg: Message to be printed when the case is skipped in the reports.
         """
@@ -949,7 +951,7 @@
             if not re.search( ".=.", param ):
                 print( "Error when parsing params: params should follow key=value format" )
                 continue
-            # Split the param string to netest keys and value
+            # Split the param string to catch nested keys and the value
             [ keys, value ] = param.split( "=" )
             # Split the nested keys according to its hierarchy
             keyList = keys.split( "/" )
diff --git a/TestON/core/testparser.py b/TestON/core/testparser.py
index aab4388..904ebc0 100644
--- a/TestON/core/testparser.py
+++ b/TestON/core/testparser.py
@@ -1,9 +1,11 @@
 #!/usr/bin/env python
 '''
 Created on 26-Dec-2012
+Modified 2015 by ON.Lab
 
-@author: Anil Kumar (anilkumar.s@paxterrasolutions.com)
-
+Please refer questions to either the onos test mailing list at <onos-test@onosproject.org>,
+the System Testing Plans and Results wiki page at <https://wiki.onosproject.org/x/voMg>,
+or the System Testing Guide page at <https://wiki.onosproject.org/x/WYQg>
 
     TestON is free software: you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
diff --git a/TestON/core/utilities.py b/TestON/core/utilities.py
index ce502cb..43d56dc 100644
--- a/TestON/core/utilities.py
+++ b/TestON/core/utilities.py
@@ -1,11 +1,11 @@
 #!/usr/bin/env python
 '''
 Created on 23-Oct-2012
+Modified 2015 by ON.Lab
 
-@authors: Anil Kumar (anilkumar.s@paxterrasolutions.com),
-          Raghav Kashyap(raghavkashyap@paxterrasolutions.com)
-
-
+Please refer questions to either the onos test mailing list at <onos-test@onosproject.org>,
+the System Testing Plans and Results wiki page at <https://wiki.onosproject.org/x/voMg>,
+or the System Testing Guide page at <https://wiki.onosproject.org/x/WYQg>
 
     TestON is free software: you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
diff --git a/TestON/core/xmldict.py b/TestON/core/xmldict.py
index 8d1dcf4..0746f3a 100644
--- a/TestON/core/xmldict.py
+++ b/TestON/core/xmldict.py
@@ -1,5 +1,10 @@
 '''
 Created on 03-Dec-2012
+Modified 2015 by ON.Lab
+
+Please refer questions to either the onos test mailing list at <onos-test@onosproject.org>,
+the System Testing Plans and Results wiki page at <https://wiki.onosproject.org/x/voMg>,
+or the System Testing Guide page at <https://wiki.onosproject.org/x/WYQg>
 
 @author: Anil Kumar (anilkumar.s@paxterrasolutions.com)
 
diff --git a/TestON/core/xmlparser.py b/TestON/core/xmlparser.py
index f12f69c..e639d57 100644
--- a/TestON/core/xmlparser.py
+++ b/TestON/core/xmlparser.py
@@ -1,6 +1,11 @@
 #/usr/bin/env python
 '''
 Created on 07-Jan-2013
+Modified 2015 by ON.Lab
+
+Please refer questions to either the onos test mailing list at <onos-test@onosproject.org>,
+the System Testing Plans and Results wiki page at <https://wiki.onosproject.org/x/voMg>,
+or the System Testing Guide page at <https://wiki.onosproject.org/x/WYQg>
 
 @author: Raghav Kashyap(raghavkashyap@paxterrasolutions.com)
 
diff --git a/TestON/drivers/common/api/controller/onosrestdriver.py b/TestON/drivers/common/api/controller/onosrestdriver.py
index ff3d2e4..08f541e 100644
--- a/TestON/drivers/common/api/controller/onosrestdriver.py
+++ b/TestON/drivers/common/api/controller/onosrestdriver.py
@@ -1,6 +1,11 @@
 #!/usr/bin/env python
 """
 Created on 07-08-2015
+Modified 2016 by ON.Lab
+
+Please refer questions to either the onos test mailing list at <onos-test@onosproject.org>,
+the System Testing Plans and Results wiki page at <https://wiki.onosproject.org/x/voMg>,
+or the System Testing Guide page at <https://wiki.onosproject.org/x/WYQg>
 
     TestON is free software: you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
diff --git a/TestON/drivers/common/api/controllerdriver.py b/TestON/drivers/common/api/controllerdriver.py
index 1c3b3b8..6cda814 100644
--- a/TestON/drivers/common/api/controllerdriver.py
+++ b/TestON/drivers/common/api/controllerdriver.py
@@ -1,6 +1,11 @@
 #!/usr/bin/env python
 """
 Created on 29-Nov-2012
+Modified 2015 by ON.Lab
+
+Please refer questions to either the onos test mailing list at <onos-test@onosproject.org>,
+the System Testing Plans and Results wiki page at <https://wiki.onosproject.org/x/voMg>,
+or the System Testing Guide page at <https://wiki.onosproject.org/x/WYQg>
 
 author:: Anil Kumar ( anilkumar.s@paxterrasolutions.com )
 
diff --git a/TestON/drivers/common/api/dockerapidriver.py b/TestON/drivers/common/api/dockerapidriver.py
index 4a874c6..10743da 100644
--- a/TestON/drivers/common/api/dockerapidriver.py
+++ b/TestON/drivers/common/api/dockerapidriver.py
@@ -1,4 +1,11 @@
 #!/usr/bin/env python
+"""
+Modified 2016 by ON.Lab
+
+Please refer questions to either the onos test mailing list at <onos-test@onosproject.org>,
+the System Testing Plans and Results wiki page at <https://wiki.onosproject.org/x/voMg>,
+or the System Testing Guide page at <https://wiki.onosproject.org/x/WYQg>
+"""
 
 import json
 import os
@@ -201,7 +208,7 @@
         """
         rmResult = main.TRUE
 
-        if self.dockerClient.images() is []: 
+        if self.dockerClient.images() is []:
             main.log.info( "No docker image found with RepoTags: " + image )
             return rmResult
         else:
diff --git a/TestON/drivers/common/api/fvtapidriver.py b/TestON/drivers/common/api/fvtapidriver.py
index 892eef9..f861f7d 100644
--- a/TestON/drivers/common/api/fvtapidriver.py
+++ b/TestON/drivers/common/api/fvtapidriver.py
@@ -1,6 +1,11 @@
 #!/usr/bin/env python
 """
 Created on 26-Oct-2012
+Modified 2015 by ON.Lab
+
+Please refer questions to either the onos test mailing list at <onos-test@onosproject.org>,
+the System Testing Plans and Results wiki page at <https://wiki.onosproject.org/x/voMg>,
+or the System Testing Guide page at <https://wiki.onosproject.org/x/WYQg>
 
 author:: Anil Kumar ( anilkumar.s@paxterrasolutions.com )
 
diff --git a/TestON/drivers/common/apidriver.py b/TestON/drivers/common/apidriver.py
index af66d98..166211e 100644
--- a/TestON/drivers/common/apidriver.py
+++ b/TestON/drivers/common/apidriver.py
@@ -1,6 +1,11 @@
 #!/usr/bin/env python
 """
 Created on 22-Nov-2012
+Modified 2015 by ON.Lab
+
+Please refer questions to either the onos test mailing list at <onos-test@onosproject.org>,
+the System Testing Plans and Results wiki page at <https://wiki.onosproject.org/x/voMg>,
+or the System Testing Guide page at <https://wiki.onosproject.org/x/WYQg>
 
 author:: Anil Kumar ( anilkumar.s@paxterrasolutions.com )
 
diff --git a/TestON/drivers/common/cli/dpclidriver.py b/TestON/drivers/common/cli/dpclidriver.py
index 23214b8..f3ea3e5 100644
--- a/TestON/drivers/common/cli/dpclidriver.py
+++ b/TestON/drivers/common/cli/dpclidriver.py
@@ -1,5 +1,10 @@
 """
 Driver for blank dataplane VMs. Created for SDNIP test.
+Modified 2015 by ON.Lab
+
+Please refer questions to either the onos test mailing list at <onos-test@onosproject.org>,
+the System Testing Plans and Results wiki page at <https://wiki.onosproject.org/x/voMg>,
+or the System Testing Guide page at <https://wiki.onosproject.org/x/WYQg>
 """
 import pexpect
 from drivers.common.clidriver import CLI
diff --git a/TestON/drivers/common/cli/emulator/flowvisordriver.py b/TestON/drivers/common/cli/emulator/flowvisordriver.py
index 6ec2ee6..35c0bbf 100644
--- a/TestON/drivers/common/cli/emulator/flowvisordriver.py
+++ b/TestON/drivers/common/cli/emulator/flowvisordriver.py
@@ -1,6 +1,11 @@
 #!/usr/bin/env python
 """
 Created on 26-Mar-2013
+Modified 2015 by ON.Lab
+
+Please refer questions to either the onos test mailing list at <onos-test@onosproject.org>,
+the System Testing Plans and Results wiki page at <https://wiki.onosproject.org/x/voMg>,
+or the System Testing Guide page at <https://wiki.onosproject.org/x/WYQg>
 
 author:: Anil Kumar ( anilkumar.s@paxterrasolutions.com )
 
diff --git a/TestON/drivers/common/cli/emulator/lincoedriver.py b/TestON/drivers/common/cli/emulator/lincoedriver.py
index ae3eef9..5024f17 100644
--- a/TestON/drivers/common/cli/emulator/lincoedriver.py
+++ b/TestON/drivers/common/cli/emulator/lincoedriver.py
@@ -13,6 +13,11 @@
     shreya@onlab.us
 
 OCT 20 2014
+Modified 2015 by ON.Lab
+
+Please refer questions to either the onos test mailing list at <onos-test@onosproject.org>,
+the System Testing Plans and Results wiki page at <https://wiki.onosproject.org/x/voMg>,
+or the System Testing Guide page at <https://wiki.onosproject.org/x/WYQg>
 """
 
 import pexpect
diff --git a/TestON/drivers/common/cli/emulator/lincoemininetdriver.py b/TestON/drivers/common/cli/emulator/lincoemininetdriver.py
index 7dfcb1e..1691ef8 100644
--- a/TestON/drivers/common/cli/emulator/lincoemininetdriver.py
+++ b/TestON/drivers/common/cli/emulator/lincoemininetdriver.py
@@ -16,7 +16,14 @@
 
 
 LincOEMininetDriver is an extension of the mininetclidriver to handle linc oe
+
+Modified 2016 by ON.Lab
+
+Please refer questions to either the onos test mailing list at <onos-test@onosproject.org>,
+the System Testing Plans and Results wiki page at <https://wiki.onosproject.org/x/voMg>,
+or the System Testing Guide page at <https://wiki.onosproject.org/x/WYQg>
 """
+
 import pexpect
 import re
 import sys
diff --git a/TestON/drivers/common/cli/emulator/mininetclidriver.py b/TestON/drivers/common/cli/emulator/mininetclidriver.py
index 1632fee..a587019 100644
--- a/TestON/drivers/common/cli/emulator/mininetclidriver.py
+++ b/TestON/drivers/common/cli/emulator/mininetclidriver.py
@@ -1,9 +1,11 @@
 #!/usr/bin/env python
 """
 Created on 26-Oct-2012
+Modified 2016 by ON.Lab
 
-author: Anil Kumar ( anilkumar.s@paxterrasolutions.com )
-
+Please refer questions to either the onos test mailing list at <onos-test@onosproject.org>,
+the System Testing Plans and Results wiki page at <https://wiki.onosproject.org/x/voMg>,
+or the System Testing Guide page at <https://wiki.onosproject.org/x/WYQg>
 
 TestON is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
diff --git a/TestON/drivers/common/cli/emulator/poxclidriver.py b/TestON/drivers/common/cli/emulator/poxclidriver.py
index 2d92139..02c43b1 100644
--- a/TestON/drivers/common/cli/emulator/poxclidriver.py
+++ b/TestON/drivers/common/cli/emulator/poxclidriver.py
@@ -1,6 +1,11 @@
 #!/usr/bin/env python
 """
 Created on 26-Oct-2012
+Modified 2015 by ON.Lab
+
+Please refer questions to either the onos test mailing list at <onos-test@onosproject.org>,
+the System Testing Plans and Results wiki page at <https://wiki.onosproject.org/x/voMg>,
+or the System Testing Guide page at <https://wiki.onosproject.org/x/WYQg>
 
 author:: Raghav Kashyap( raghavkashyap@paxterrasolutions.com )
 
diff --git a/TestON/drivers/common/cli/emulator/remotemininetdriver.py b/TestON/drivers/common/cli/emulator/remotemininetdriver.py
index cc75755..bf1c6c6 100644
--- a/TestON/drivers/common/cli/emulator/remotemininetdriver.py
+++ b/TestON/drivers/common/cli/emulator/remotemininetdriver.py
@@ -1,9 +1,11 @@
 #!/usr/bin/env python
 """
 Created on 26-Oct-2012
+Modified 2016 by ON.Lab
 
-author:: Anil Kumar ( anilkumar.s@paxterrasolutions.com )
-
+Please refer questions to either the onos test mailing list at <onos-test@onosproject.org>,
+the System Testing Plans and Results wiki page at <https://wiki.onosproject.org/x/voMg>,
+or the System Testing Guide page at <https://wiki.onosproject.org/x/WYQg>
 
     TestON is free software: you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
diff --git a/TestON/drivers/common/cli/emulator/scapyclidriver.py b/TestON/drivers/common/cli/emulator/scapyclidriver.py
index 39c5c4d..456e565 100644
--- a/TestON/drivers/common/cli/emulator/scapyclidriver.py
+++ b/TestON/drivers/common/cli/emulator/scapyclidriver.py
@@ -1,6 +1,11 @@
 #!/usr/bin/env python
 """
 2015-2016
+Modified 2016 by ON.Lab
+
+Please refer questions to either the onos test mailing list at <onos-test@onosproject.org>,
+the System Testing Plans and Results wiki page at <https://wiki.onosproject.org/x/voMg>,
+or the System Testing Guide page at <https://wiki.onosproject.org/x/WYQg>
 
 TestON is free software: you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
diff --git a/TestON/drivers/common/cli/emulatordriver.py b/TestON/drivers/common/cli/emulatordriver.py
index fa0309e..fb7a80d 100644
--- a/TestON/drivers/common/cli/emulatordriver.py
+++ b/TestON/drivers/common/cli/emulatordriver.py
@@ -1,6 +1,11 @@
 #!/usr/bin/env python
 """
 Created on 26-Oct-2012
+Modified 2015 by ON.Lab
+
+Please refer questions to either the onos test mailing list at <onos-test@onosproject.org>,
+the System Testing Plans and Results wiki page at <https://wiki.onosproject.org/x/voMg>,
+or the System Testing Guide page at <https://wiki.onosproject.org/x/WYQg>
 
 author:: Anil Kumar ( anilkumar.s@paxterrasolutions.com )
 
diff --git a/TestON/drivers/common/cli/onosclidriver.py b/TestON/drivers/common/cli/onosclidriver.py
index 32a08e9..8eb26ae 100755
--- a/TestON/drivers/common/cli/onosclidriver.py
+++ b/TestON/drivers/common/cli/onosclidriver.py
@@ -14,6 +14,11 @@
 shreya@onlab.us
 
 OCT 13 2014
+Modified 2016 by ON.Lab
+
+Please refer questions to either the onos test mailing list at <onos-test@onosproject.org>,
+the System Testing Plans and Results wiki page at <https://wiki.onosproject.org/x/voMg>,
+or the System Testing Guide page at <https://wiki.onosproject.org/x/WYQg>
 
 """
 import pexpect
@@ -4926,3 +4931,40 @@
         except Exception:
             main.log.exception( self.name + ": Uncaught exception!" )
             return None
+
+    def getIntentPerfSummary( self ):
+        '''
+        Send command to check intent-perf summary
+        Returns: dictionary for intent-perf summary
+                 if something wrong, function will return None
+        '''
+        cmd = "intent-perf -s"
+        respDic = {}
+        resp = self.sendline( cmd )
+        try:
+            # Generate the dictionary to return
+            for l in resp.split( "\n" ):
+                # Delete any white space in line
+                temp = re.sub( r'\s+', '', l )
+                temp = temp.split( ":" )
+                respDic[ temp[0] ] = temp[ 1 ]
+
+        except (TypeError, ValueError):
+            main.log.exception( self.name + ": Object not as expected" )
+            return None
+        except KeyError:
+            main.log.exception( self.name + ": KeyError exception found" )
+            return None
+        except AssertionError:
+            main.log.exception( self.name + ": AssertionError exception found" )
+            return None
+        except pexpect.EOF:
+            main.log.error( self.name + ": EOF exception found" )
+            main.log.error( self.name + ":    " + self.handle.before )
+            return None
+        except Exception:
+            main.log.exception( self.name + ": Uncaught exception!" )
+            return None
+        return respDic
+
+
diff --git a/TestON/drivers/common/cli/onosdriver.py b/TestON/drivers/common/cli/onosdriver.py
index e749ce2..635178e 100755
--- a/TestON/drivers/common/cli/onosdriver.py
+++ b/TestON/drivers/common/cli/onosdriver.py
@@ -14,6 +14,11 @@
 andrew@onlab.us
 
 OCT 9 2014
+Modified 2016 by ON.Lab
+
+Please refer questions to either the onos test mailing list at <onos-test@onosproject.org>,
+the System Testing Plans and Results wiki page at <https://wiki.onosproject.org/x/voMg>,
+or the System Testing Guide page at <https://wiki.onosproject.org/x/WYQg>
 
 """
 import time
@@ -2364,4 +2369,4 @@
         except Exception:
             main.log.exception( self.name + ": Uncaught exception!" )
             main.cleanup()
-            main.exit()
\ No newline at end of file
+            main.exit()
diff --git a/TestON/drivers/common/cli/quaggaclidriver.py b/TestON/drivers/common/cli/quaggaclidriver.py
index e89047e..721ae6a 100644
--- a/TestON/drivers/common/cli/quaggaclidriver.py
+++ b/TestON/drivers/common/cli/quaggaclidriver.py
@@ -1,4 +1,11 @@
 #!/usr/bin/env python
+"""
+Modified 2015 by ON.Lab
+
+Please refer questions to either the onos test mailing list at <onos-test@onosproject.org>,
+the System Testing Plans and Results wiki page at <https://wiki.onosproject.org/x/voMg>,
+or the System Testing Guide page at <https://wiki.onosproject.org/x/WYQg>
+"""
 
 import time
 import pexpect
diff --git a/TestON/drivers/common/cli/remotesysdriver.py b/TestON/drivers/common/cli/remotesysdriver.py
index 963b8f4..a56f644 100644
--- a/TestON/drivers/common/cli/remotesysdriver.py
+++ b/TestON/drivers/common/cli/remotesysdriver.py
@@ -1,6 +1,11 @@
 #!/usr/bin/env python
 """
 Created on 26-Oct-2012
+Modified 2015 by ON.Lab
+
+Please refer questions to either the onos test mailing list at <onos-test@onosproject.org>,
+the System Testing Plans and Results wiki page at <https://wiki.onosproject.org/x/voMg>,
+or the System Testing Guide page at <https://wiki.onosproject.org/x/WYQg>
 
 author:: Anil Kumar ( anilkumar.s@paxterrasolutions.com )
 
diff --git a/TestON/drivers/common/cli/remotetestbed/floodlightclidriver.py b/TestON/drivers/common/cli/remotetestbed/floodlightclidriver.py
index a000806..4f55a90 100644
--- a/TestON/drivers/common/cli/remotetestbed/floodlightclidriver.py
+++ b/TestON/drivers/common/cli/remotetestbed/floodlightclidriver.py
@@ -1,6 +1,11 @@
 #!/usr/bin/env python
 """
 Created on 12-Feb-2013
+Modified 2015 by ON.Lab
+
+Please refer questions to either the onos test mailing list at <onos-test@onosproject.org>,
+the System Testing Plans and Results wiki page at <https://wiki.onosproject.org/x/voMg>,
+or the System Testing Guide page at <https://wiki.onosproject.org/x/WYQg>
 
 author:: Anil Kumar ( anilkumar.s@paxterrasolutions.com )
 
diff --git a/TestON/drivers/common/cli/remotetestbed/necswitchdriver.py b/TestON/drivers/common/cli/remotetestbed/necswitchdriver.py
index 07fb668..aea470d 100644
--- a/TestON/drivers/common/cli/remotetestbed/necswitchdriver.py
+++ b/TestON/drivers/common/cli/remotetestbed/necswitchdriver.py
@@ -1,3 +1,11 @@
+"""
+Modified 2015 by ON.Lab
+
+Please refer questions to either the onos test mailing list at <onos-test@onosproject.org>,
+the System Testing Plans and Results wiki page at <https://wiki.onosproject.org/x/voMg>,
+or the System Testing Guide page at <https://wiki.onosproject.org/x/WYQg>
+"""
+
 class NEC:
 
     def __init__( self ):
diff --git a/TestON/drivers/common/cli/remotetestbed/remotepoxdriver.py b/TestON/drivers/common/cli/remotetestbed/remotepoxdriver.py
index 6f2f90c..50100c9 100644
--- a/TestON/drivers/common/cli/remotetestbed/remotepoxdriver.py
+++ b/TestON/drivers/common/cli/remotetestbed/remotepoxdriver.py
@@ -1,6 +1,11 @@
 #!/usr/bin/env python
 """
 Created on 12-Feb-2013
+Modified 2015 by ON.Lab
+
+Please refer questions to either the onos test mailing list at <onos-test@onosproject.org>,
+the System Testing Plans and Results wiki page at <https://wiki.onosproject.org/x/voMg>,
+or the System Testing Guide page at <https://wiki.onosproject.org/x/WYQg>
 
 author:: Anil Kumar ( anilkumar.s@paxterrasolutions.com )
 
diff --git a/TestON/drivers/common/cli/remotetestbed/remotevmdriver.py b/TestON/drivers/common/cli/remotetestbed/remotevmdriver.py
index 892d998..f4a1f1a 100644
--- a/TestON/drivers/common/cli/remotetestbed/remotevmdriver.py
+++ b/TestON/drivers/common/cli/remotetestbed/remotevmdriver.py
@@ -1,6 +1,11 @@
 #!/usr/bin/env python
 """
 Created on 12-Feb-2013
+Modified 2015 by ON.Lab
+
+Please refer questions to either the onos test mailing list at <onos-test@onosproject.org>,
+the System Testing Plans and Results wiki page at <https://wiki.onosproject.org/x/voMg>,
+or the System Testing Guide page at <https://wiki.onosproject.org/x/WYQg>
 
 author:: Anil Kumar ( anilkumar.s@paxterrasolutions.com )
 
diff --git a/TestON/drivers/common/cli/remotetestbeddriver.py b/TestON/drivers/common/cli/remotetestbeddriver.py
index acb9ccc..ebf8fbe 100644
--- a/TestON/drivers/common/cli/remotetestbeddriver.py
+++ b/TestON/drivers/common/cli/remotetestbeddriver.py
@@ -1,6 +1,11 @@
 #!/usr/bin/env python
 """
 Created on 26-Oct-2012
+Modified 2015 by ON.Lab
+
+Please refer questions to either the onos test mailing list at <onos-test@onosproject.org>,
+the System Testing Plans and Results wiki page at <https://wiki.onosproject.org/x/voMg>,
+or the System Testing Guide page at <https://wiki.onosproject.org/x/WYQg>
 
 author:: Anil Kumar ( anilkumar.s@paxterrasolutions.com )
 
diff --git a/TestON/drivers/common/cli/tool/dpctlclidriver.py b/TestON/drivers/common/cli/tool/dpctlclidriver.py
index 504567c..683f16e 100644
--- a/TestON/drivers/common/cli/tool/dpctlclidriver.py
+++ b/TestON/drivers/common/cli/tool/dpctlclidriver.py
@@ -1,6 +1,11 @@
 #/usr/bin/env python
 """
 Created on 26-Nov-2012
+Modified 2015 by ON.Lab
+
+Please refer questions to either the onos test mailing list at <onos-test@onosproject.org>,
+the System Testing Plans and Results wiki page at <https://wiki.onosproject.org/x/voMg>,
+or the System Testing Guide page at <https://wiki.onosproject.org/x/WYQg>
 
 author:: Raghav Kashyap( raghavkashyap@paxterrasolutions.com )
 
diff --git a/TestON/drivers/common/cli/toolsdriver.py b/TestON/drivers/common/cli/toolsdriver.py
index 775902f..c96cb4f 100644
--- a/TestON/drivers/common/cli/toolsdriver.py
+++ b/TestON/drivers/common/cli/toolsdriver.py
@@ -1,6 +1,11 @@
 #!/usr/bin/env python
 """
 Created on 26-Nov-2012
+Modified 2015 by ON.Lab
+
+Please refer questions to either the onos test mailing list at <onos-test@onosproject.org>,
+the System Testing Plans and Results wiki page at <https://wiki.onosproject.org/x/voMg>,
+or the System Testing Guide page at <https://wiki.onosproject.org/x/WYQg>
 
 author:: Raghav Kashyap( raghavkashyap@paxterrasolutions.com )
 
diff --git a/TestON/drivers/common/clidriver.py b/TestON/drivers/common/clidriver.py
index a7404fa..283088d 100644
--- a/TestON/drivers/common/clidriver.py
+++ b/TestON/drivers/common/clidriver.py
@@ -1,10 +1,11 @@
 #!/usr/bin/env python
 """
 Created on 24-Oct-2012
+Modified 2016 by ON.Lab
 
-author:s: Anil Kumar ( anilkumar.s@paxterrasolutions.com ),
-          Raghav Kashyap( raghavkashyap@paxterrasolutions.com )
-
+Please refer questions to either the onos test mailing list at <onos-test@onosproject.org>,
+the System Testing Plans and Results wiki page at <https://wiki.onosproject.org/x/voMg>,
+or the System Testing Guide page at <https://wiki.onosproject.org/x/WYQg>
 
     TestON is free software: you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
@@ -18,9 +19,6 @@
 
     You should have received a copy of the GNU General Public License
     along with TestON.  If not, see <http://www.gnu.org/licenses/>.
-
-
-
 """
 import pexpect
 import re
diff --git a/TestON/drivers/component.py b/TestON/drivers/component.py
index b8a66e9..fc17d47 100644
--- a/TestON/drivers/component.py
+++ b/TestON/drivers/component.py
@@ -1,10 +1,11 @@
 #!/usr/bin/env python
 """
 Created on 24-Oct-2012
+Modified 2015 by ON.Lab
 
-author:s: Anil Kumar ( anilkumar.s@paxterrasolutions.com ),
-          Raghav Kashyap( raghavkashyap@paxterrasolutions.com )
-
+Please refer questions to either the onos test mailing list at <onos-test@onosproject.org>,
+the System Testing Plans and Results wiki page at <https://wiki.onosproject.org/x/voMg>,
+or the System Testing Guide page at <https://wiki.onosproject.org/x/WYQg>
 
     TestON is free software: you can redistribute it and/or modify
     it under the terms of the GNU General Public License as published by
@@ -18,9 +19,6 @@
 
     You should have received a copy of the GNU General Public License
     along with TestON.  If not, see <http://www.gnu.org/licenses/>.
-
-
-
 """
 import logging
 
diff --git a/TestON/install.sh b/TestON/install.sh
index dee85c9..4bbfe92 100755
--- a/TestON/install.sh
+++ b/TestON/install.sh
@@ -63,13 +63,20 @@
 echo "Installing TestON dependencies"
 if [ "$DIST" = "Fedora" ]; then
     # Fedora may have vlan enabled by default. Still need to confirm and update later
-    $install python-pip build-essential python-dev pep8 arping python3-requests
+    $install python-pip build-essential python-dev pep8 python3-requests
     $pipinstall pexpect==3.2 configobj==4.7.2 numpy
 else
-    $install python-pip build-essential python-dev pep8 vlan arping python3-requests
+    $install python-pip build-essential python-dev pep8 vlan python3-requests
     $pipinstall pexpect==3.2 configobj==4.7.2 numpy
 fi
 
+# Some Distos have this already from another package
+if which arping > /dev/null ; then
+    echo "Arping command detected, skipping package installation."
+else
+    $install arping
+fi
+
 # Add check here to make sure OnosSystemTest is cloned into home directory (place holder)
 
 # Add symbolic link to main TestON folder in Home dir
diff --git a/TestON/tests/CHOTestMonkey/CHOTestMonkey.params b/TestON/tests/CHOTestMonkey/CHOTestMonkey.params
index 848e4cc..0805112 100644
--- a/TestON/tests/CHOTestMonkey/CHOTestMonkey.params
+++ b/TestON/tests/CHOTestMonkey/CHOTestMonkey.params
@@ -20,7 +20,7 @@
     # 100. Do something else
     # Sample sequence: 0,1,2,3,[10,30,21,31,10,32,21,33,50,10,30,21,31,10,32,21,33,51,40,60,10,30,21,31,10,32,21,33,50,10,30,21,31,10,32,21,33,51,41,60]*500,100
     <testcases>
-        0,1,2,3,70,[30,21,31,32,21,33]*500,100
+        0,1,2,3,70
     </testcases>
 
     <TEST>
diff --git a/TestON/tests/CHOTestMonkey/CHOTestMonkey.py b/TestON/tests/CHOTestMonkey/CHOTestMonkey.py
index 11459b3..42c0ff7 100644
--- a/TestON/tests/CHOTestMonkey/CHOTestMonkey.py
+++ b/TestON/tests/CHOTestMonkey/CHOTestMonkey.py
@@ -806,30 +806,26 @@
                 n = random.randint( 5, 50 )
                 for i in range( n ):
                     cliIndex = random.sample( upControllers, 1 )[ 0 ]
-                    main.eventGenerator.triggerEvent( EventType().APP_INTENT_HOST_ADD, EventScheduleMethod().RUN_NON_BLOCK, 'random', 'random', cliIndex )
+                    main.eventGenerator.triggerEvent( EventType().APP_INTENT_HOST_ADD, EventScheduleMethod().RUN_BLOCK, 'random', 'random', cliIndex )
                     hostIntentNum += 1
-                main.eventGenerator.triggerEvent( EventType().NULL, EventScheduleMethod().RUN_BLOCK )
             elif event == 'del-host-intent':
                 n = random.randint( 5, hostIntentNum )
                 for i in range( n ):
                     cliIndex = random.sample( upControllers, 1 )[ 0 ]
-                    main.eventGenerator.triggerEvent( EventType().APP_INTENT_HOST_DEL, EventScheduleMethod().RUN_NON_BLOCK, 'random', 'random', cliIndex )
+                    main.eventGenerator.triggerEvent( EventType().APP_INTENT_HOST_DEL, EventScheduleMethod().RUN_BLOCK, 'random', 'random', cliIndex )
                     hostIntentNum -= 1
-                main.eventGenerator.triggerEvent( EventType().NULL, EventScheduleMethod().RUN_BLOCK )
             elif event == 'add-point-intent':
                 n = random.randint( 5, 50 )
                 for i in range( n ):
                     cliIndex = random.sample( upControllers, 1 )[ 0 ]
-                    main.eventGenerator.triggerEvent( EventType().APP_INTENT_POINT_ADD, EventScheduleMethod().RUN_NON_BLOCK, 'random', 'random', cliIndex, 'bidirectional' )
+                    main.eventGenerator.triggerEvent( EventType().APP_INTENT_POINT_ADD, EventScheduleMethod().RUN_BLOCK, 'random', 'random', cliIndex, 'bidirectional' )
                     pointIntentNum += 1
-                main.eventGenerator.triggerEvent( EventType().NULL, EventScheduleMethod().RUN_BLOCK )
             elif event == 'del-point-intent':
                 n = random.randint( 5, pointIntentNum )
                 for i in range( n ):
                     cliIndex = random.sample( upControllers, 1 )[ 0 ]
-                    main.eventGenerator.triggerEvent( EventType().APP_INTENT_POINT_DEL, EventScheduleMethod().RUN_NON_BLOCK, 'random', 'random', cliIndex, 'bidirectional' )
+                    main.eventGenerator.triggerEvent( EventType().APP_INTENT_POINT_DEL, EventScheduleMethod().RUN_BLOCK, 'random', 'random', cliIndex, 'bidirectional' )
                     pointIntentNum -= 1
-                main.eventGenerator.triggerEvent( EventType().NULL, EventScheduleMethod().RUN_BLOCK )
             elif event == 'link-down':
                 main.eventGenerator.triggerEvent( EventType().NETWORK_LINK_DOWN, EventScheduleMethod().RUN_BLOCK, 'random', 'random' )
                 downLinkNum += 1
@@ -849,7 +845,6 @@
             main.eventGenerator.triggerEvent( EventType().CHECK_TRAFFIC, EventScheduleMethod().RUN_NON_BLOCK )
             main.eventGenerator.triggerEvent( EventType().CHECK_FLOW, EventScheduleMethod().RUN_NON_BLOCK )
             main.eventGenerator.triggerEvent( EventType().CHECK_INTENT, EventScheduleMethod().RUN_NON_BLOCK )
-            main.eventGenerator.triggerEvent( EventType().NULL, EventScheduleMethod().RUN_BLOCK )
             with main.eventScheduler.idleCondition:
                 while not main.eventScheduler.isIdle():
                     main.eventScheduler.idleCondition.wait()
diff --git a/TestON/tests/CHOTestMonkey/dependencies/EventScheduler.py b/TestON/tests/CHOTestMonkey/dependencies/EventScheduler.py
index 99ead73..ae32932 100644
--- a/TestON/tests/CHOTestMonkey/dependencies/EventScheduler.py
+++ b/TestON/tests/CHOTestMonkey/dependencies/EventScheduler.py
@@ -78,7 +78,7 @@
             else:
                 main.log.warn( "Event Scheduler - invalid index when isnerting event: %s" % ( index ) )
             self.pendingEventsCondition.notify()
-        self.printEvents()
+        #self.printEvents()
 
     def startScheduler( self ):
         """
@@ -127,7 +127,7 @@
 
         with self.runningEventsCondition:
             self.runningEvents.append( eventTuple )
-        self.printEvents()
+        #self.printEvents()
         rerunNum = 0
         result = eventTuple.startEvent()
         while result == EventStates().FAIL and rerunNum < eventTuple.maxRerunNum:
@@ -150,7 +150,7 @@
                     if len( self.pendingEvents ) == 0:
                         with self.idleCondition:
                             self.idleCondition.notify()
-        self.printEvents()
+        #self.printEvents()
 
     def printEvents( self ):
         """
@@ -172,18 +172,18 @@
             if len( self.pendingEvents ) > 0:
                 events += str( self.pendingEvents[ -1 ].typeIndex )
         events += "]"
-        #main.log.debug( "Event Scheduler - Events: " + events )
+        main.log.debug( "Event Scheduler - Events: " + events )
 
     def isAvailable( self ):
-        with self.pendingEventsCondition:
-            with self.runningEventsCondition:
+        with self.runningEventsCondition:
+            with self.pendingEventsCondition:
                 return len( self.pendingEvents ) < self.pendingEventsCapacity and\
                        len( self.runningEvents ) < self.runningEventsCapacity and\
                        self.isRunning
 
     def isIdle( self ):
-        with self.pendingEventsCondition:
-            with self.runningEventsCondition:
+        with self.runningEventsCondition:
+            with self.pendingEventsCondition:
                 return len( self.pendingEvents ) == 0 and\
                        len( self.runningEvents ) == 0 and\
                        self.isRunning
diff --git a/TestON/tests/CHOTestMonkey/dependencies/elements/ONOSElement.py b/TestON/tests/CHOTestMonkey/dependencies/elements/ONOSElement.py
index 17e9e73..e9dff29 100644
--- a/TestON/tests/CHOTestMonkey/dependencies/elements/ONOSElement.py
+++ b/TestON/tests/CHOTestMonkey/dependencies/elements/ONOSElement.py
@@ -58,7 +58,6 @@
 
     def setWithdrawn( self ):
         self.expectedState = 'WITHDRAWN'
-        # TODO: should we check whether hostA and hostB are made correspondents by other intents/flows?
         if self.hostB in self.hostA.correspondents:
             self.hostA.correspondents.remove( self.hostB )
         if self.hostA in self.hostB.correspondents:
@@ -66,17 +65,12 @@
 
     def setFailed( self ):
         self.expectedState = 'FAILED'
-        # TODO: should we check whether hostA and hostB are made correspondents by other intents/flows?
-        if self.hostB in self.hostA.correspondents:
-            self.hostA.correspondents.remove( self.hostB )
-        if self.hostA in self.hostB.correspondents:
-            self.hostB.correspondents.remove( self.hostA )
 
     def setInstalled( self ):
+        if self.expectedState == 'UNKNOWN':
+            self.hostA.correspondents.append( self.hostB )
+            self.hostB.correspondents.append( self.hostA )
         self.expectedState = 'INSTALLED'
-        # TODO: should we check whether hostA and hostB are already correspondents?
-        self.hostA.correspondents.append( self.hostB )
-        self.hostB.correspondents.append( self.hostA )
 
     def __str__( self ):
         return "ID: " + self.id
@@ -97,16 +91,13 @@
 
     def setFailed( self ):
         self.expectedState = 'FAILED'
-        for hostA in self.deviceA.hosts:
-            for hostB in self.deviceB.hosts:
-                if hostB in hostA.correspondents:
-                    hostA.correspondents.remove( hostB )
 
     def setInstalled( self ):
+        if self.expectedState == 'UNKNOWN':
+            for hostA in self.deviceA.hosts:
+                for hostB in self.deviceB.hosts:
+                    hostA.correspondents.append( hostB )
         self.expectedState = 'INSTALLED'
-        for hostA in self.deviceA.hosts:
-            for hostB in self.deviceB.hosts:
-                hostA.correspondents.append( hostB )
 
     def __str__( self ):
         return "ID: " + self.id
diff --git a/TestON/tests/CHOTestMonkey/dependencies/events/AppEvent.py b/TestON/tests/CHOTestMonkey/dependencies/events/AppEvent.py
index adcbfdc..07c8cb6 100644
--- a/TestON/tests/CHOTestMonkey/dependencies/events/AppEvent.py
+++ b/TestON/tests/CHOTestMonkey/dependencies/events/AppEvent.py
@@ -71,47 +71,51 @@
                 elif len( args ) > 3:
                     main.log.warn( "%s - Too many arguments: %s" % ( self.typeString, args ) )
                     return EventStates().ABORT
-                if args[ 0 ] == 'random' or args[ 1 ] == 'random':
-                    if self.typeIndex == EventType().APP_INTENT_HOST_ADD:
-                        hostPairRandom = self.getRandomHostPair( connected=False )
-                        if hostPairRandom == None:
-                            main.log.warn( "All host pairs are connected, aborting event" )
-                            return EventStates().ABORT
-                        self.hostA = hostPairRandom[ 0 ]
-                        self.hostB = hostPairRandom[ 1 ]
-                    elif self.typeIndex == EventType().APP_INTENT_HOST_DEL:
-                        intent = self.getRandomIntentByType( 'INTENT_HOST' )
-                        if intent == None:
-                            main.log.warn( "No host intent for deletion, aborting event" )
-                            return EventStates().ABORT
-                        self.hostA = intent.hostA
-                        self.hostB = intent.hostB
-                elif args[ 0 ] == args[ 1 ]:
-                    main.log.warn( "%s - invalid argument: %s, %s" % ( self.typeString, args[ 0 ], args[ 1 ] ) )
-                    return EventStates().ABORT
-                else:
-                    for host in main.hosts:
-                        if host.name == args[ 0 ]:
-                            self.hostA = host
-                        elif host.name == args[ 1 ]:
-                            self.hostB = host
-                        if self.hostA != None and self.hostB != None:
-                            break
-                    if self.hostA == None:
-                        main.log.warn( "Host %s does not exist: " % ( args[ 0 ] ) )
+                try:
+                    if args[ 0 ] == 'random' or args[ 1 ] == 'random':
+                        if self.typeIndex == EventType().APP_INTENT_HOST_ADD:
+                            hostPairRandom = self.getRandomHostPair( connected=False )
+                            if hostPairRandom == None:
+                                main.log.warn( "All host pairs are connected, aborting event" )
+                                return EventStates().ABORT
+                            self.hostA = hostPairRandom[ 0 ]
+                            self.hostB = hostPairRandom[ 1 ]
+                        elif self.typeIndex == EventType().APP_INTENT_HOST_DEL:
+                            intent = self.getRandomIntentByType( 'INTENT_HOST' )
+                            if intent == None:
+                                main.log.warn( "No host intent for deletion, aborting event" )
+                                return EventStates().ABORT
+                            self.hostA = intent.hostA
+                            self.hostB = intent.hostB
+                    elif args[ 0 ] == args[ 1 ]:
+                        main.log.warn( "%s - invalid argument: %s, %s" % ( self.typeString, args[ 0 ], args[ 1 ] ) )
                         return EventStates().ABORT
-                    if self.hostB == None:
-                        main.log.warn( "Host %s does not exist: " % ( args[ 1 ] ) )
+                    else:
+                        for host in main.hosts:
+                            if host.name == args[ 0 ]:
+                                self.hostA = host
+                            elif host.name == args[ 1 ]:
+                                self.hostB = host
+                            if self.hostA != None and self.hostB != None:
+                                break
+                        if self.hostA == None:
+                            main.log.warn( "Host %s does not exist: " % ( args[ 0 ] ) )
+                            return EventStates().ABORT
+                        if self.hostB == None:
+                            main.log.warn( "Host %s does not exist: " % ( args[ 1 ] ) )
+                            return EventStates().ABORT
+                    index = int( args[ 2 ] )
+                    if index < 1 or index > int( main.numCtrls ):
+                        main.log.warn( "%s - invalid argument: %s" % ( self.typeString, index ) )
                         return EventStates().ABORT
-                index = int( args[ 2 ] )
-                if index < 1 or index > int( main.numCtrls ):
-                    main.log.warn( "%s - invalid argument: %s" % ( self.typeString, index ) )
+                    if not main.controllers[ index - 1 ].isUp():
+                        main.log.warn( self.typeString + " - invalid argument: onos %s is down" % ( controller.index ) )
+                        return EventStates().ABORT
+                    self.CLIIndex = index
+                    return self.startHostIntentEvent()
+                except Exception:
+                    main.log.warn( "Caught exception, aborting event" )
                     return EventStates().ABORT
-                if not main.controllers[ index - 1 ].isUp():
-                    main.log.warn( self.typeString + " - invalid argument: onos %s is down" % ( controller.index ) )
-                    return EventStates().ABORT
-                self.CLIIndex = index
-                return self.startHostIntentEvent()
 
 class AddHostIntent( HostIntentEvent ):
     """
@@ -208,57 +212,61 @@
                 elif len( args ) > 4:
                     main.log.warn( "%s - Too many arguments: %s" % ( self.typeString, args ) )
                     return EventStates().ABORT
-                if args[ 0 ] == 'random' or args[ 1 ] == 'random':
-                    if self.typeIndex == EventType().APP_INTENT_POINT_ADD:
-                        hostPairRandom = self.getRandomHostPair( connected=False )
-                        if hostPairRandom == None:
-                            main.log.warn( "All host pairs are connected, aborting event" )
-                            return EventStates().ABORT
-                        self.deviceA = hostPairRandom[ 0 ].device
-                        self.deviceB = hostPairRandom[ 1 ].device
-                    elif self.typeIndex == EventType().APP_INTENT_POINT_DEL:
-                        intent = self.getRandomIntentByType( 'INTENT_POINT' )
-                        if intent == None:
-                            main.log.warn( "No point intent for deletion, aborting event" )
-                            return EventStates().ABORT
-                        self.deviceA = intent.deviceA
-                        self.deviceB = intent.deviceB
-                elif args[ 0 ] == args[ 1 ]:
-                    main.log.warn( "%s - invalid argument: %s" % ( self.typeString, args[ 0 ], args[ 1 ] ) )
-                    return EventStates().ABORT
-                else:
-                    for device in main.devices:
-                        if device.name == args[ 0 ]:
-                            self.deviceA = device
-                        elif device.name == args[ 1 ]:
-                            self.deviceB = device
-                        if self.deviceA != None and self.deviceB != None:
-                            break
-                    if self.deviceA == None:
-                        main.log.warn( "Device %s does not exist: " % ( args[ 0 ] ) )
+                try:
+                    if args[ 0 ] == 'random' or args[ 1 ] == 'random':
+                        if self.typeIndex == EventType().APP_INTENT_POINT_ADD:
+                            hostPairRandom = self.getRandomHostPair( connected=False )
+                            if hostPairRandom == None:
+                                main.log.warn( "All host pairs are connected, aborting event" )
+                                return EventStates().ABORT
+                            self.deviceA = hostPairRandom[ 0 ].device
+                            self.deviceB = hostPairRandom[ 1 ].device
+                        elif self.typeIndex == EventType().APP_INTENT_POINT_DEL:
+                            intent = self.getRandomIntentByType( 'INTENT_POINT' )
+                            if intent == None:
+                                main.log.warn( "No point intent for deletion, aborting event" )
+                                return EventStates().ABORT
+                            self.deviceA = intent.deviceA
+                            self.deviceB = intent.deviceB
+                    elif args[ 0 ] == args[ 1 ]:
+                        main.log.warn( "%s - invalid argument: %s" % ( self.typeString, args[ 0 ], args[ 1 ] ) )
                         return EventStates().ABORT
-                    if self.deviceB == None:
-                        main.log.warn( "Device %s does not exist: " % ( args[ 1 ] ) )
-                        return EventStates().ABORT
-                index = int( args[ 2 ] )
-                if index < 1 or index > int( main.numCtrls ):
-                    main.log.warn( "%s - invalid argument: %s" % ( self.typeString, index ) )
-                    return EventStates().ABORT
-                if not main.controllers[ index - 1 ].isUp():
-                    main.log.warn( self.typeString + " - invalid argument: onos %s is down" % ( controller.index ) )
-                    return EventStates().ABORT
-                self.CLIIndex = index
-                if len( args ) == 4 and args[ 3 ] == 'bidirectional':
-                    # Install point intents for both directions
-                    resultA = self.startPointIntentEvent()
-                    [ self.deviceA, self.deviceB ] = [ self.deviceB, self.deviceA ]
-                    resultB = self.startPointIntentEvent()
-                    if resultA == EventStates().PASS and resultB == EventStates().PASS:
-                        return EventStates().PASS
                     else:
-                        return EventStates().FAIL
-                else:
-                    return self.startPointIntentEvent()
+                        for device in main.devices:
+                            if device.name == args[ 0 ]:
+                                self.deviceA = device
+                            elif device.name == args[ 1 ]:
+                                self.deviceB = device
+                            if self.deviceA != None and self.deviceB != None:
+                                break
+                        if self.deviceA == None:
+                            main.log.warn( "Device %s does not exist: " % ( args[ 0 ] ) )
+                            return EventStates().ABORT
+                        if self.deviceB == None:
+                            main.log.warn( "Device %s does not exist: " % ( args[ 1 ] ) )
+                            return EventStates().ABORT
+                    index = int( args[ 2 ] )
+                    if index < 1 or index > int( main.numCtrls ):
+                        main.log.warn( "%s - invalid argument: %s" % ( self.typeString, index ) )
+                        return EventStates().ABORT
+                    if not main.controllers[ index - 1 ].isUp():
+                        main.log.warn( self.typeString + " - invalid argument: onos %s is down" % ( controller.index ) )
+                        return EventStates().ABORT
+                    self.CLIIndex = index
+                    if len( args ) == 4 and args[ 3 ] == 'bidirectional':
+                        # Install point intents for both directions
+                        resultA = self.startPointIntentEvent()
+                        [ self.deviceA, self.deviceB ] = [ self.deviceB, self.deviceA ]
+                        resultB = self.startPointIntentEvent()
+                        if resultA == EventStates().PASS and resultB == EventStates().PASS:
+                            return EventStates().PASS
+                        else:
+                            return EventStates().FAIL
+                    else:
+                        return self.startPointIntentEvent()
+                except Exception:
+                    main.log.warn( "Caught exception, aborting event" )
+                    return EventStates().ABORT
 
 class AddPointIntent( PointIntentEvent ):
     """
@@ -273,7 +281,7 @@
         try:
             assert self.deviceA != None and self.deviceB != None
             controller = main.controllers[ self.CLIIndex - 1 ]
-            # TODO: the following check only work when we use default port number for point intents
+            # TODO: support multiple hosts under one device
             # Check whether there already exists some intent for the device pair
             # For now we should avoid installing overlapping intents
             for intent in main.intents:
@@ -284,15 +292,13 @@
                     return EventStates().ABORT
             controller = main.controllers[ self.CLIIndex - 1 ]
             with controller.CLILock:
-                # TODO: handle the case that multiple hosts attach to one device
                 srcMAC = ""
                 dstMAC = ""
                 if len( self.deviceA.hosts ) > 0:
                     srcMAC = self.deviceA.hosts[ 0 ].mac
                 if len( self.deviceB.hosts ) > 0:
                     dstMAC = self.deviceB.hosts[ 0 ].mac
-                id = controller.CLI.addPointIntent( self.deviceA.dpid, self.deviceB.dpid,
-                                                    1, 1, '', srcMAC, dstMAC )
+                id = controller.CLI.addPointIntent( self.deviceA.dpid, self.deviceB.dpid, 1, 1, '', srcMAC, dstMAC )
             if id == None:
                 main.log.warn( self.typeString + " - add point intent failed" )
                 return EventStates().FAIL
diff --git a/TestON/tests/SCPF/SCPFhostLat/SCPFhostLat.params b/TestON/tests/SCPF/SCPFhostLat/SCPFhostLat.params
index 9bd9e6b..be4caec 100644
--- a/TestON/tests/SCPF/SCPFhostLat/SCPFhostLat.params
+++ b/TestON/tests/SCPF/SCPFhostLat/SCPFhostLat.params
@@ -9,7 +9,7 @@
     </ENV>
 
     <DEPENDENCY>
-        <path>/tests/SCPFhostLat/dependencies/</path>
+        <path>/tests/SCPF/SCPFhostLat/dependencies/</path>
         <topology>topo-perf-1h1s.py</topology>
     </DEPENDENCY>
 
diff --git a/TestON/tests/SCPF/SCPFintentEventTp/SCPFintentEventTp.params b/TestON/tests/SCPF/SCPFintentEventTp/SCPFintentEventTp.params
index 7c7953a..cf4c6ac 100644
--- a/TestON/tests/SCPF/SCPFintentEventTp/SCPFintentEventTp.params
+++ b/TestON/tests/SCPF/SCPFintentEventTp/SCPFintentEventTp.params
@@ -1,6 +1,6 @@
 <PARAMS>
 
-    <testcases>1,2,1,2,1,2,1,2,1,2,1,2,1,2</testcases>
+    <testcases>0,1,2,1,2,1,2,1,2,1,2,1,2,1,2</testcases>
 
     <debugMode></debugMode>  #nothing means false
 
@@ -13,8 +13,8 @@
     <max>7</max>
 
     <GIT>
-        <autopull>off</autopull>
-        <checkout>master</checkout>
+        <gitPull>off</gitPull>
+        <gitBranch>master</gitBranch>
     </GIT>
 
     <CTRL>
@@ -44,6 +44,14 @@
 
     <MN><ip1>OCN</ip1></MN>
 
+    <SLEEP>
+        <startup>10</startup>
+        <install>10</install>
+        <verify>3</verify>
+        <reroute>3</reroute>
+        # timeout for pexpect
+        <timeout>300</timeout>
+    </SLEEP>
     <BENCH>
         <user>sdn</user>
         <ip1>OCN</ip1>
diff --git a/TestON/tests/SCPF/SCPFintentEventTp/SCPFintentEventTp.py b/TestON/tests/SCPF/SCPFintentEventTp/SCPFintentEventTp.py
index a5944ac..6b333bc 100644
--- a/TestON/tests/SCPF/SCPFintentEventTp/SCPFintentEventTp.py
+++ b/TestON/tests/SCPF/SCPFintentEventTp/SCPFintentEventTp.py
@@ -1,346 +1,261 @@
-# ScaleOutTemplate
-#
-# CASE1 starts number of nodes specified in param file
-#
-# cameron@onlab.us
+'''
+SCPFintentEventTp
+    - Use intentperf app to generate a lot of intent install and withdraw events
+    - Test will run with 1,3,5,7 nodes, and with all neighbors
+    - Test will run 400 seconds and grep the overall rate from intent-perf summary
 
-import sys
-import os.path
+    yunpeng@onlab.us
+'''
+
 import time
 
 
 class SCPFintentEventTp:
-
     def __init__( self ):
         self.default = ''
 
-    def CASE1( self, main ):
-        import sys
-        import os.path
-        import time
+    def CASE0( self, main ):
+        '''
+        - GIT
+        - BUILDING ONOS
+            Pull specific ONOS branch, then Build ONOS ono ONOS Bench.
+            This step is usually skipped. Because in a Jenkins driven automated
+            test env. We want Jenkins jobs to pull&build for flexibility to handle
+            different versions of ONOS.
+        - Construct tests variables
+        '''
+        gitPull = main.params['GIT']['gitPull']
+        gitBranch = main.params['GIT']['gitBranch']
 
-        global init
-        try:
-            if type(init) is not bool:
-                init = False
-        except NameError:
-            init = False
+        main.case( "Pull onos branch and build onos on Teststation." )
 
-        #Load values from params file
-        checkoutBranch = main.params[ 'GIT' ][ 'checkout' ]
-        gitPull = main.params[ 'GIT' ][ 'autopull' ]
-        cellName = main.params[ 'ENV' ][ 'cellName' ]
-        Apps = main.params[ 'ENV' ][ 'cellApps' ]
-        BENCHIp = main.params[ 'BENCH' ][ 'ip1' ]
-        BENCHUser = main.params[ 'BENCH' ][ 'user' ]
-        MN1Ip = main.params[ 'MN' ][ 'ip1' ]
-        maxNodes = int(main.params[ 'max' ])
-        main.maxNodes = maxNodes
-        skipMvn = main.params[ 'TEST' ][ 'skipCleanInstall' ]
-        cellName = main.params[ 'ENV' ][ 'cellName' ]
-        numSwitches = (main.params[ 'TEST' ][ 'numSwitches' ]).split(",")
-        flowRuleBU = main.params[ 'TEST' ][ 'flowRuleBUEnabled' ]
-        skipRelRsrc = main.params[ 'TEST'][ 'skipReleaseResourcesOnWithdrawal']
+        if gitPull == 'True':
+            main.step( "Git Checkout ONOS branch: " + gitBranch )
+            stepResult = main.ONOSbench.gitCheckout( branch=gitBranch )
+            utilities.assert_equals(expect=main.TRUE,
+                                    actual=stepResult,
+                                    onpass="Successfully checkout onos branch.",
+                                    onfail="Failed to checkout onos branch. Exiting test...")
+            if not stepResult: main.exit()
 
-        homeDir = os.path.expanduser('~')
+            main.step( "Git Pull on ONOS branch:" + gitBranch )
+            stepResult = main.ONOSbench.gitPull()
+            utilities.assert_equals(expect=main.TRUE,
+                                    actual=stepResult,
+                                    onpass="Successfully pull onos. ",
+                                    onfail="Failed to pull onos. Exiting test ...")
+            if not stepResult: main.exit()
 
+            main.step( "Building ONOS branch: " + gitBranch )
+            stepResult = main.ONOSbench.cleanInstall( skipTest=True )
+            utilities.assert_equals(expect=main.TRUE,
+                                    actual=stepResult,
+                                    onpass="Successfully build onos.",
+                                    onfail="Failed to build onos. Exiting test...")
+            if not stepResult: main.exit()
+
+        else:
+            main.log.warn( "Skipped pulling onos and Skipped building ONOS" )
+
+        main.cellName = main.params['ENV']['cellName']
+        main.Apps = main.params['ENV']['cellApps']
+        main.BENCHIp = main.params['BENCH']['ip1']
+        main.BENCHUser = main.params['BENCH']['user']
+        main.MN1Ip = main.params['MN']['ip1']
+        main.maxNodes = int(main.params['max'])
+        main.numSwitches = (main.params['TEST']['numSwitches']).split(",")
+        main.flowRuleBU = main.params['TEST']['flowRuleBUEnabled']
+        main.skipRelRsrc = main.params['TEST']['skipReleaseResourcesOnWithdrawal']
         main.flowObj = main.params['TEST']['flowObj']
+        main.startUpSleep = int(main.params['SLEEP']['startup'])
+        main.installSleep = int(main.params['SLEEP']['install'])
+        main.verifySleep = int(main.params['SLEEP']['verify'])
+        main.scale = (main.params['SCALE']).split(",")
+        main.testDuration = main.params[ 'TEST' ][ 'duration' ]
+        main.logInterval = main.params[ 'TEST' ][ 'log_interval' ]
+        main.debug = main.params[ 'debugMode' ]
+        main.numKeys = main.params[ 'TEST' ][ 'numKeys' ]
+        main.timeout = int(main.params['SLEEP']['timeout'])
+        main.cyclePeriod = main.params[ 'TEST' ][ 'cyclePeriod' ]
         if main.flowObj == "True":
             main.flowObj = True
             main.dbFileName = main.params['DATABASE']['dbFlowObj']
         else:
             main.flowObj = False
             main.dbFileName = main.params['DATABASE']['dbName']
+        # Create DataBase file
+        main.log.info( "Create Database file " + main.dbFileName )
+        resultsDB = open( main.dbFileName, "w+" )
+        resultsDB.close()
 
-        main.exceptions = [0]*11
-        main.warnings = [0]*11
-        main.errors = [0]*11
+        # set neighbors
+        main.neighbors = "1"
 
-        # -- INIT SECTION, ONLY RUNS ONCE -- #
-        if init == False:
-            init = True
-            global clusterCount             #number of nodes running
-            global ONOSIp                   #list of ONOS IP addresses
-            global scale
-            global commit
+    def CASE1( self, main ):
+        # Clean up test environment and set up
+        import time
+        main.log.info( "Get ONOS cluster IP" )
+        print( main.scale )
+        main.numCtrls = int( main.scale.pop(0) )
+        main.ONOSip = []
+        main.maxNumBatch = 0
+        main.AllONOSip = main.ONOSbench.getOnosIps()
+        for i in range( main.numCtrls ):
+            main.ONOSip.append( main.AllONOSip[i] )
+        main.log.info( main.ONOSip )
+        main.CLIs = []
+        main.log.info( "Creating list of ONOS cli handles" )
+        for i in range( main.numCtrls ):
+            main.CLIs.append( getattr( main, 'ONOS%scli' % (i + 1) ) )
 
-            clusterCount = 0
-            ONOSIp = main.ONOSbench.getOnosIps()
-            print ONOSIp
-            print main.ONOSbench.onosIps.values()
+        if not main.CLIs:
+            main.log.error( "Failed to create the list of ONOS cli handles" )
+            main.cleanup()
+            main.exit()
 
-            scale = (main.params[ 'SCALE' ]).split(",")
-            clusterCount = int(scale[0])
+        main.commit = main.ONOSbench.getVersion( report=True )
+        main.commit = main.commit.split(" ")[1]
+        main.log.info( "Starting up %s node(s) ONOS cluster" % main.numCtrls )
+        main.log.info("Safety check, killing all ONOS processes" +
+                      " before initiating environment setup")
 
-            #Populate ONOSIp with ips from params
-            ONOSIp.extend(main.ONOSbench.getOnosIps())
+        for i in range( main.numCtrls ):
+            main.ONOSbench.onosDie( main.ONOSip[i] )
 
-            #mvn clean install, for debugging set param 'skipCleanInstall' to yes to speed up test
-            if skipMvn != "yes":
-                mvnResult = main.ONOSbench.cleanInstall()
-
-            #git
-            main.step( "Git checkout and pull " + checkoutBranch )
-            if gitPull == 'on':
-                checkoutResult = main.ONOSbench.gitCheckout( checkoutBranch )
-                pullResult = main.ONOSbench.gitPull()
-
-            else:
-                checkoutResult = main.TRUE
-                pullResult = main.TRUE
-                main.log.info( "Skipped git checkout and pull" )
-
-            main.step("Grabbing commit number")
-            commit = main.ONOSbench.getVersion()
-            commit = (commit.split(" "))[1]
-
-            main.step("Creating results file")
-            resultsDB = open(main.dbFileName, "w+")
-            resultsDB.close()
-
-        # -- END OF INIT SECTION --#
-
-        main.step("Adjusting scale")
-        print str(scale)
-        print str(ONOSIp)
-        clusterCount = int(scale[0])
-        scale.remove(scale[0])
-
-        MN1Ip = ONOSIp[len(ONOSIp) -1]
-        BENCHIp = ONOSIp[len(ONOSIp) -2]
-
-        #kill off all onos processes
-        main.step("Safety check, killing all ONOS processes")
-        main.step("before initiating environment setup")
-        for node in range(maxNodes):
-            main.ONOSbench.onosDie(ONOSIp[node])
-
-        MN1Ip = ONOSIp[len(ONOSIp) -1]
-        BENCHIp = ONOSIp[len(ONOSIp) -2]
-
-        #Uninstall everywhere
-        main.step( "Cleaning Enviornment..." )
-        for i in range(maxNodes):
-            main.log.info(" Uninstalling ONOS " + str(i) )
-            main.ONOSbench.onosUninstall( ONOSIp[i] )
-        main.log.info("Sleep 10 second for uninstall to settle...")
-        time.sleep(10)
-        main.ONOSbench.handle.sendline(" ")
-        main.ONOSbench.handle.expect(":~")
-
-        #construct the cell file
-        main.log.info("Creating cell file")
-        cellIp = []
-        for node in range (clusterCount):
-            cellIp.append(ONOSIp[node])
-
-        main.ONOSbench.createCellFile("localhost",cellName,MN1Ip,str(Apps), cellIp)
-
-        main.step( "Set Cell" )
-        main.ONOSbench.setCell(cellName)
-
-        myDistribution = []
-        for node in range (clusterCount):
-            myDistribution.append(numSwitches[node])
+        main.log.info( "NODE COUNT = %s" % main.numCtrls )
+        main.ONOSbench.createCellFile(main.ONOSbench.ip_address,
+                                      main.cellName,
+                                      main.MN1Ip,
+                                      main.Apps,
+                                      main.ONOSip)
+        main.step( "Apply cell to environment" )
+        cellResult = main.ONOSbench.setCell( main.cellName )
+        verifyResult = main.ONOSbench.verifyCell()
+        stepResult = cellResult and verifyResult
+        utilities.assert_equals(expect=main.TRUE,
+                                actual=stepResult,
+                                onpass="Successfully applied cell to " + \
+                                       "environment",
+                                onfail="Failed to apply cell to environment ")
 
         main.step( "Creating ONOS package" )
         packageResult = main.ONOSbench.onosPackage()
+        stepResult = packageResult
+        utilities.assert_equals(expect=main.TRUE,
+                                actual=stepResult,
+                                onpass="Successfully created ONOS package",
+                                onfail="Failed to create ONOS package")
 
-        main.step( "verify cells" )
-        verifyCellResult = main.ONOSbench.verifyCell()
+        main.step( "Uninstall ONOS package on all Nodes" )
+        uninstallResult = main.TRUE
+        for i in range( int( main.numCtrls ) ):
+            main.log.info( "Uninstalling package on ONOS Node IP: " + main.ONOSip[i] )
+            u_result = main.ONOSbench.onosUninstall( main.ONOSip[i] )
+            utilities.assert_equals(expect=main.TRUE, actual=u_result,
+                                    onpass="Test step PASS",
+                                    onfail="Test step FAIL")
+            uninstallResult = ( uninstallResult and u_result )
 
-        main.log.report( "Initializeing " + str( clusterCount ) + " node cluster." )
-        for node in range(clusterCount):
-            main.log.info("Starting ONOS " + str(node) + " at IP: " + ONOSIp[node])
-            main.ONOSbench.onosInstall( ONOSIp[node])
+        main.step( "Install ONOS package on all Nodes" )
+        installResult = main.TRUE
+        for i in range( int( main.numCtrls ) ):
+            main.log.info( "Installing package on ONOS Node IP: " + main.ONOSip[i] )
+            i_result = main.ONOSbench.onosInstall(node=main.ONOSip[i])
+            utilities.assert_equals(expect=main.TRUE, actual=i_result,
+                                    onpass="Test step PASS",
+                                    onfail="Test step FAIL")
+            installResult = installResult and i_result
 
-        for node in range(clusterCount):
-            for i in range( 2 ):
-                isup = main.ONOSbench.isup( ONOSIp[node] )
-                if isup:
-                    main.log.info("ONOS " + str(node) + " is up\n")
-                    break
-            if not isup:
-                main.log.report( "ONOS " + str(node) + " didn't start!" )
-        main.log.info("Startup sequence complete")
+        main.step( "Verify ONOS nodes UP status" )
+        statusResult = main.TRUE
+        for i in range( int( main.numCtrls ) ):
+            main.log.info( "ONOS Node " + main.ONOSip[i] + " status:" )
+            onos_status = main.ONOSbench.onosStatus(node=main.ONOSip[i])
+            utilities.assert_equals(expect=main.TRUE, actual=onos_status,
+                                    onpass="Test step PASS",
+                                    onfail="Test step FAIL")
+            statusResult = (statusResult and onos_status)
+        time.sleep(2)
+        main.step( "Start ONOS cli using thread" )
+        startCliResult = main.TRUE
+        pool = []
+        main.threadID = 0
+        for i in range(int(main.numCtrls)):
+            t = main.Thread(target=main.CLIs[i].startOnosCli,
+                            threadID=main.threadID,
+                            name="startOnosCli",
+                            args=[main.ONOSip[i]],
+                            kwargs={"onosStartTimeout": main.timeout})
+            pool.append(t)
+            t.start()
+            main.threadID = main.threadID + 1
+        for t in pool:
+            t.join()
+            startCliResult = startCliResult and t.result
+        time.sleep( main.startUpSleep )
 
-        time.sleep(20)
-
-        main.ONOSbench.onosCfgSet( ONOSIp[0], "org.onosproject.store.flow.impl.DistributedFlowRuleStore", "backupEnabled " + str(flowRuleBU))
-        main.ONOSbench.onosCfgSet( ONOSIp[0], "org.onosproject.net.intent.impl.IntentManager", "skipReleaseResourcesOnWithdrawal " + skipRelRsrc)
+        # config apps
+        main.CLIs[0].setCfg( "org.onosproject.store.flow.impl.DistributedFlowRuleStore",
+                            "backupEnabled " + main.flowRuleBU )
+        main.CLIs[0].setCfg( "org.onosproject.net.intent.impl.IntentManager",
+                                  "skipReleaseResourcesOnWithdrawal " + main.skipRelRsrc )
+        main.CLIs[0].setCfg( "org.onosproject.provider.nil.NullProviders", "deviceCount " + str(int(main.numCtrls*10)) )
+        main.CLIs[0].setCfg( "org.onosproject.provider.nil.NullProviders", "topoShape linear" )
+        main.CLIs[0].setCfg( "org.onosproject.provider.nil.NullProviders", "enabled true" )
         if main.flowObj:
-            main.step("Set Intent Compiler use Flow Object")
-            stepResult = utilities.retry(main.ONOSbench.onosCfgSet,
-                                         main.FALSE,
-                                         args=[ONOSIp[0],
-                                               "org.onosproject.net.intent.impl.compiler.IntentConfigurableRegistrator",
-                                               "useFlowObjectives true"],
-                                         sleep=3,
-                                         attempts=3)
-            utilities.assert_equals(expect=main.TRUE,
-                                    actual=stepResult,
-                                    onpass="Successfully set Intent compiler use Flow object",
-                                    onfail="Failed to set up")
-        devices = int(clusterCount)*10
+            main.CLIs[0].setCfg("org.onosproject.net.intent.impl.compiler.IntentConfigurableRegistrator",
+                                "useFlowObjectives", value="true")
+        time.sleep( main.startUpSleep )
 
-        main.step("Setting up null provider")
-        for i in range(3):
-            main.ONOSbench.onosCfgSet( ONOSIp[0], "org.onosproject.provider.nil.NullProviders", "deviceCount " + str(devices))
-            main.ONOSbench.onosCfgSet( ONOSIp[0], "org.onosproject.provider.nil.NullProviders", "topoShape linear")
-            main.ONOSbench.onosCfgSet( ONOSIp[0], "org.onosproject.provider.nil.NullProviders", "enabled true")
-            time.sleep(5)
+        # balanceMasters
+        main.CLIs[0].balanceMasters()
+        time.sleep( main.startUpSleep )
 
-            main.ONOSbench.handle.sendline("onos $OC1 summary")
-            main.ONOSbench.handle.expect(":~")
-
-            before = main.ONOSbench.handle.before
-            if ("devices=" + str(devices)) in before:
-                break
-
-        main.ONOSbench.handle.sendline("""onos $OC1 "balance-masters" """)
-        main.ONOSbench.handle.expect(":~")
-        print main.ONOSbench.handle.before
-        time.sleep(5)
-
-        for i in range(3):
-            passed = main.ONOSbench.verifySummary( ONOSIp[0] )
-            if passed:
-                main.log.info("Clusters have converged")
-                break
-            else:
-                main.log.error("Clusters have not converged, retying...")
-            time.sleep(3)
-
-        main.ONOSbench.logReport(ONOSIp[1], ["ERROR", "WARNING", "EXCEPT"])
-
-    def CASE2( self, main ):
-        import time
-        import json
-        import string
-        import csv
+    def CASE2(self, main):
         import numpy
-        import os.path
 
-        global currentNeighbors
-        neighbors = []
+        main.log.info( "Cluster Count = " + str( main.numCtrls ) )
+        # adjust neighbors
+        if main.numCtrls == 1:
+            main.neighbors = "0"
+            main.log.info( "Neighbors: 0" )
+        elif main.neighbors != "0":
+            main.neighbors = "0"
+            main.log.info( "Neighbors: 0" )
+        elif main.neighbors == "0":
+            main.neighbors = str( main.numCtrls - 1 )
+            main.log.info( "Neighbors: " + main.neighbors )
 
-        try:
-            currentNeighbors
-        except:
-            currentNeighbors = "0"
-            neighbors = ['0']
-        else:
-            if currentNeighbors == "r":      #reset
-                currentNeighbors = "a"
-                neighbors = ['0']
-            else:
-                currentNeighbors = "r"
-                neighbors = ['a']
+        main.log.info( "Config intent-perf app" )
+        main.CLIs[0].setCfg( "org.onosproject.intentperf.IntentPerfInstaller", "numKeys " + main.numKeys )
+        main.CLIs[0].setCfg( "org.onosproject.intentperf.IntentPerfInstaller", "numNeighbors " + str( main.neighbors ) )
+        main.CLIs[0].setCfg( "org.onosproject.intentperf.IntentPerfInstaller", "cyclePeriod " + main.cyclePeriod )
 
-        if clusterCount == 1:
-            currentNeighbors = "r"
+        main.log.info( "Starting intent-perf test for " + str(main.testDuration) + " seconds..." )
+        main.CLIs[0].sendline( "intent-perf-start" )
+        stop = time.time() + float( main.testDuration )
 
-        main.log.info("Cluster Count = " + str(clusterCount))
+        while time.time() < stop:
+            time.sleep(15)
+            result = main.CLIs[0].getIntentPerfSummary()
+            if result:
+                for ip in main.ONOSip:
+                    main.log.info( "Node {} Overall Rate: {}".format( ip, result[ip] ) )
+        main.log.info( "Stop intent-perf" )
+        for node in main.CLIs:
+            node.sendline( "intent-perf-stop" )
+        if result:
+            for ip in main.ONOSip:
+                main.log.info( "Node {} final Overall Rate: {}".format( ip, result[ip] ) )
 
-        intentsRate = main.params['METRICS']['intents_rate']
-        intentsWithdrawn = main.params[ 'METRICS' ][ 'intents_withdrawn' ]
-        intentsFailed  = main.params[ 'METRICS' ][ 'intents_failed' ]
-        testDuration = main.params[ 'TEST' ][ 'duration' ]
-        logInterval = main.params[ 'TEST' ][ 'log_interval' ]
-        debug = main.params[ 'debugMode' ]
-        numKeys = main.params[ 'TEST' ][ 'numKeys' ]
-        cyclePeriod = main.params[ 'TEST' ][ 'cyclePeriod' ]
-        #neighbors = (main.params[ 'TEST' ][ 'neighbors' ]).split(",")
-        metricList = [intentsRate, intentsWithdrawn, intentsFailed]
-
-        for n in range(0, len(neighbors)):
-            if neighbors[n] == 'a':
-                neighbors[n] = str(clusterCount -1)
-                if int(clusterCount) == 1:
-                    neighbors = neighbors.pop()
-
-        for n in neighbors:
-            main.log.info("Run with " + n + " neighbors")
-            time.sleep(5)
-            main.ONOSbench.handle.sendline("onos $OC1 cfg set org.onosproject.intentperf.IntentPerfInstaller numKeys " + numKeys )
-            main.ONOSbench.handle.expect(":~")
-            main.ONOSbench.handle.sendline("onos $OC1 cfg set org.onosproject.intentperf.IntentPerfInstaller numNeighbors " + n )
-            main.ONOSbench.handle.expect(":~")
-            main.ONOSbench.handle.sendline("onos $OC1 cfg set org.onosproject.intentperf.IntentPerfInstaller cyclePeriod " + cyclePeriod )
-            main.ONOSbench.handle.expect(":~")
-
-            cmd = "onos $OC1 intent-perf-start"
-            main.ONOSbench.handle.sendline(cmd)
-            main.ONOSbench.handle.expect(":~")
-            main.log.info("Starting ONOS (all nodes)  intent-perf from $OC1" )
-
-            main.log.info( "Starting test loop for " + str(testDuration) + " seconds...\n" )
-            stop = time.time() + float( testDuration )
-
-            while time.time() < stop:
-                time.sleep( float( logInterval ) )
-                groupResult = []
-                for node in range (1, clusterCount + 1):
-                    groupResult.append(0)
-
-                    cmd = " onos-ssh $OC" + str(node) +  """ cat /opt/onos/log/karaf.log | grep "Throughput:" | tail -1  """
-                    main.log.info("COMMAND: " + str(cmd))
-
-                    x = 0
-                    while True:
-                        main.ONOSbench.handle.sendline(cmd)
-                        time.sleep(6)
-                        main.ONOSbench.handle.expect(":~")
-                        raw = main.ONOSbench.handle.before
-                        if "OVERALL=" in raw:
-                            break
-                        x += 1
-                        if x > 10:
-                            main.log.error("Expected output not being recieved... continuing")
-                            break
-                        time.sleep(2)
-
-                    raw = raw.splitlines()
-                    splitResults = []
-                    for line in raw:
-                        splitResults.extend(line.split(" "))
-
-                    myResult = "--"
-                    for field in splitResults:
-                        if "OVERALL" in field:
-                            myResult = field
-
-                    if myResult == "--":
-                        main.log.error("Parsing/Pexpect error\n" + str(splitResults))
-
-                    myResult = myResult.replace(";", "")
-                    myResult = myResult.replace("OVERALL=","")
-                    myResult = float(myResult)
-                    groupResult[len(groupResult) -1] = myResult
-
-                    main.log.info("Node " + str(node) + " overall rate: " + str(myResult))
-
-                clusterTotal = str(numpy.sum(groupResult))
-                main.log.report("Results from this round of polling: " + str(groupResult))
-                main.log.report("Cluster Total: " + clusterTotal + "\n")
-
-            cmd = "onos $OC1 intent-perf-stop"
-            main.ONOSbench.handle.sendline(cmd)
-            main.ONOSbench.handle.expect(":~")
-            main.log.info("Stopping intentperf" )
-
-            with open(main.dbFileName, "a") as resultsDB:
-                for node in groupResult:
-                    resultString = "'" + commit + "',"
-                    resultString += "'1gig',"
-                    resultString += str(clusterCount) + ","
-                    resultString += "'baremetal" + str(int(groupResult.index(node)) + 1) + "',"
-                    resultString += n + ","
-                    resultString += str(node) + ","
-                    resultString += str(0) + "\n" #no stddev
-                    resultsDB.write(resultString)
-
-            resultsDB.close()
-
-            main.ONOSbench.logReport(ONOSIp[1], ["ERROR", "WARNING", "EXCEPT"])
-
+        with open( main.dbFileName, "a" ) as resultDB:
+            for nodes in range( 0, len( main.ONOSip ) ):
+                resultString = "'" + main.commit + "',"
+                resultString += "'1gig',"
+                resultString += str(main.numCtrls) + ","
+                resultString += "'baremetal" + str( nodes+1 ) + "',"
+                resultString += main.neighbors + ","
+                resultString += result[ main.ONOSip[ nodes ] ]+","
+                resultString += str(0) + "\n"  # no stddev
+                resultDB.write( resultString )
+        resultDB.close()
diff --git a/TestON/tests/SCPF/SCPFintentRerouteLat/SCPFintentRerouteLat.params b/TestON/tests/SCPF/SCPFintentRerouteLat/SCPFintentRerouteLat.params
index 7dbda89..7c69450 100644
--- a/TestON/tests/SCPF/SCPFintentRerouteLat/SCPFintentRerouteLat.params
+++ b/TestON/tests/SCPF/SCPFintentRerouteLat/SCPFintentRerouteLat.params
@@ -15,6 +15,7 @@
         <warmUp>5</warmUp>
         <sampleSize>20</sampleSize>
         <intents>1,100,1000</intents>                       #list format, will be split on ','
+        <FObjintents>1,100</FObjintents>
         <ingress>null:0000000000000001/0</ingress>
         <egress>null:0000000000000007/0</egress>
         <debug>False</debug>
diff --git a/TestON/tests/SCPF/SCPFintentRerouteLat/SCPFintentRerouteLat.py b/TestON/tests/SCPF/SCPFintentRerouteLat/SCPFintentRerouteLat.py
index b282ebf..93c467c 100644
--- a/TestON/tests/SCPF/SCPFintentRerouteLat/SCPFintentRerouteLat.py
+++ b/TestON/tests/SCPF/SCPFintentRerouteLat/SCPFintentRerouteLat.py
@@ -77,7 +77,6 @@
         main.verifyAttempts = int(main.params['ATTEMPTS']['verify'])
         main.sampleSize = int(main.params['TEST']['sampleSize'])
         main.warmUp = int(main.params['TEST']['warmUp'])
-        main.intentsList = (main.params['TEST']['intents']).split(",")
         main.ingress = main.params['TEST']['ingress']
         main.egress = main.params['TEST']['egress']
         main.debug = main.params['TEST']['debug']
@@ -86,9 +85,11 @@
         if main.flowObj == "True":
             main.flowObj = True
             main.dbFileName = main.params['DATABASE']['dbFlowObj']
+            main.intentsList = (main.params['TEST']['FObjintents']).split(",")
         else:
             main.flowObj = False
             main.dbFileName = main.params['DATABASE']['dbName']
+            main.intentsList = (main.params['TEST']['intents']).split(",")
 
         for i in range(0, len(main.intentsList)):
             main.intentsList[i] = int(main.intentsList[i])
diff --git a/TestON/tests/SCPF/SCPFportLat/SCPFportLat.params b/TestON/tests/SCPF/SCPFportLat/SCPFportLat.params
index 0d8687e..0a81dc6 100644
--- a/TestON/tests/SCPF/SCPFportLat/SCPFportLat.params
+++ b/TestON/tests/SCPF/SCPFportLat/SCPFportLat.params
@@ -9,6 +9,11 @@
         <cellApps>drivers,metrics,openflow</cellApps>
     </ENV>
 
+    <DEPENDENCY>
+        <path>/tests/SCPF/SCPFportLat/dependencies/</path>
+        <topology>topo-perf-2sw.py</topology>
+    </DEPENDENCY>
+
     <GIT>
         <autopull>off</autopull>
         <checkout>master</checkout>
diff --git a/TestON/tests/SCPF/SCPFportLat/SCPFportLat.py b/TestON/tests/SCPF/SCPFportLat/SCPFportLat.py
index 35147ca..e6f62ef 100644
--- a/TestON/tests/SCPF/SCPFportLat/SCPFportLat.py
+++ b/TestON/tests/SCPF/SCPFportLat/SCPFportLat.py
@@ -21,6 +21,7 @@
             init = False
 
         #Load values from params file
+        main.testOnDirectory = os.path.dirname(os.getcwd())
         checkoutBranch = main.params[ 'GIT' ][ 'checkout' ]
         gitPull = main.params[ 'GIT' ][ 'autopull' ]
         cellName = main.params[ 'ENV' ][ 'cellName' ]
@@ -34,6 +35,9 @@
         topoCfgName = main.params['TEST']['topoConfigName']
         resultPath = main.params['DB']['portEventResultPath']
         skipMvn = main.params ['TEST']['mci']
+        main.topology = main.params['DEPENDENCY']['topology']
+        main.dependencyPath = main.testOnDirectory + \
+                              main.params['DEPENDENCY']['path']
         testONpath = re.sub( "(tests)$", "bin", main.testDir )  # TestON/bin
 
         # -- INIT SECTION, ONLY RUNS ONCE -- #
@@ -135,6 +139,10 @@
         verifyCellResult = main.ONOSbench.verifyCell()
 
         main.step('Starting mininet topology ')
+        copyResult = main.ONOSbench.copyMininetFile(main.topology,
+                                                    main.dependencyPath,
+                                                    main.Mininet1.user_name,
+                                                    main.Mininet1.ip_address)
         main.Mininet1.startNet()
 
         main.log.report( "Initializeing " + str( clusterCount ) + " node cluster." )
diff --git a/TestON/tests/SCPF/SCPFportLat/dependencies/topo-perf-2sw.py b/TestON/tests/SCPF/SCPFportLat/dependencies/topo-perf-2sw.py
new file mode 100644
index 0000000..ad88767
--- /dev/null
+++ b/TestON/tests/SCPF/SCPFportLat/dependencies/topo-perf-2sw.py
@@ -0,0 +1,19 @@
+'''
+imple 2 switch topology for topologoy performance test
+'''
+
+from mininet.topo import Topo
+
+class MyTopo( Topo ):
+    def __init__(self):
+        Topo.__init__(self)
+        s1 = self.addSwitch( "s1", dpid="0000000000000001")
+        s2 = self.addSwitch( "s2", dpid="0000000000000002")
+
+        h1 = self.addHost( "h1" )
+        h2 = self.addHost( "h2" )
+        self.addLink( s1, s2 )
+        self.addLink( s1, h1 )
+        self.addLink( s2, h2 )
+
+topos = { 'mytopo': ( lambda: MyTopo() ) }
diff --git a/TestON/tests/SCPF/SCPFswitchLat/SCPFswitchLat.py b/TestON/tests/SCPF/SCPFswitchLat/SCPFswitchLat.py
index e905e5a..55cef23 100644
--- a/TestON/tests/SCPF/SCPFswitchLat/SCPFswitchLat.py
+++ b/TestON/tests/SCPF/SCPFswitchLat/SCPFswitchLat.py
@@ -88,7 +88,7 @@
             commit = main.ONOSbench.getVersion()       ####
             commit = (commit.split(" "))[1]
 
-            temp = testONpath.replace("bin","") + "tests/SCPFswitchLat/dependencies/"
+            temp = testONpath.replace("bin","") + "tests/SCPF/SCPFswitchLat/dependencies/"
             main.ONOSbench.scp( main.Mininet1,
                                 temp + "topo-perf-1sw.py",
                                 main.Mininet1.home,
diff --git a/TestON/tests/USECASE/SegmentRouting/SRSwitchFailure/SRSwitchFailure.py b/TestON/tests/USECASE/SegmentRouting/SRSwitchFailure/SRSwitchFailure.py
index b516cc0..19ee08c 100755
--- a/TestON/tests/USECASE/SegmentRouting/SRSwitchFailure/SRSwitchFailure.py
+++ b/TestON/tests/USECASE/SegmentRouting/SRSwitchFailure/SRSwitchFailure.py
@@ -55,6 +55,7 @@
         """
         from tests.USECASE.SegmentRouting.dependencies.Testcaselib import \
             Testcaselib as run
+        import time
         if not hasattr( main, 'apps' ):
             run.initTest( main )
         description = "Bridging and Routing sanity test with 4x4 Leaf-spine "
@@ -69,6 +70,7 @@
         # switch failure
         switch = main.params[ 'kill' ][ 'switch' ]
         run.killSwitch( main, switch, switches='7', links='24' )
+        time.sleep( main.switchSleep )
         run.pingAll( main, "CASE2_Failure" )
         run.recoverSwitch( main, switch, switches='8', links='32' )
         run.checkFlows( main, minFlowCount=350 )
@@ -125,6 +127,7 @@
         """
         from tests.USECASE.SegmentRouting.dependencies.Testcaselib import \
             Testcaselib as run
+        import time
         if not hasattr( main, 'apps' ):
             run.initTest( main )
         description = "Bridging and Routing sanity test with 4x4 Leaf-spine "
@@ -139,6 +142,7 @@
         # switch failure
         switch = main.params[ 'kill' ][ 'switch' ]
         run.killSwitch( main, switch, switches='7', links='24' )
+        time.sleep( main.switchSleep )
         run.pingAll( main, "CASE4_Failure" )
         run.recoverSwitch( main, switch, switches='8', links='32' )
         run.checkFlows( main, minFlowCount=350 )