Stratum Support for Segement Rounting Suite

- Add Stratum Bmv2 switch support for SRDhcpRelay and SRRouting tests
- Add Support for 0x1 topology on a Stratum Tofino HW switch
- Support for dockerized mininet with Stratum BMv2 switches
- Update scapy driver to work with newer versions of scapy
- Simple parsing for scapy ping output
- Add support for fetching and installing external onos apps
- Add support for onos-diagnostics profiles
- Move onos log levels to params file
- Add onos cfg settings to SR tests

Change-Id: I7c4a71484c8fd5735da9ef09b96d8990283b199b
(cherry picked from commit bef6d9bd943996483fed32130cb30ad26a06aac0)
diff --git a/TestON/tests/dependencies/Cluster.py b/TestON/tests/dependencies/Cluster.py
index 7e850ba..9ed9256 100644
--- a/TestON/tests/dependencies/Cluster.py
+++ b/TestON/tests/dependencies/Cluster.py
@@ -676,10 +676,14 @@
         # multiplier is somewhat arbitrary, but the idea is the logs would have
         # been compacted before this many segments are written
 
-        maxSize = float( segmentSize ) * float( multiplier )
-        ret = True
-        for n in self.runningNodes:
-            # Partition logs
-            ret = ret and n.server.folderSize( "/opt/atomix/data/raft/partitions/*/*.log",
-                                               size=maxSize, unit=units, ignoreRoot=False )
-        return ret
+        try:
+            maxSize = float( segmentSize ) * float( multiplier )
+            ret = True
+            for n in self.runningNodes:
+                # Partition logs
+                ret = ret and n.server.folderSize( "/opt/atomix/data/raft/partitions/*/*.log",
+                                                   size=maxSize, unit=units, ignoreRoot=False )
+            return ret
+        except Exception as e:
+            main.log.error( e )
+            main.log.error( repr( e ) )
diff --git a/TestON/tests/dependencies/ONOSSetup.py b/TestON/tests/dependencies/ONOSSetup.py
index 8371e0b..0a00fd7 100644
--- a/TestON/tests/dependencies/ONOSSetup.py
+++ b/TestON/tests/dependencies/ONOSSetup.py
@@ -19,6 +19,7 @@
     along with TestON.  If not, see <http://www.gnu.org/licenses/>.
 """
 import re
+import os
 
 
 class ONOSSetup:
@@ -605,6 +606,12 @@
             else:
                 main.log.warn( "No apps were specified to be checked after startup" )
 
+        externalAppsResult = main.TRUE
+        if main.params.get( 'EXTERNAL_APPS' ):
+            for app, url in main.params[ 'EXTERNAL_APPS' ].iteritems():
+                path, fileName = os.path.split( url )
+                main.ONOSbench.onosApp( main.Cluster.controllers[0].ipAddress, "install!", fileName )
+
         return killResult and cellResult and packageResult and uninstallResult and \
                installResult and secureSshResult and onosServiceResult and onosCliResult and \
                onosNodesResult and onosAppsResult