Merge "Add new variables to record the timestamp"
diff --git a/TestON/drivers/common/api/controller/onosrestdriver.py b/TestON/drivers/common/api/controller/onosrestdriver.py
index 082ab17..15e1e88 100755
--- a/TestON/drivers/common/api/controller/onosrestdriver.py
+++ b/TestON/drivers/common/api/controller/onosrestdriver.py
@@ -1842,12 +1842,12 @@
             else:
                 main.log.error( "Error with REST request, response was: " +
                                     str( response ) )
-                return main.FALSE
+                return main.FALSE, response
         except NotImplementedError as e:
             raise e  # Inform the caller
         except ( AttributeError, TypeError ):
             main.log.exception( self.name + ": Object not as expected" )
-            return None
+            return None, None
         except Exception:
             main.log.exception( self.name + ": Uncaught exception!" )
             main.cleanup()
diff --git a/TestON/drivers/common/cli/onosclidriver.py b/TestON/drivers/common/cli/onosclidriver.py
index ebfd8a5..91a2509 100755
--- a/TestON/drivers/common/cli/onosclidriver.py
+++ b/TestON/drivers/common/cli/onosclidriver.py
@@ -232,7 +232,7 @@
             main.exit()
 
     def startOnosCli( self, ONOSIp, karafTimeout="",
-                      commandlineTimeout=10, onosStartTimeout=60 ):
+                      commandlineTimeout=10, onosStartTimeout=60, waitForStart=False ):
         """
         karafTimeout is an optional argument. karafTimeout value passed
         by user would be used to set the current karaf shell idle timeout.
@@ -257,8 +257,12 @@
                 main.log.info( "ONOS cli is already running" )
                 return main.TRUE
 
-            # Wait for onos start ( -w ) and enter onos cli
-            self.handle.sendline( "onos -w " + str( ONOSIp ) )
+            if waitForStart:
+                # Wait for onos start ( -w ) and enter onos cli
+                startCliCommand = "onos -w "
+            else:
+                startCliCommand = "onos "
+            self.handle.sendline( startCliCommand + str( ONOSIp ) )
             i = self.handle.expect( [
                 "onos>",
                 pexpect.TIMEOUT ], onosStartTimeout )
@@ -271,14 +275,14 @@
                                  sshIdleTimeout " +
                         karafTimeout )
                     self.handle.expect( "\$" )
-                    self.handle.sendline( "onos -w " + str( ONOSIp ) )
+                    self.handle.sendline( startCliCommand + str( ONOSIp ) )
                     self.handle.expect( "onos>" )
                 return main.TRUE
             else:
                 # If failed, send ctrl+c to process and try again
                 main.log.info( "Starting CLI failed. Retrying..." )
                 self.handle.send( "\x03" )
-                self.handle.sendline( "onos -w " + str( ONOSIp ) )
+                self.handle.sendline( startCliCommand + str( ONOSIp ) )
                 i = self.handle.expect( [ "onos>", pexpect.TIMEOUT ],
                                         timeout=30 )
                 if i == 0:
@@ -290,7 +294,7 @@
                                     sshIdleTimeout " +
                             karafTimeout )
                         self.handle.expect( "\$" )
-                        self.handle.sendline( "onos -w " + str( ONOSIp ) )
+                        self.handle.sendline( startCliCommand + str( ONOSIp ) )
                         self.handle.expect( "onos>" )
                     return main.TRUE
                 else:
diff --git a/TestON/drivers/common/cli/onosdriver.py b/TestON/drivers/common/cli/onosdriver.py
index 4df23ab..644b9f7 100755
--- a/TestON/drivers/common/cli/onosdriver.py
+++ b/TestON/drivers/common/cli/onosdriver.py
@@ -762,6 +762,7 @@
         appString = "export ONOS_APPS=" + appString
         onosGroup = "export ONOS_GROUP=" + onosUser
         onosUser = "export ONOS_USER=" + onosUser
+        # FIXME: unset ONOS_USE_SSH when not using SSH?
         if useSSH:
             onosUseSSH = "export ONOS_USE_SSH=true"
         mnString = "export OCN="
@@ -993,6 +994,8 @@
         """
 
         try:
+            self.handle.sendline( "" )
+            self.handle.expect( "\$" )
             self.handle.sendline( " onos-secure-ssh -u " + userName + " -p " + userPWD + " " + node )
 
             # NOTE: this timeout may need to change depending on the network
diff --git a/TestON/tests/CHO/CHOtest/CHOtest.py b/TestON/tests/CHO/CHOtest/CHOtest.py
index 27104b8..411035d 100644
--- a/TestON/tests/CHO/CHOtest/CHOtest.py
+++ b/TestON/tests/CHO/CHOtest/CHOtest.py
@@ -144,6 +144,14 @@
                                      onfail="Test step FAIL" )
             statusResult = ( statusResult and onos_status )
 
+        main.step( "Set up ONOS secure SSH" )
+        secureSshResult = main.TRUE
+        for i in range( int( main.numCtrls ) ):
+            secureSshResult = secureSshResult and main.ONOSbench.onosSecureSSH( node=main.ONOSip[i] )
+        utilities.assert_equals( expect=main.TRUE, actual=secureSshResult,
+                                 onpass="Test step PASS",
+                                 onfail="Test step FAIL" )
+
         main.step( "Start ONOS CLI on all nodes" )
         cliResult = main.TRUE
         main.step(" Start ONOS cli using thread ")
diff --git a/TestON/tests/CHOTestMonkey/CHOTestMonkey.params b/TestON/tests/CHOTestMonkey/CHOTestMonkey.params
index 85b2e0e..d9063cd 100644
--- a/TestON/tests/CHOTestMonkey/CHOTestMonkey.params
+++ b/TestON/tests/CHOTestMonkey/CHOTestMonkey.params
@@ -36,7 +36,7 @@
         <ipv4Prefix>10.1.</ipv4Prefix>
         <karafCliTimeout>7200000</karafCliTimeout>
         <testDuration>86400</testDuration>
-        <package>off</package>
+        <package>on</package>
         <autoPull>off</autoPull>
         <branch>master</branch>
     </TEST>
@@ -94,8 +94,8 @@
             <CLIParamNum>0</CLIParamNum>
             <rerunInterval>5</rerunInterval>
             <maxRerunNum>5</maxRerunNum>
-            <coreFlowNum>4</coreFlowNum>
-            <coreFlowNum6>6</coreFlowNum6>
+            <coreFlowNum>3</coreFlowNum>
+            <coreFlowNum6>5</coreFlowNum6>
         </FlowCheck>
 
         <TrafficCheck>
@@ -392,6 +392,7 @@
         <addPointIntentWeight>3</addPointIntentWeight>
         <linkDownWeight>3</linkDownWeight>
         <deviceDownWeight>2</deviceDownWeight>
+        <toggleFlowObj>0</toggleFlowObj>
     </CASE70>
 
     <CASE80>
diff --git a/TestON/tests/CHOTestMonkey/CHOTestMonkey.py b/TestON/tests/CHOTestMonkey/CHOTestMonkey.py
index e6606d4..b120ed7 100644
--- a/TestON/tests/CHOTestMonkey/CHOTestMonkey.py
+++ b/TestON/tests/CHOTestMonkey/CHOTestMonkey.py
@@ -147,6 +147,24 @@
                                      onfail="Test step FAIL" )
             installResult = ( installResult and iResult )
 
