Fixes for new jenkins environment and other tweeks

    - Fix ERROR message if there are no traffic components to cleanup
    - Use full path for "sudo ip" command
    - Fix missing testcase declarations
    - Make sure we creat dst host components in topology.ping()

Change-Id: Ie01ed72f26fa4c3187f61fefa63f4a791d77b88d
diff --git a/TestON/tests/USECASE/SegmentRouting/SRStaging/SRStaging.topo b/TestON/tests/USECASE/SegmentRouting/SRStaging/SRStaging.topo
index 2f4c8f2..b9d705e 100644
--- a/TestON/tests/USECASE/SegmentRouting/SRStaging/SRStaging.topo
+++ b/TestON/tests/USECASE/SegmentRouting/SRStaging/SRStaging.topo
@@ -183,7 +183,7 @@
         </Host3>
 
         <ng40vm>
-            <host>192.168.122.102</host>
+            <host>10.92.1.95</host>
             <user>ng40</user>
             <password>ng40</password>
             <type>HostDriver</type>
diff --git a/TestON/tests/USECASE/SegmentRouting/SRStaging/SRpairedLeaves/SRpairedLeaves.py b/TestON/tests/USECASE/SegmentRouting/SRStaging/SRpairedLeaves/SRpairedLeaves.py
index 077df04..5911832 100644
--- a/TestON/tests/USECASE/SegmentRouting/SRStaging/SRpairedLeaves/SRpairedLeaves.py
+++ b/TestON/tests/USECASE/SegmentRouting/SRStaging/SRpairedLeaves/SRpairedLeaves.py
@@ -48,6 +48,7 @@
         """
         try:
             from tests.USECASE.SegmentRouting.SRStaging.dependencies.SRStagingTest import SRStagingTest
+            from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as run
             import json
         except ImportError:
             main.log.error( "SRStagingTest not found. Exiting the test" )
@@ -63,6 +64,7 @@
                               topology='0x2',
                               onosNodes=3,
                               description="%s tests on the %s pod" % ( descPrefix, pod ) )
+        hosts = [ 'h1', 'h2', 'h3', 'mgmt' ]
         run.pingAllFabricIntfs( main, hosts, dumpFlows=False )
         main.funcs.cleanup( main )
 
diff --git a/TestON/tests/USECASE/SegmentRouting/SRStaging/dependencies/SRStagingTest.py b/TestON/tests/USECASE/SegmentRouting/SRStaging/dependencies/SRStagingTest.py
index a3ab6ba..5da933b 100644
--- a/TestON/tests/USECASE/SegmentRouting/SRStaging/dependencies/SRStagingTest.py
+++ b/TestON/tests/USECASE/SegmentRouting/SRStaging/dependencies/SRStagingTest.py
@@ -1353,8 +1353,9 @@
 
     def cleanup( self, main, headerOrder=None ):
         try:
-            for component in main.trafficComponents:
-                main.Network.removeComponent( component.name )
+            if getattr( main, "trafficComponents" ):
+                for component in main.trafficComponents:
+                    main.Network.removeComponent( component.name )
             main.trafficComponents = []
         except Exception:
             main.log.exception( "Error cleaning up traffic components" )