Pinging ng40 with a host for 2x2 SRBridging
Change-Id: Id31aab3c31f7f2981046ac5c3e45794f4886b6c4
diff --git a/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/SRBridgingTest.py b/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/SRBridgingTest.py
index be98329..1ffa9c2 100644
--- a/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/SRBridgingTest.py
+++ b/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/SRBridgingTest.py
@@ -26,15 +26,9 @@
def __init__( self ):
self.default = ''
- self.topo = dict()
- # TODO: Check minFlowCount of leaf for BMv2 switch
- # (number of spine switch, number of leaf switch, dual-homed, description, minFlowCount - leaf (OvS), minFlowCount - leaf (BMv2))
- self.topo[ '0x1' ] = ( 0, 1, False, 'single ToR', 28, 20 )
- self.topo[ '0x2' ] = ( 0, 2, True, 'dual-homed ToR', 37, 37 )
- self.topo[ '2x2' ] = ( 2, 2, False, '2x2 leaf-spine topology', 37, 32 )
+ self.topo = run.getTopo()
# TODO: Implement 2x3 topology
# topo[ '2x3' ] = ( 2, 3, True, '2x3 leaf-spine topology with dual ToR and single ToR', 28 )
- self.topo[ '2x4' ] = ( 2, 4, True, '2x4 dual-homed leaf-spine topology', 53, 53 )
self.switchNames = {}
self.switchNames[ '0x1' ] = [ "leaf1" ]
self.switchNames[ '2x2' ] = [ "leaf1", "leaf2", "spine101", "spine102" ]
@@ -51,14 +45,14 @@
if not init and onosNodes == main.Cluster.numCtrls:
skipPackage = True
- main.case( '%s, with %s, %s switches and %d ONOS instance%s' %
- ( description, self.topo[ topology ][ 3 ], main.switchType, onosNodes, 's' if onosNodes > 1 else '' ) )
- spines = self.topo[ topology ][ 0 ]
- leaves = self.topo[ topology ][ 1 ]
+ main.case( '%s, with %s, %s switches and %d ONOS instance%s' %( description, self.topo[ topology ][ 'description' ], main.switchType, onosNodes, 's' if onosNodes > 1 else '' ) )
+ spines = self.topo[ topology ][ 'spines' ]
+ leaves = self.topo[ topology ][ 'leaves' ]
switches = spines + leaves
links = ( spines * leaves ) * 2
- if self.topo[ topology ][ 2 ]:
+ if self.topo[ topology ][ 'dual-linked' ]:
links += links
+ if self.topo[ topology ][ 'dual-homed' ]:
links += ( leaves - 1 ) * 2
main.cfgName = 'CASE%01d%01d' % ( test_idx / 10, ( ( test_idx - 1 ) % 10 ) % 4 + 1 )
@@ -84,8 +78,8 @@
run.mnDockerSetup( main ) # optionally create and setup docker image
# Run the test with Mininet
- mininet_args = ' --spine=%d --leaf=%d' % ( self.topo[ topology ][ 0 ], self.topo[ topology ][ 1 ] )
- if self.topo[ topology ][ 2 ]:
+ mininet_args = ' --spine=%d --leaf=%d' % ( self.topo[ topology ][ 'spines' ], self.topo[ topology ][ 'leaves' ] )
+ if self.topo[ topology ][ 'dual-homed' ]:
mininet_args += ' --dual-homed'
if len( vlan ) > 0 :
mininet_args += ' --vlan=%s' % ( ','.join( ['%d' % vlanId for vlanId in vlan ] ) )
@@ -99,18 +93,18 @@
# Run the test with physical devices
run.connectToPhysicalNetwork( main, hostDiscovery=False ) # We don't want to do host discovery in the pod
- run.checkFlows( main, minFlowCount=self.topo[ topology ][ 5 if main.useBmv2 else 4 ] * self.topo[ topology ][ 1 ], sleep=5 )
+ run.checkFlows( main, minFlowCount=self.topo[ topology ][ 'minFlow-Stratum' if main.useBmv2 else 'minFlow-OvS' ] * self.topo[ topology ][ 'leaves' ], sleep=5 )
if main.useBmv2:
switchPrefix = main.params[ 'DEPENDENCY' ].get( 'switchPrefix', '' )
if switchPrefix is None or "None":
switchPrefix = ''
if switchPrefix is not '' and switchPrefix is not None:
switchPrefix += ':'
- leaf_dpid = [ "device:%sleaf%d" % ( switchPrefix, ls + 1 ) for ls in range( self.topo[ topology ][ 1 ]) ]
+ leaf_dpid = [ "device:%sleaf%d" % ( switchPrefix, ls + 1 ) for ls in range( self.topo[ topology ][ 'leaves' ]) ]
else:
- leaf_dpid = [ "of:%016d" % ( ls + 1 ) for ls in range( self.topo[ topology ][ 1 ] ) ]
+ leaf_dpid = [ "of:%016d" % ( ls + 1 ) for ls in range( self.topo[ topology ][ 'leaves' ] ) ]
for dpid in leaf_dpid:
- run.checkFlowsByDpid( main, dpid, self.topo[ topology ][ 5 if main.useBmv2 else 4 ], sleep=5 )
+ run.checkFlowsByDpid( main, dpid, self.topo[ topology ][ 'minFlow-Stratum' if main.useBmv2 else 'minFlow-OvS' ], sleep=5 )
run.verifyTopology( main, switches, links, onosNodes )
run.pingAll( main )
except Exception as e:
diff --git a/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/chart/CASE03.chart b/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/chart/CASE03.chart
index 0102621..38f0a1b 100644
--- a/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/chart/CASE03.chart
+++ b/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/chart/CASE03.chart
@@ -3,4 +3,4 @@
"hosts":["h1", "h2"]},
"leaf2": {"expect": "True",
"hosts":["h3", "h4"]}
-}
\ No newline at end of file
+}
diff --git a/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/chart/CASE09.chart b/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/chart/CASE09.chart
new file mode 100644
index 0000000..f52bad8
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRBridging/dependencies/chart/CASE09.chart
@@ -0,0 +1,4 @@
+{
+ "leaf1": {"expect": "True",
+ "hosts":["h1", "ng40"]}
+}