+        main.step( "Verify ONOS nodes UP status" )
+        statusResult = main.TRUE
+        for i in range( int( main.numCtrls ) ):
+            main.log.info( "ONOS Node " + main.onosIPs[i] + " status:" )
+            onos_status = main.ONOSbench.onosStatus( node=main.onosIPs[i] )
+            utilities.assert_equals( expect=main.TRUE, actual=onos_status,
+                                     onpass="Test step PASS",
+                                     onfail="Test step FAIL" )
+            statusResult = ( statusResult and onos_status )
+
+        main.step( "Set up ONOS secure SSH" )
+        secureSshResult = main.TRUE
+        for i in range( int( main.numCtrls ) ):
+            secureSshResult = secureSshResult and main.ONOSbench.onosSecureSSH( node=main.ONOSip[i] )
+        utilities.assert_equals( expect=main.TRUE, actual=secureSshResult,
+                                 onpass="Test step PASS",
+                                 onfail="Test step FAIL" )
+
         main.step( "Start ONOS CLI on all nodes" )
         cliResult = main.TRUE
         startCliResult  = main.TRUE
@@ -781,9 +799,12 @@
         pointIntentNum = 0
         downDeviceNum = 0
         downLinkNum = 0
+        flowObj = False
         upControllers = [ 1, 2, 3 ]
         while True:
             events = []
+            for i in range( int( main.params[ 'CASE70' ][ 'toggleFlowObj' ] ) ):
+                events.append( 'toggle-flowobj' )
             for i in range( int( main.params[ 'CASE70' ][ 'addHostIntentWeight' ] ) ):
                 events.append( 'add-host-intent' )
             for i in range( int( main.params[ 'CASE70' ][ 'addPointIntentWeight' ] ) ):
@@ -838,6 +859,12 @@
             elif event == 'device-up':
                 main.eventGenerator.triggerEvent( EventType().NETWORK_DEVICE_UP, EventScheduleMethod().RUN_BLOCK, 'random' )
                 downDeviceNum -= 1
+            elif event == 'toggle-flowobj':
+                if flowObj == False:
+                    main.eventGenerator.triggerEvent( EventType().ONOS_SET_FLOWOBJ, EventScheduleMethod().RUN_BLOCK, 'true' )
+                else:
+                    main.eventGenerator.triggerEvent( EventType().ONOS_SET_FLOWOBJ, EventScheduleMethod().RUN_BLOCK, 'false' )
+                flowObj = not flowObj
             else:
                 pass
             main.eventGenerator.triggerEvent( EventType().CHECK_TOPO, EventScheduleMethod().RUN_NON_BLOCK )
diff --git a/TestON/tests/FUNC/FUNCbgpls/FUNCbgpls.py b/TestON/tests/FUNC/FUNCbgpls/FUNCbgpls.py
index 4780ff9..282e623 100755
--- a/TestON/tests/FUNC/FUNCbgpls/FUNCbgpls.py
+++ b/TestON/tests/FUNC/FUNCbgpls/FUNCbgpls.py
@@ -142,6 +142,13 @@
         utilities.assert_equals( expect=main.TRUE, actual=onos1Isup,
                                  onpass="ONOS startup successful",
                                  onfail="ONOS startup failed" )
+
+        main.step( "Set up ONOS secure SSH" )
+        secureSshResult = main.ONOSbench.onosSecureSSH( node=main.nodes[0].ip_address )
+        utilities.assert_equals( expect=main.TRUE, actual=secureSshResult,
+                                 onpass="Test step PASS",
+                                 onfail="Test step FAIL" )
+
         main.step( "Starting ONOS CLI sessions" )
         print main.nodes[0].ip_address
         cliResults = main.ONOScli1.startOnosCli( main.nodes[0].ip_address )
@@ -590,4 +597,4 @@
                                             "EXCEPT"] )
         utilities.assert_equals( expect= 0, actual=errorLog,
                                  onpass="No Exception or Error occured",
-                                 onfail="Exception or Error occured" )
\ No newline at end of file
+                                 onfail="Exception or Error occured" )
diff --git a/TestON/tests/FUNC/FUNCflow/FUNCflow.py b/TestON/tests/FUNC/FUNCflow/FUNCflow.py
index 47b536c..1acc76a 100644
--- a/TestON/tests/FUNC/FUNCflow/FUNCflow.py
+++ b/TestON/tests/FUNC/FUNCflow/FUNCflow.py
@@ -200,6 +200,14 @@
                                  onpass="ONOS service is ready",
                                  onfail="ONOS service did not start properly" )
 
+        main.step( "Set up ONOS secure SSH" )
+        secureSshResult = main.TRUE
+        for i in range( int( main.numCtrls ) ):
+            secureSshResult = secureSshResult and main.ONOSbench.onosSecureSSH( node=main.ONOSip[i] )
+        utilities.assert_equals( expect=main.TRUE, actual=secureSshResult,
+                                 onpass="Test step PASS",
+                                 onfail="Test step FAIL" )
+
         main.step( "Start ONOS cli" )
         cliResult = main.TRUE
         for i in range( main.numCtrls ):
diff --git a/TestON/tests/FUNC/FUNCintent/FUNCintent.py b/TestON/tests/FUNC/FUNCintent/FUNCintent.py
index b7a4a65..1371453 100644
--- a/TestON/tests/FUNC/FUNCintent/FUNCintent.py
+++ b/TestON/tests/FUNC/FUNCintent/FUNCintent.py
@@ -229,6 +229,14 @@
                                  onpass="ONOS service is ready on all nodes",
                                  onfail="ONOS service did not start properly on all nodes" )
 
+        main.step( "Set up ONOS secure SSH" )
+        secureSshResult = main.TRUE
+        for i in range( int( main.numCtrls ) ):
+            secureSshResult = secureSshResult and main.ONOSbench.onosSecureSSH( node=main.ONOSip[i] )
+        utilities.assert_equals( expect=main.TRUE, actual=secureSshResult,
+                                 onpass="Test step PASS",
+                                 onfail="Test step FAIL" )
+
         main.step( "Start ONOS cli" )
         cliResult = main.TRUE
         for i in range( main.numCtrls ):
@@ -2379,4 +2387,4 @@
                                  onpass=main.assertReturnString,
                                  onfail=main.assertReturnString )
 
-        main.intentFunction.report( main )
\ No newline at end of file
+        main.intentFunction.report( main )
diff --git a/TestON/tests/FUNC/FUNCintentRest/FUNCintentRest.py b/TestON/tests/FUNC/FUNCintentRest/FUNCintentRest.py
index ee0937f..dc8df66 100644
--- a/TestON/tests/FUNC/FUNCintentRest/FUNCintentRest.py
+++ b/TestON/tests/FUNC/FUNCintentRest/FUNCintentRest.py
@@ -259,6 +259,14 @@
         # supported by the Rest API remove this when Leader Checking is supported
         # by the REST API
 
