Update flow count check on SRBridging tests
Change-Id: I62f479a66a9fe2b96d12113464f234ea2e4e3f52
diff --git a/TestON/tests/USECASE/SegmentRouting/dependencies/SRBridgingTest.py b/TestON/tests/USECASE/SegmentRouting/dependencies/SRBridgingTest.py
index 108e7ea..f54de7c 100644
--- a/TestON/tests/USECASE/SegmentRouting/dependencies/SRBridgingTest.py
+++ b/TestON/tests/USECASE/SegmentRouting/dependencies/SRBridgingTest.py
@@ -29,14 +29,13 @@
@staticmethod
def runTest( main, test_idx, topology, onosNodes, description, vlan = [] ):
topo = dict()
- # (number of spine switch, number of leaf switch, dual-homed, description, minFlowCount)
- # TODO: Need to check correct number of minFlowCount
- topo[ '0x1' ] = ( 0, 1, False, 'single ToR', 15 )
- topo[ '0x2' ] = ( 0, 2, True, 'dual-homed ToR', 15 )
- topo[ '2x2' ] = ( 2, 2, False, '2x2 leaf-spine topology', 116 )
+ # (number of spine switch, number of leaf switch, dual-homed, description, minFlowCount - leaf)
+ topo[ '0x1' ] = ( 0, 1, False, 'single ToR', 28 )
+ topo[ '0x2' ] = ( 0, 2, True, 'dual-homed ToR', 37 )
+ topo[ '2x2' ] = ( 2, 2, False, '2x2 leaf-spine topology', 37 )
# TODO: Implement 2x3 topology
- # topo[ '2x3' ] = ( 2, 3, True, '2x3 leaf-spine topology with dual ToR and single ToR' )
- topo[ '2x4' ] = ( 2, 4, True, '2x4 dual-homed leaf-spine topology', 116 )
+ # topo[ '2x3' ] = ( 2, 3, True, '2x3 leaf-spine topology with dual ToR and single ToR', 28 )
+ topo[ '2x4' ] = ( 2, 4, True, '2x4 dual-homed leaf-spine topology', 53 )
skipPackage = False
init = False
@@ -60,7 +59,10 @@
mininet_args += ' --vlan=%s' % ( ','.join( ['%d' % vlanId for vlanId in vlan ] ) )
run.startMininet( main, 'trellis_fabric.py', args=mininet_args )
- # TODO: Need to check correct number of minFlowCount
- run.checkFlows( main, minFlowCount=topo[ topology ][ 4 ], sleep=5 )
+ run.checkFlows( main, minFlowCount=topo[ topology ][ 4 ] * topo[ topology ][ 1 ], sleep=5 )
+
+ leaf_dpid = [ "of:%016d" % ( ls + 1 ) for ls in range( topo[ topology ][ 1 ] ) ]
+ for dpid in leaf_dpid:
+ run.checkFlowsByDpid( main, dpid, topo[ topology ][ 4 ], sleep=5 )
run.pingAll( main, 'CASE%02d' % test_idx )
run.cleanup( main )