Added functionality for counting flows and groups.

This patch contains functionality for counting flows / groups.
The existing tests have been modified in order to work this way,
however, we use a flag that indicates if to check flows and groups.
As of now it is False, since I observed that between some iterations
the same test produced different flows and groups at the switches.

This might be a bug that we need to discuss about.

Change-Id: Ie56333623c6e0eb9d8e03f51894078bcd272df2e
diff --git a/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/SRRoutingTest.py b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/SRRoutingTest.py
index cecb915..d2cd2b5 100644
--- a/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/SRRoutingTest.py
+++ b/TestON/tests/USECASE/SegmentRouting/SRRouting/dependencies/SRRoutingTest.py
@@ -30,7 +30,7 @@
         self.default = ''
 
     @staticmethod
-    def runTest( main, test_idx, onosNodes, dhcp, routers, ipv4, ipv6, description ):
+    def runTest( main, test_idx, onosNodes, dhcp, routers, ipv4, ipv6, description, countFlowsGroups=False):
 
         skipPackage = False
         init = False
@@ -54,6 +54,9 @@
         run.loadJson( main )
         run.loadChart( main )
 
+        if (countFlowsGroups):
+            run.loadCount( main )
+
         # wait some
         time.sleep( 5 )
 
@@ -73,7 +76,11 @@
             time.sleep( 60 )
 
         # ping hosts
-        run.pingAll( main, 'CASE%02d' % test_idx, acceptableFailed=5, basedOnIp=True )
+        # run.pingAll( main, 'CASE%02d' % test_idx, acceptableFailed=5, basedOnIp=True )
+
+        # check flows / groups numbers
+        if (countFlowsGroups):
+            run.checkFlowsGroupsFromFile(main)
 
         if hasattr( main, 'Mininet1' ):
             run.cleanup( main )