+        main.step( "Set up ONOS secure SSH" )
+        secureSshResult = main.TRUE
+        for i in range( int( main.numCtrls ) ):
+            secureSshResult = secureSshResult and main.ONOSbench.onosSecureSSH( node=main.ONOSip[i] )
+        utilities.assert_equals( expect=main.TRUE, actual=secureSshResult,
+                                 onpass="Test step PASS",
+                                 onfail="Test step FAIL" )
+
         main.step( "Start ONOS cli" )
         cliResult = main.TRUE
         for i in range( main.numCtrls ):
diff --git a/TestON/tests/FUNC/FUNCipv6Intent/FUNCipv6Intent.py b/TestON/tests/FUNC/FUNCipv6Intent/FUNCipv6Intent.py
index 2f70420..8694a0d 100755
--- a/TestON/tests/FUNC/FUNCipv6Intent/FUNCipv6Intent.py
+++ b/TestON/tests/FUNC/FUNCipv6Intent/FUNCipv6Intent.py
@@ -222,6 +222,14 @@
                                  onpass="ONOS service is ready",
                                  onfail="ONOS service did not start properly" )
 
+        main.step( "Set up ONOS secure SSH" )
+        secureSshResult = main.TRUE
+        for i in range( int( main.numCtrls ) ):
+            secureSshResult = secureSshResult and main.ONOSbench.onosSecureSSH( node=main.ONOSip[i] )
+        utilities.assert_equals( expect=main.TRUE, actual=secureSshResult,
+                                 onpass="Test step PASS",
+                                 onfail="Test step FAIL" )
+
         main.step( "Start ONOS cli" )
         cliResult = main.TRUE
         for i in range( main.numCtrls ):
diff --git a/TestON/tests/FUNC/FUNCnetconf/FUNCnetconf.py b/TestON/tests/FUNC/FUNCnetconf/FUNCnetconf.py
index 09a56c2..8b145ab 100644
--- a/TestON/tests/FUNC/FUNCnetconf/FUNCnetconf.py
+++ b/TestON/tests/FUNC/FUNCnetconf/FUNCnetconf.py
@@ -243,6 +243,14 @@
         # supported by the Rest API remove this when Leader Checking is supported
         # by the REST API
 
+        main.step( "Set up ONOS secure SSH" )
+        secureSshResult = main.TRUE
+        for i in range( int( main.numCtrls ) ):
+            secureSshResult = secureSshResult and main.ONOSbench.onosSecureSSH( node=main.ONOSip[i] )
+        utilities.assert_equals( expect=main.TRUE, actual=secureSshResult,
+                                 onpass="Test step PASS",
+                                 onfail="Test step FAIL" )
+
         main.step( "Start ONOS cli" )
         cliResult = main.TRUE
         for i in range( main.numCtrls ):
diff --git a/TestON/tests/FUNC/FUNCoptical/FUNCoptical.py b/TestON/tests/FUNC/FUNCoptical/FUNCoptical.py
index 4fa0f10..c85d39e 100644
--- a/TestON/tests/FUNC/FUNCoptical/FUNCoptical.py
+++ b/TestON/tests/FUNC/FUNCoptical/FUNCoptical.py
@@ -209,6 +209,14 @@
                                  onpass="ONOS service is ready on all nodes",
                                  onfail="ONOS service did not start properly on all nodes" )
 
+        main.step( "Set up ONOS secure SSH" )
+        secureSshResult = main.TRUE
+        for i in range( int( main.numCtrls ) ):
+            secureSshResult = secureSshResult and main.ONOSbench.onosSecureSSH( node=main.ONOSip[i] )
+        utilities.assert_equals( expect=main.TRUE, actual=secureSshResult,
+                                 onpass="Test step PASS",
+                                 onfail="Test step FAIL" )
+
         main.step( "Start ONOS cli" )
         cliResult = main.TRUE
         for i in range( main.numCtrls ):
@@ -705,4 +713,4 @@
         utilities.assert_equals( expect=main.TRUE,
                                  actual=removeResult,
                                  onpass="Successfully removed host intents",
-                                 onfail="Failed to remove host intents" )
\ No newline at end of file
+                                 onfail="Failed to remove host intents" )
diff --git a/TestON/tests/FUNC/FUNCovsdbtest/FUNCovsdbtest.py b/TestON/tests/FUNC/FUNCovsdbtest/FUNCovsdbtest.py
index 91475c6..5ff2606 100644
--- a/TestON/tests/FUNC/FUNCovsdbtest/FUNCovsdbtest.py
+++ b/TestON/tests/FUNC/FUNCovsdbtest/FUNCovsdbtest.py
@@ -152,6 +152,14 @@
                                  onpass="ONOS service is ready on all nodes",
                                  onfail="ONOS service did not start properly on all nodes" )
 
+        main.step( "Set up ONOS secure SSH" )
+        secureSshResult = main.TRUE
+        for i in range( int( main.numCtrls ) ):
+            secureSshResult = secureSshResult and main.ONOSbench.onosSecureSSH( node=main.ONOSip[i] )
+        utilities.assert_equals( expect=main.TRUE, actual=secureSshResult,
+                                 onpass="Test step PASS",
+                                 onfail="Test step FAIL" )
+
         main.step( "Starting ONOS CLI sessions" )
         cliResults = main.ONOScli1.startOnosCli( main.nodes[ 0 ].ip_address )
         utilities.assert_equals( expect=main.TRUE, actual=cliResults,
diff --git a/TestON/tests/FUNC/FUNCvirNetNB/FUNCvirNetNB.py b/TestON/tests/FUNC/FUNCvirNetNB/FUNCvirNetNB.py
index e35ac4e..9545a4e 100644
--- a/TestON/tests/FUNC/FUNCvirNetNB/FUNCvirNetNB.py
+++ b/TestON/tests/FUNC/FUNCvirNetNB/FUNCvirNetNB.py
@@ -155,6 +155,12 @@
                      onfail="ONOS startup failed" )
         time.sleep( main.startUpSleep )
 
+        main.step( "Set up ONOS secure SSH" )
+        secureSshResult = main.ONOSbench.onosSecureSSH( node=main.nodes[0].ip_address )
+        utilities.assert_equals( expect=main.TRUE, actual=secureSshResult,
+                                 onpass="Test step PASS",
+                                 onfail="Test step FAIL" )
+
         main.step( "Starting ONOS CLI sessions" )
 
         print main.nodes[0].ip_address
diff --git a/TestON/tests/HA/HAclusterRestart/HAclusterRestart.py b/TestON/tests/HA/HAclusterRestart/HAclusterRestart.py
index 914c3ce..fba0007 100644
--- a/TestON/tests/HA/HAclusterRestart/HAclusterRestart.py
+++ b/TestON/tests/HA/HAclusterRestart/HAclusterRestart.py
@@ -222,6 +222,14 @@
                                  onpass="ONOS startup successful",
                                  onfail="ONOS startup failed" )
 
+        main.step( "Set up ONOS secure SSH" )
+        secureSshResult = main.TRUE
+        for node in main.nodes:
+            secureSshResult = secureSshResult and main.ONOSbench.onosSecureSSH( node=node.ip_address )
+        utilities.assert_equals( expect=main.TRUE, actual=secureSshResult,
+                                 onpass="Test step PASS",
+                                 onfail="Test step FAIL" )
+
         main.step( "Starting ONOS CLI sessions" )
         cliResults = main.TRUE
         threads = []
diff --git a/TestON/tests/HA/HAfullNetPartition/HAfullNetPartition.py b/TestON/tests/HA/HAfullNetPartition/HAfullNetPartition.py
index 7fee993..6f53489 100644
--- a/TestON/tests/HA/HAfullNetPartition/HAfullNetPartition.py
+++ b/TestON/tests/HA/HAfullNetPartition/HAfullNetPartition.py
@@ -247,6 +247,14 @@
                                  onpass="ONOS startup successful",
                                  onfail="ONOS startup failed" )
 
+        main.step( "Set up ONOS secure SSH" )
+        secureSshResult = main.TRUE
+        for node in main.nodes:
+            secureSshResult = secureSshResult and main.ONOSbench.onosSecureSSH( node=node.ip_address )
+        utilities.assert_equals( expect=main.TRUE, actual=secureSshResult,
+                                 onpass="Test step PASS",
+                                 onfail="Test step FAIL" )
+
         main.step( "Starting ONOS CLI sessions" )
         cliResults = main.TRUE
         threads = []
diff --git a/TestON/tests/HA/HAkillNodes/HAkillNodes.py b/TestON/tests/HA/HAkillNodes/HAkillNodes.py
index ead3713..a579cff 100644
--- a/TestON/tests/HA/HAkillNodes/HAkillNodes.py
+++ b/TestON/tests/HA/HAkillNodes/HAkillNodes.py
@@ -254,6 +254,14 @@
                                  onpass="ONOS startup successful",
                                  onfail="ONOS startup failed" )
 
+        main.step( "Set up ONOS secure SSH" )
+        secureSshResult = main.TRUE
+        for node in main.nodes:
+            secureSshResult = secureSshResult and main.ONOSbench.onosSecureSSH( node=node.ip_address )
+        utilities.assert_equals( expect=main.TRUE, actual=secureSshResult,
+                                 onpass="Test step PASS",
+                                 onfail="Test step FAIL" )
+
         main.step( "Starting ONOS CLI sessions" )
         cliResults = main.TRUE
         threads = []
diff --git a/TestON/tests/HA/HAsanity/HAsanity.py b/TestON/tests/HA/HAsanity/HAsanity.py
index f23935f..feb69bf 100644
--- a/TestON/tests/HA/HAsanity/HAsanity.py
+++ b/TestON/tests/HA/HAsanity/HAsanity.py
@@ -223,6 +223,14 @@
                                  onpass="ONOS startup successful",
                                  onfail="ONOS startup failed" )
 
+        main.step( "Set up ONOS secure SSH" )
+        secureSshResult = main.TRUE
+        for node in main.nodes:
+            secureSshResult = secureSshResult and main.ONOSbench.onosSecureSSH( node=node.ip_address )
+        utilities.assert_equals( expect=main.TRUE, actual=secureSshResult,
+                                 onpass="Test step PASS",
+                                 onfail="Test step FAIL" )
+
         main.step( "Starting ONOS CLI sessions" )
         cliResults = main.TRUE
         threads = []
diff --git a/TestON/tests/HA/HAscaling/HAscaling.py b/TestON/tests/HA/HAscaling/HAscaling.py
index f3ccacf..2bc1d13 100644
--- a/TestON/tests/HA/HAscaling/HAscaling.py
+++ b/TestON/tests/HA/HAscaling/HAscaling.py
@@ -288,6 +288,14 @@
                                  onpass="ONOS startup successful",
                                  onfail="ONOS startup failed" )
 
+        main.step( "Set up ONOS secure SSH" )
+        secureSshResult = main.TRUE
+        for node in main.nodes:
+            secureSshResult = secureSshResult and main.ONOSbench.onosSecureSSH( node=node.ip_address )
+        utilities.assert_equals( expect=main.TRUE, actual=secureSshResult,
+                                 onpass="Test step PASS",
+                                 onfail="Test step FAIL" )
+
         main.step( "Starting ONOS CLI sessions" )
         cliResults = main.TRUE
         threads = []
diff --git a/TestON/tests/HA/HAsingleInstanceRestart/HAsingleInstanceRestart.py b/TestON/tests/HA/HAsingleInstanceRestart/HAsingleInstanceRestart.py
index f158408..702b09e 100644
--- a/TestON/tests/HA/HAsingleInstanceRestart/HAsingleInstanceRestart.py
+++ b/TestON/tests/HA/HAsingleInstanceRestart/HAsingleInstanceRestart.py
@@ -212,6 +212,14 @@
                                  onpass="ONOS startup successful",
                                  onfail="ONOS startup failed" )
 
+        main.step( "Set up ONOS secure SSH" )
+        secureSshResult = main.TRUE
+        for node in main.nodes:
+            secureSshResult = secureSshResult and main.ONOSbench.onosSecureSSH( node=node.ip_address )
+        utilities.assert_equals( expect=main.TRUE, actual=secureSshResult,
+                                 onpass="Test step PASS",
+                                 onfail="Test step FAIL" )
+
         main.step( "Starting ONOS CLI sessions" )
         cliResults = main.TRUE
         threads = []
diff --git a/TestON/tests/HA/HAstopNodes/HAstopNodes.py b/TestON/tests/HA/HAstopNodes/HAstopNodes.py
index 388200a..ddf9b2a 100644
--- a/TestON/tests/HA/HAstopNodes/HAstopNodes.py
+++ b/TestON/tests/HA/HAstopNodes/HAstopNodes.py
@@ -247,6 +247,14 @@
                                  onpass="ONOS startup successful",
                                  onfail="ONOS startup failed" )
 
+        main.step( "Set up ONOS secure SSH" )
+        secureSshResult = main.TRUE
+        for node in main.nodes:
+            secureSshResult = secureSshResult and main.ONOSbench.onosSecureSSH( node=node.ip_address )
+        utilities.assert_equals( expect=main.TRUE, actual=secureSshResult,
+                                 onpass="Test step PASS",
+                                 onfail="Test step FAIL" )
+
         main.step( "Starting ONOS CLI sessions" )
         cliResults = main.TRUE
         threads = []
diff --git a/TestON/tests/HA/HAswapNodes/HAswapNodes.py b/TestON/tests/HA/HAswapNodes/HAswapNodes.py
index 24daf1d..60dff34 100644
--- a/TestON/tests/HA/HAswapNodes/HAswapNodes.py
+++ b/TestON/tests/HA/HAswapNodes/HAswapNodes.py
@@ -282,6 +282,14 @@
                                  onpass="ONOS startup successful",
                                  onfail="ONOS startup failed" )
 
+        main.step( "Set up ONOS secure SSH" )
+        secureSshResult = main.TRUE
+        for node in main.nodes:
+            secureSshResult = secureSshResult and main.ONOSbench.onosSecureSSH( node=node.ip_address )
+        utilities.assert_equals( expect=main.TRUE, actual=secureSshResult,
+                                 onpass="Test step PASS",
+                                 onfail="Test step FAIL" )
+
         main.step( "Starting ONOS CLI sessions" )
         cliResults = main.TRUE
         threads = []
diff --git a/TestON/tests/MISC/SCPFbatchFlowResp/SCPFbatchFlowResp.py b/TestON/tests/MISC/SCPFbatchFlowResp/SCPFbatchFlowResp.py
index f1ffb9b..183a3e6 100755
--- a/TestON/tests/MISC/SCPFbatchFlowResp/SCPFbatchFlowResp.py
+++ b/TestON/tests/MISC/SCPFbatchFlowResp/SCPFbatchFlowResp.py
@@ -344,15 +344,20 @@
         main.addedBatchList = []
         q = Queue()
         tAllAdded = 0
+        main.postFailed = False
 
         def postWorker(id):
             while True:
                 item = q.get()
                 #print json.dumps(item)
                 status,response = main.ONOSrest.sendFlowBatch(batch = item)
-                main.log.info("Thread {} is working on posting. ".format(id))
-                #print json.dumps(response)
-                main.addedBatchList.append(response[1])
+                if status == main.TRUE:
+                    main.log.info("Thread {} is working on posting. ".format(id))
+                    #print json.dumps(response)
+                    main.addedBatchList.append(response[1])
+                else:
+                    main.log.error( "Thread {} failed to post.".format(id) )
+                    main.postFailed = True
                 q.task_done()
 
         for i in range( int( main.params['CASE2100']['numThreads'])):
@@ -367,6 +372,10 @@
 
         q.join()
         tLastPostEnd = time.time()
+        if main.postFailed:
+            main.log.error( "Flow batch posting failed, exit test" )
+            main.cleanup()
+            main.exit()
 
         main.step("Check to ensure all flows are in added state.")
         #pprint(main.addedBatchList)
diff --git a/TestON/tests/SCPF/SCPFflowTp1g/SCPFflowTp1g.py b/TestON/tests/SCPF/SCPFflowTp1g/SCPFflowTp1g.py
index c87546a..50ca811 100644
--- a/TestON/tests/SCPF/SCPFflowTp1g/SCPFflowTp1g.py
+++ b/TestON/tests/SCPF/SCPFflowTp1g/SCPFflowTp1g.py
@@ -129,11 +129,13 @@
                 main.log.report( "ONOS " + str(node) + " didn't start!" )
 
         for node in range(1, clusterCount + 1):
+            secureSshResult = main.ONOSbench.onosSecureSSH( ONOSIp[node] )
             exec "a = main.ONOS%scli.startOnosCli" %str(node)
             a(ONOSIp[node])
 
         main.log.info("Startup sequence complete")
         main.ONOSbench.logReport(ONOSIp[1], ["ERROR", "WARNING", "EXCEPT"], outputMode="d")
+
     def CASE2( self, main ):
         #
         # This is the flow TP test
diff --git a/TestON/tests/SCPF/SCPFhostLat/SCPFhostLat.py b/TestON/tests/SCPF/SCPFhostLat/SCPFhostLat.py
index ddcf813..42159b4 100644
--- a/TestON/tests/SCPF/SCPFhostLat/SCPFhostLat.py
+++ b/TestON/tests/SCPF/SCPFhostLat/SCPFhostLat.py
@@ -178,6 +178,14 @@
                                      onfail="Test step FAIL" )
             statusResult = ( statusResult and onos_status )
 
+        main.step( "Set up ONOS secure SSH" )
+        secureSshResult = main.TRUE
+        for i in range( int( main.numCtrls ) ):
+            secureSshResult = secureSshResult and main.ONOSbench.onosSecureSSH( node=main.ONOSip[i] )
+        utilities.assert_equals( expect=main.TRUE, actual=secureSshResult,
+                                 onpass="Test step PASS",
+                                 onfail="Test step FAIL" )
+
         main.step( "Start ONOS CLI on all nodes" )
         cliResult = main.TRUE
         main.step(" Start ONOS cli using thread ")
diff --git a/TestON/tests/SCPF/SCPFintentEventTp/SCPFintentEventTp.py b/TestON/tests/SCPF/SCPFintentEventTp/SCPFintentEventTp.py
index 04d99c4..42c3522 100644
--- a/TestON/tests/SCPF/SCPFintentEventTp/SCPFintentEventTp.py
+++ b/TestON/tests/SCPF/SCPFintentEventTp/SCPFintentEventTp.py
@@ -176,6 +176,15 @@
                                     onfail="Test step FAIL")
             statusResult = (statusResult and onos_status)
         time.sleep(2)
+
+        main.step( "Set up ONOS secure SSH" )
+        secureSshResult = main.TRUE
+        for i in range( int( main.numCtrls ) ):
+            secureSshResult = secureSshResult and main.ONOSbench.onosSecureSSH( node=main.ONOSip[i] )
+        utilities.assert_equals( expect=main.TRUE, actual=secureSshResult,
+                                 onpass="Test step PASS",
+                                 onfail="Test step FAIL" )
+
         main.step( "Start ONOS cli using thread" )
         startCliResult = main.TRUE
         pool = []
diff --git a/TestON/tests/SCPF/SCPFintentInstallWithdrawLat/SCPFintentInstallWithdrawLat.py b/TestON/tests/SCPF/SCPFintentInstallWithdrawLat/SCPFintentInstallWithdrawLat.py
index 0b8a465..1c04fd1 100644
--- a/TestON/tests/SCPF/SCPFintentInstallWithdrawLat/SCPFintentInstallWithdrawLat.py
+++ b/TestON/tests/SCPF/SCPFintentInstallWithdrawLat/SCPFintentInstallWithdrawLat.py
@@ -173,6 +173,15 @@
                                     onpass="Test step PASS",
                                     onfail="Test step FAIL")
             statusResult = (statusResult and onos_status)
+
+        main.step( "Set up ONOS secure SSH" )
+        secureSshResult = main.TRUE
+        for i in range( int( main.numCtrls ) ):
+            secureSshResult = secureSshResult and main.ONOSbench.onosSecureSSH( node=main.ONOSip[i] )
+        utilities.assert_equals( expect=main.TRUE, actual=secureSshResult,
+                                 onpass="Test step PASS",
+                                 onfail="Test step FAIL" )
+
         time.sleep(2)
         main.step("Start ONOS CLI on all nodes")
         cliResult = main.TRUE
diff --git a/TestON/tests/SCPF/SCPFintentRerouteLat/SCPFintentRerouteLat.params b/TestON/tests/SCPF/SCPFintentRerouteLat/SCPFintentRerouteLat.params
index 7c69450..19d9806 100644
--- a/TestON/tests/SCPF/SCPFintentRerouteLat/SCPFintentRerouteLat.params
+++ b/TestON/tests/SCPF/SCPFintentRerouteLat/SCPFintentRerouteLat.params
@@ -20,6 +20,15 @@
         <egress>null:0000000000000007/0</egress>
         <debug>False</debug>
         <flowObj>False</flowObj>
+        <deviceCount>8</deviceCount>
+        <end1>
+            <name>null:0000000000000004</name>
+            <port>0000000000000004/1</port>
+        </end1>
+        <end2>
+            <name>null:0000000000000003</name>
+            <port>0000000000000003/2</port>>
+        </end2>
     </TEST>
     <DATABASE>
         <dbName>/tmp/IntentRerouteLatDB</dbName>
diff --git a/TestON/tests/SCPF/SCPFintentRerouteLat/SCPFintentRerouteLat.py b/TestON/tests/SCPF/SCPFintentRerouteLat/SCPFintentRerouteLat.py
index 2e32f60..e861f0c 100644
--- a/TestON/tests/SCPF/SCPFintentRerouteLat/SCPFintentRerouteLat.py
+++ b/TestON/tests/SCPF/SCPFintentRerouteLat/SCPFintentRerouteLat.py
@@ -81,6 +81,9 @@
         main.egress = main.params['TEST']['egress']
         main.debug = main.params['TEST']['debug']
         main.flowObj = main.params['TEST']['flowObj']
+        main.deviceCount = int(main.params['TEST']['deviceCount'])
+        main.end1 = main.params['TEST']['end1']
+        main.end2 = main.params['TEST']['end2']
 
         if main.flowObj == "True":
             main.flowObj = True
@@ -185,6 +188,15 @@
                                     onpass="Test step PASS",
                                     onfail="Test step FAIL")
             statusResult = (statusResult and onos_status)
+
+        main.step( "Set up ONOS secure SSH" )
+        secureSshResult = main.TRUE
+        for i in range( int( main.numCtrls ) ):
+            secureSshResult = secureSshResult and main.ONOSbench.onosSecureSSH( node=main.ONOSip[i] )
+        utilities.assert_equals( expect=main.TRUE, actual=secureSshResult,
+                                 onpass="Test step PASS",
+                                 onfail="Test step FAIL" )
+
         time.sleep(2)
         main.step("Start ONOS CLI on all nodes")
         cliResult = main.TRUE
@@ -207,7 +219,7 @@
         time.sleep(main.startUpSleep)
 
         # configure apps
-        main.CLIs[0].setCfg("org.onosproject.provider.nil.NullProviders", "deviceCount", value=8)
+        main.CLIs[0].setCfg("org.onosproject.provider.nil.NullProviders", "deviceCount", value=main.deviceCount)
         main.CLIs[0].setCfg("org.onosproject.provider.nil.NullProviders", "topoShape", value="reroute")
         main.CLIs[0].setCfg("org.onosproject.provider.nil.NullProviders", "enabled", value="true")
         main.CLIs[0].setCfg("org.onosproject.store.flow.impl.DistributedFlowRuleStore", "backupEnabled", value="false")
@@ -219,8 +231,8 @@
         # Balance Master
         main.CLIs[0].balanceMasters()
         if len(main.ONOSip) > 1:
-            main.CLIs[0].deviceRole("null:0000000000000003", main.ONOSip[0])
-            main.CLIs[0].deviceRole("null:0000000000000004", main.ONOSip[0])
+            main.CLIs[0].deviceRole(main.end1[ 'name' ], main.ONOSip[0])
+            main.CLIs[0].deviceRole(main.end2[ 'name' ], main.ONOSip[0])
         time.sleep( main.setMasterSleep )
 
     def CASE2( self, main ):
@@ -260,7 +272,7 @@
                     summary = json.loads(main.CLIs[0].summary(timeout=main.timeout))
                     linkCheck = summary.get("links")
                     flowsCheck = summary.get("flows")
-                    if linkCheck == 16 and flowsCheck == batchSize * 7:
+                    if linkCheck == main.deviceCount * 2 and flowsCheck == batchSize * (main.deviceCount - 1 ):
                         main.log.info("links: {}, flows: {} ".format(linkCheck, flowsCheck))
                         verify = main.TRUE
                         break
@@ -274,7 +286,7 @@
                     main.CLIs[0].purgeWithdrawnIntents()
                     main.CLIs[0].setCfg("org.onosproject.provider.nil.NullProviders", "deviceCount", value=0)
                     main.CLIs[0].setCfg("org.onosproject.provider.nil.NullProviders", "enabled", value="false")
-                    main.CLIs[0].setCfg("org.onosproject.provider.nil.NullProviders", "deviceCount", value=8)
+                    main.CLIs[0].setCfg("org.onosproject.provider.nil.NullProviders", "deviceCount", value=main.deviceCount)
                     main.CLIs[0].setCfg("org.onosproject.provider.nil.NullProviders", "enabled", value="true")
                     if validRun >= main.warmUp:
                         invalidRun += 1
@@ -284,7 +296,7 @@
                         continue
 
                 # Bring link down
-                main.CLIs[0].link("0000000000000004/1", "0000000000000003/2", "down",
+                main.CLIs[0].link( main.end1[ 'port' ], main.end2[ 'port' ], "down",
                                   timeout=main.timeout, showResponse=False)
                 verify = main.FALSE
                 k = 0
@@ -294,7 +306,7 @@
                     summary = json.loads(main.CLIs[0].summary(timeout=main.timeout))
                     linkCheck = summary.get("links")
                     flowsCheck = summary.get("flows")
-                    if linkCheck == 14:
+                    if linkCheck == (main.deviceCount - 1) * 2:
                         main.log.info("links: {}, flows: {} ".format(linkCheck, flowsCheck))
                         verify = main.TRUE
                         break
@@ -308,7 +320,7 @@
                     main.CLIs[0].purgeWithdrawnIntents()
                     main.CLIs[0].setCfg("org.onosproject.provider.nil.NullProviders", "deviceCount", value=0)
                     main.CLIs[0].setCfg("org.onosproject.provider.nil.NullProviders", "enabled", value="false")
-                    main.CLIs[0].setCfg("org.onosproject.provider.nil.NullProviders", "deviceCount", value=8)
+                    main.CLIs[0].setCfg("org.onosproject.provider.nil.NullProviders", "deviceCount", value=main.deviceCount)
                     main.CLIs[0].setCfg("org.onosproject.provider.nil.NullProviders", "enabled", value="true")
                     if validRun >= main.warmUp:
                         invalidRun += 1
@@ -346,7 +358,7 @@
                     main.CLIs[0].purgeWithdrawnIntents()
                     main.CLIs[0].setCfg("org.onosproject.provider.nil.NullProviders", "deviceCount", value=0)
                     main.CLIs[0].setCfg("org.onosproject.provider.nil.NullProviders", "enabled", value="false")
-                    main.CLIs[0].setCfg("org.onosproject.provider.nil.NullProviders", "deviceCount", value=8)
+                    main.CLIs[0].setCfg("org.onosproject.provider.nil.NullProviders", "deviceCount", value=main.deviceCount)
                     main.CLIs[0].setCfg("org.onosproject.provider.nil.NullProviders", "enabled", value="true")
                     if validRun >= main.warmUp:
                         invalidRun += 1
@@ -374,7 +386,7 @@
                 validRun += 1
 
                 # Verify Summary after we bring up link, and withdrawn intents
-                main.CLIs[0].link("0000000000000004/1", "0000000000000003/2", "up",
+                main.CLIs[0].link( main.end1[ 'port' ], main.end2[ 'port' ], "up",
                                   timeout=main.timeout)
                 k = 0
                 verify = main.FALSE
@@ -389,7 +401,7 @@
                     linkCheck = summary.get("links")
                     flowsCheck = summary.get("flows")
                     intentCheck = summary.get("intents")
-                    if linkCheck == 16 and flowsCheck == 0 and intentCheck == 0:
+                    if linkCheck == main.deviceCount * 2 and flowsCheck == 0 and intentCheck == 0:
                         main.log.info("links: {}, flows: {}, intents: {} ".format(linkCheck, flowsCheck, intentCheck))
                         verify = main.TRUE
                         break
@@ -404,7 +416,7 @@
                     main.CLIs[0].purgeWithdrawnIntents()
                     main.CLIs[0].setCfg("org.onosproject.provider.nil.NullProviders", "deviceCount", value=0)
                     main.CLIs[0].setCfg("org.onosproject.provider.nil.NullProviders", "enabled", value="false")
-                    main.CLIs[0].setCfg("org.onosproject.provider.nil.NullProviders", "deviceCount", value=8)
+                    main.CLIs[0].setCfg("org.onosproject.provider.nil.NullProviders", "deviceCount", value=main.deviceCount)
                     main.CLIs[0].setCfg("org.onosproject.provider.nil.NullProviders", "enabled", value="true")
                     continue
 
diff --git a/TestON/tests/SCPF/SCPFportLat/SCPFportLat.py b/TestON/tests/SCPF/SCPFportLat/SCPFportLat.py
index ec00d30..59dc3a1 100644
--- a/TestON/tests/SCPF/SCPFportLat/SCPFportLat.py
+++ b/TestON/tests/SCPF/SCPFportLat/SCPFportLat.py
@@ -178,6 +178,15 @@
                                     onfail="Test step FAIL")
             statusResult = statusResult and onos_status
         time.sleep(2)
+
+        main.step( "Set up ONOS secure SSH" )
+        secureSshResult = main.TRUE
+        for i in range( int( main.numCtrls ) ):
+            secureSshResult = secureSshResult and main.ONOSbench.onosSecureSSH( node=main.ONOSip[i] )
+        utilities.assert_equals( expect=main.TRUE, actual=secureSshResult,
+                                 onpass="Test step PASS",
+                                 onfail="Test step FAIL" )
+
         main.step( "Start ONOS CLI on all nodes" )
         cliResult = main.TRUE
         main.step( " Start ONOS cli using thread " )
diff --git a/TestON/tests/SCPF/SCPFscaleTopo/SCPFscaleTopo.py b/TestON/tests/SCPF/SCPFscaleTopo/SCPFscaleTopo.py
index c3910b5..1a1e38f 100644
--- a/TestON/tests/SCPF/SCPFscaleTopo/SCPFscaleTopo.py
+++ b/TestON/tests/SCPF/SCPFscaleTopo/SCPFscaleTopo.py
@@ -245,6 +245,14 @@
                                  onpass="ONOS service is ready",
                                  onfail="ONOS service did not start properly" )
 
+        main.step( "Set up ONOS secure SSH" )
+        secureSshResult = main.TRUE
+        for i in range( int( main.numCtrls ) ):
+            secureSshResult = secureSshResult and main.ONOSbench.onosSecureSSH( node=main.ONOSip[i] )
+        utilities.assert_equals( expect=main.TRUE, actual=secureSshResult,
+                                 onpass="Test step PASS",
+                                 onfail="Test step FAIL" )
+
         main.step( "Start ONOS cli" )
         cliResult = main.TRUE
         main.activeNodes = []
diff --git a/TestON/tests/SCPF/SCPFscaleTopo/dependencies/scaleTopoFunction.py b/TestON/tests/SCPF/SCPFscaleTopo/dependencies/scaleTopoFunction.py
index 2f1e8ee..254956c 100644
--- a/TestON/tests/SCPF/SCPFscaleTopo/dependencies/scaleTopoFunction.py
+++ b/TestON/tests/SCPF/SCPFscaleTopo/dependencies/scaleTopoFunction.py
@@ -473,6 +473,16 @@
         else:
             main.log.error( main.topoName + ": Failed to start ONOS cluster" )
 
+    main.log.info( main.topoName + ": set up ONOS secure SSH" )
+    secureSshResult = []
+    for i in range( int( main.numCtrls ) ):
+        secureSshResult.append( main.onosSecureSSH( node=main.ONOSip[i] ) )
+    if all( result == main.TRUE for result in secureSshResult ):
+        main.log.info( main.topoName + ": Successfully set up ONOS secure SSH" )
+    else:
+        main.log.error( main.topoName + ": Failed to set up ONOS secure SSH" )
+        restartResult = main.FALSE
+
     main.log.info( main.topoName + ": Starting ONOS CLI" )
     cliResult = []
     for i in range( main.numCtrls ):
diff --git a/TestON/tests/SCPF/SCPFscalingMaxIntents/SCPFscalingMaxIntents.py b/TestON/tests/SCPF/SCPFscalingMaxIntents/SCPFscalingMaxIntents.py
index fc05de6..a7a7bc5 100644
--- a/TestON/tests/SCPF/SCPFscalingMaxIntents/SCPFscalingMaxIntents.py
+++ b/TestON/tests/SCPF/SCPFscalingMaxIntents/SCPFscalingMaxIntents.py
@@ -202,6 +202,14 @@
                                      onfail="Test step FAIL" )
             statusResult = ( statusResult and onos_status )
 
+        main.step( "Set up ONOS secure SSH" )
+        secureSshResult = main.TRUE
+        for i in range( int( main.numCtrls ) ):
+            secureSshResult = secureSshResult and main.ONOSbench.onosSecureSSH( node=main.ONOSip[i] )
+        utilities.assert_equals( expect=main.TRUE, actual=secureSshResult,
+                                 onpass="Test step PASS",
+                                 onfail="Test step FAIL" )
+
         main.step( "Start ONOS CLI on all nodes" )
         cliResult = main.TRUE
         main.step(" Start ONOS cli using thread ")
diff --git a/TestON/tests/SCPF/SCPFswitchLat/SCPFswitchLat.py b/TestON/tests/SCPF/SCPFswitchLat/SCPFswitchLat.py
index ceacb73..3fef087 100644
--- a/TestON/tests/SCPF/SCPFswitchLat/SCPFswitchLat.py
+++ b/TestON/tests/SCPF/SCPFswitchLat/SCPFswitchLat.py
@@ -180,6 +180,15 @@
                                     onpass="Test step PASS",
                                     onfail="Test step FAIL")
             statusResult = (statusResult and onos_status)
+
+        main.step( "Set up ONOS secure SSH" )
+        secureSshResult = main.TRUE
+        for i in range( int( main.numCtrls ) ):
+            secureSshResult = secureSshResult and main.ONOSbench.onosSecureSSH( node=main.ONOSip[i] )
+        utilities.assert_equals( expect=main.TRUE, actual=secureSshResult,
+                                 onpass="Test step PASS",
+                                 onfail="Test step FAIL" )
+
         time.sleep(2)
         main.step("Start ONOS CLI on all nodes")
         cliResult = main.TRUE
diff --git a/TestON/tests/USECASE/SDNIPfunction/SDNIPfunction.py b/TestON/tests/USECASE/SDNIPfunction/SDNIPfunction.py
index bfefd8c..0873626 100644
--- a/TestON/tests/USECASE/SDNIPfunction/SDNIPfunction.py
+++ b/TestON/tests/USECASE/SDNIPfunction/SDNIPfunction.py
@@ -65,13 +65,17 @@
         if not onos1Isup:
             main.log.report( "ONOS1 didn't start!" )
 
+        main.step( "Set up ONOS secure SSH" )
+        secureSshResult = main.ONOSbench.onosSecureSSH( node=ONOS1Ip )
+
         cliResult = main.ONOScli.startOnosCli( ONOS1Ip,
                 commandlineTimeout = 100, onosStartTimeout = 600 )
 
         case1Result = ( cleanInstallResult and packageResult and
                         cellResult and verifyResult and
                         onos1InstallResult and
-                        onos1Isup and cliResult )
+                        onos1Isup and secureSshResult and
+                        cliResult )
 
         utilities.assert_equals( expect = main.TRUE, actual = case1Result,
                                  onpass = "ONOS startup successful",
diff --git a/TestON/tests/USECASE/SDNIPperf/SDNIPperf.py b/TestON/tests/USECASE/SDNIPperf/SDNIPperf.py
index 7fda683..4bfa244 100644
--- a/TestON/tests/USECASE/SDNIPperf/SDNIPperf.py
+++ b/TestON/tests/USECASE/SDNIPperf/SDNIPperf.py
@@ -64,13 +64,17 @@
         if not onos1Isup:
             main.log.report( "ONOS1 didn't start!" )
 
+        main.step( "Set up ONOS secure SSH" )
+        secureSshResult = main.ONOSbench.onosSecureSSH( node=ONOS1Ip )
+
         cliResult = main.ONOScli.startOnosCli( ONOS1Ip,
                 commandlineTimeout=100, onosStartTimeout=600)
 
         case1Result = ( cleanInstallResult and packageResult and
                         cellResult and verifyResult and
                         onos1InstallResult and
-                        onos1Isup and cliResult )
+                        onos1Isup and secureSshResult and
+                        cliResult )
 
         utilities.assert_equals( expect=main.TRUE, actual=case1Result,
                                  onpass="ONOS startup successful",
diff --git a/TestON/tests/USECASE/USECASE_SdnipFunction/USECASE_SdnipFunction.py b/TestON/tests/USECASE/USECASE_SdnipFunction/USECASE_SdnipFunction.py
index 01fdfdb..f1ace78 100644
--- a/TestON/tests/USECASE/USECASE_SdnipFunction/USECASE_SdnipFunction.py
+++ b/TestON/tests/USECASE/USECASE_SdnipFunction/USECASE_SdnipFunction.py
@@ -167,6 +167,13 @@
                                  onpass="ONOS is up",
                                  onfail="ONOS is NOT up" )
 
+        main.step( "Set up ONOS secure SSH" )
+        secureSshResult = main.ONOSbench.onosSecureSSH( node=ONOS1Ip )
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=secureSshResult,
+                                 onpass="Set up ONOS secure SSH succeeded",
+                                 onfail="Set up ONOS secure SSH failed " )
+
         main.step( "Checking if ONOS CLI is ready" )
         cliResult = main.ONOScli.startOnosCli( ONOS1Ip,
                 commandlineTimeout=100, onosStartTimeout=600 )
diff --git a/TestON/tests/USECASE/USECASE_SdnipFunctionCluster/USECASE_SdnipFunctionCluster.py b/TestON/tests/USECASE/USECASE_SdnipFunctionCluster/USECASE_SdnipFunctionCluster.py
index 4ac9b6b..87b628f 100644
--- a/TestON/tests/USECASE/USECASE_SdnipFunctionCluster/USECASE_SdnipFunctionCluster.py
+++ b/TestON/tests/USECASE/USECASE_SdnipFunctionCluster/USECASE_SdnipFunctionCluster.py
@@ -150,6 +150,15 @@
                                  onpass="ONOS nodes are up",
                                  onfail="ONOS nodes are NOT up" )
 
+        main.step( "Set up ONOS secure SSH" )
+        secureSshResult = main.ONOSbench.onosSecureSSH( node=ONOS1Ip )
+        secureSshResult = secureSshResult and main.ONOSbench.onosSecureSSH( node=ONOS2Ip )
+        secureSshResult = secureSshResult and main.ONOSbench.onosSecureSSH( node=ONOS3Ip )
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=secureSshResult,
+                                 onpass="Set up ONOS secure SSH succeeded",
+                                 onfail="Set up ONOS secure SSH failed " )
+
         main.step( "Checking if ONOS CLI is ready" )
         main.CLIs = []
         cliResult1 = main.ONOScli1.startOnosCli( ONOS1Ip,
diff --git a/TestON/tests/USECASE/USECASE_SdnipFunctionCluster_fsfw/USECASE_SdnipFunctionCluster_fsfw.py b/TestON/tests/USECASE/USECASE_SdnipFunctionCluster_fsfw/USECASE_SdnipFunctionCluster_fsfw.py
index 3ed58c2..8458b9a 100644
--- a/TestON/tests/USECASE/USECASE_SdnipFunctionCluster_fsfw/USECASE_SdnipFunctionCluster_fsfw.py
+++ b/TestON/tests/USECASE/USECASE_SdnipFunctionCluster_fsfw/USECASE_SdnipFunctionCluster_fsfw.py
@@ -155,6 +155,15 @@
                                  onpass="ONOS nodes are up",
                                  onfail="ONOS nodes are NOT up" )
 
+        main.step( "Set up ONOS secure SSH" )
+        secureSshResult = main.ONOSbench.onosSecureSSH( node=ONOS1Ip )
+        secureSshResult = secureSshResult and main.ONOSbench.onosSecureSSH( node=ONOS2Ip )
+        secureSshResult = secureSshResult and main.ONOSbench.onosSecureSSH( node=ONOS3Ip )
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=secureSshResult,
+                                 onpass="Set up ONOS secure SSH succeeded",
+                                 onfail="Set up ONOS secure SSH failed " )
+
         main.step( "Checking if ONOS CLI is ready" )
         main.CLIs = []
         cliResult1 = main.ONOScli1.startOnosCli( ONOS1Ip,
diff --git a/TestON/tests/USECASE/USECASE_SdnipFunction_fsfw/USECASE_SdnipFunction_fsfw.py b/TestON/tests/USECASE/USECASE_SdnipFunction_fsfw/USECASE_SdnipFunction_fsfw.py
index 5dbd2b6..ab57821 100644
--- a/TestON/tests/USECASE/USECASE_SdnipFunction_fsfw/USECASE_SdnipFunction_fsfw.py
+++ b/TestON/tests/USECASE/USECASE_SdnipFunction_fsfw/USECASE_SdnipFunction_fsfw.py
@@ -153,6 +153,13 @@
                                  onpass="ONOS is up",
                                  onfail="ONOS is NOT up" )
 
+        main.step( "Set up ONOS secure SSH" )
+        secureSshResult = main.ONOSbench.onosSecureSSH( node=ONOS1Ip )
+        utilities.assert_equals( expect=main.TRUE,
+                                 actual=secureSshResult,
+                                 onpass="Set up ONOS secure SSH succeeded",
+                                 onfail="Set up ONOS secure SSH failed " )
+
         main.step( "Checking if ONOS CLI is ready" )
         cliResult = main.ONOScli1.startOnosCli( ONOS1Ip,
                                                commandlineTimeout=100,