Add tests on SegmentRouting - SRBridging (+ fix some bugs)
Change-Id: I8aa7dfedb65c5c508881c7ef7bf68b37c1764e54
diff --git a/TestON/tests/USECASE/SegmentRouting/SRBridging/README.md b/TestON/tests/USECASE/SegmentRouting/SRBridging/README.md
new file mode 100644
index 0000000..7409f58
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRBridging/README.md
@@ -0,0 +1,19 @@
+This test verifies basic L2 connectivity using SegmentRouting via pingall
+
+It consists of
+
+1) Configure and install ONOS cluster
+2) Start Mininet and check flow state
+3) Pingall
+
+<h3>Requirements</h3>
+ - Trellis leaf-spine fabric: please visit following URL to set up Trellis leaf-spine fabric
+ https://github.com/opennetworkinglab/routing/tree/master/trellis
+ - ONOS_APPS=drivers,openflow,segmentrouting,fpm,netcfghostprovider
+
+<h3>Topologies</h3>
+- 0x1 single ToR
+- 0x2 dual-homed ToR
+- 2x2 leaf-spine
+- 2x4 leaf-spine with dual-homed ToR and dual links to spines
+- 2x3 leaf-spine with dual-homed ToR (Not implemented yet)
diff --git a/TestON/tests/USECASE/SegmentRouting/SRBridging/SRBridging.params b/TestON/tests/USECASE/SegmentRouting/SRBridging/SRBridging.params
new file mode 100644
index 0000000..70d903a
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRBridging/SRBridging.params
@@ -0,0 +1,45 @@
+<PARAMS>
+ <testcases>1,2,3,4,5,6,7,8,11,12,13,14,15,16,17,18,21,22,23,24,25,26,27,28,31,32,33,34,35,36,37,38,41,42,43,44,45,46,47,48,51,52,53,54,55,56,57,58,61,62,63,64,65,66,67,68,71,72,73,74,75,76,77,78</testcases>
+
+ <GRAPH>
+ <nodeCluster>BM</nodeCluster>
+ <builds>20</builds>
+ </GRAPH>
+
+ <SCALE>
+ <size>3</size>
+ <max>3</max>
+ </SCALE>
+
+ <DEPENDENCY>
+ <wrapper1>startUp</wrapper1>
+ <topology>trellis_fabric.py</topology>
+ <lib1>routinglib.py</lib1>
+ <lib2>trellislib.py</lib2>
+ </DEPENDENCY>
+
+ <ENV>
+ <cellName>productionCell</cellName>
+ <cellApps>drivers,segmentrouting,openflow,fpm</cellApps>
+ <diffApps>netcfghostprovider</diffApps>
+ <cellUser>sdn</cellUser>
+ </ENV>
+
+ <GIT>
+ <pull>False</pull>
+ <branch>master</branch>
+ </GIT>
+
+ <CTRL>
+ <port>6653</port>
+ </CTRL>
+
+ <timers>
+ <LinkDiscovery>12</LinkDiscovery>
+ <SwitchDiscovery>12</SwitchDiscovery>
+ </timers>
+
+ <SLEEP>
+ <startup>10</startup>
+ </SLEEP>
+</PARAMS>
diff --git a/TestON/tests/USECASE/SegmentRouting/SRBridging/SRBridging.py b/TestON/tests/USECASE/SegmentRouting/SRBridging/SRBridging.py
new file mode 100644
index 0000000..6811fd5
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRBridging/SRBridging.py
@@ -0,0 +1,1083 @@
+class SRBridging:
+ def __init__( self ):
+ self.default = ''
+
+ def CASE1( self, main ):
+ """
+ Tests connectivity between two untagged hosts
+ (Ports are configured as vlan-untagged)
+
+ Sets up 1 ONOS instance
+ Start 0x1 single ToR topology
+ Pingall
+ """
+ from tests.USECASE.SegmentRouting.dependencies.SRBridgingTest import SRBridgingTest
+ SRBridgingTest.runTest( main,
+ test_idx = 1,
+ topology = '0x1',
+ onosNodes = 1,
+ description = "Bridging test between two untagged hosts" )
+
+ def CASE2( self, main ):
+ """
+ Tests connectivity between two untagged hosts
+ (Ports are configured as vlan-untagged)
+
+ Sets up 1 ONOS instance
+ Start 0x2 dual-homed ToR topology
+ Pingall
+ """
+ from tests.USECASE.SegmentRouting.dependencies.SRBridgingTest import SRBridgingTest
+ SRBridgingTest.runTest( main,
+ test_idx = 2,
+ topology = '0x2',
+ onosNodes = 1,
+ description = "Bridging test between two untagged hosts" )
+
+ def CASE3( self, main ):
+ """
+ Tests connectivity between two untagged hosts
+ (Ports are configured as vlan-untagged)
+
+ Sets up 1 ONOS instance
+ Start 2x2 leaf-spine topology
+ Pingall
+ """
+ from tests.USECASE.SegmentRouting.dependencies.SRBridgingTest import SRBridgingTest
+ SRBridgingTest.runTest( main,
+ test_idx = 3,
+ topology = '2x2',
+ onosNodes = 1,
+ description = "Bridging test between two untagged hosts" )
+
+ def CASE4( self, main ):
+ """
+ Tests connectivity between two untagged hosts
+ (Ports are configured as vlan-untagged)
+
+ Sets up 1 ONOS instance
+ Start 2x4 dual-homed leaf-spine topology
+ Pingall
+ """
+ from tests.USECASE.SegmentRouting.dependencies.SRBridgingTest import SRBridgingTest
+ SRBridgingTest.runTest( main,
+ test_idx = 4,
+ topology = '2x4',
+ onosNodes = 1,
+ description = "Bridging test between two untagged hosts" )
+
+ def CASE5( self, main ):
+ """
+ Tests connectivity between two untagged hosts
+ (Ports are configured as vlan-untagged)
+
+ Sets up 3 ONOS instances
+ Start 0x1 single ToR topology
+ Pingall
+ """
+ from tests.USECASE.SegmentRouting.dependencies.SRBridgingTest import SRBridgingTest
+ SRBridgingTest.runTest( main,
+ test_idx = 5,
+ topology = '0x1',
+ onosNodes = 3,
+ description = "Bridging test between two untagged hosts" )
+
+ def CASE6( self, main ):
+ """
+ Tests connectivity between two untagged hosts
+ (Ports are configured as vlan-untagged)
+
+ Sets up 3 ONOS instances
+ Start 0x2 dual-homed ToR topology
+ Pingall
+ """
+ from tests.USECASE.SegmentRouting.dependencies.SRBridgingTest import SRBridgingTest
+ SRBridgingTest.runTest( main,
+ test_idx = 6,
+ topology = '0x2',
+ onosNodes = 3,
+ description = "Bridging test between two untagged hosts" )
+
+ def CASE7( self, main ):
+ """
+ Tests connectivity between two untagged hosts
+ (Ports are configured as vlan-untagged)
+
+ Sets up 3 ONOS instances
+ Start 2x2 leaf-spine topology
+ Pingall
+ """
+ from tests.USECASE.SegmentRouting.dependencies.SRBridgingTest import SRBridgingTest
+ SRBridgingTest.runTest( main,
+ test_idx = 7,
+ topology = '2x2',
+ onosNodes = 3,
+ description = "Bridging test between two untagged hosts" )
+
+ def CASE8( self, main ):
+ """
+ Tests connectivity between two untagged hosts
+ (Ports are configured as vlan-untagged)
+
+ Sets up 3 ONOS instances
+ Start 2x4 dual-homed leaf-spine topology
+ Pingall
+ """
+ from tests.USECASE.SegmentRouting.dependencies.SRBridgingTest import SRBridgingTest
+ SRBridgingTest.runTest( main,
+ test_idx = 8,
+ topology = '2x4',
+ onosNodes = 3,
+ description = "Bridging test between two untagged hosts" )
+
+ def CASE11( self, main ):
+ """
+ Tests connectivity between two tagged hosts
+ (Ports are configured as vlan-tagged)
+
+ Sets up 1 ONOS instance
+ Start 0x1 single ToR topology
+ Pingall
+ """
+ from tests.USECASE.SegmentRouting.dependencies.SRBridgingTest import SRBridgingTest
+ SRBridgingTest.runTest( main,
+ test_idx = 11,
+ topology = '0x1',
+ onosNodes = 1,
+ description = "Bridging test between two tagged hosts",
+ vlan = [ 10, 10 ] )
+
+ def CASE12( self, main ):
+ """
+ Tests connectivity between two tagged hosts
+ (Ports are configured as vlan-tagged)
+
+ Sets up 1 ONOS instance
+ Start 0x2 dual-homed ToR topology
+ Pingall
+ """
+ from tests.USECASE.SegmentRouting.dependencies.SRBridgingTest import SRBridgingTest
+ SRBridgingTest.runTest( main,
+ test_idx = 12,
+ topology = '0x2',
+ onosNodes = 1,
+ description = "Bridging test between two tagged hosts",
+ vlan = [ 10, 10 ] )
+
+ def CASE13( self, main ):
+ """
+ Tests connectivity between two tagged hosts
+ (Ports are configured as vlan-tagged)
+
+ Sets up 1 ONOS instance
+ Start 2x2 leaf-spine topology
+ Pingall
+ """
+ from tests.USECASE.SegmentRouting.dependencies.SRBridgingTest import SRBridgingTest
+ SRBridgingTest.runTest( main,
+ test_idx = 13,
+ topology = '2x2',
+ onosNodes = 1,
+ description = "Bridging test between two tagged hosts",
+ vlan = [ 10, 10, 20, 20 ] )
+
+ def CASE14( self, main ):
+ """
+ Tests connectivity between two tagged hosts
+ (Ports are configured as vlan-tagged)
+
+ Sets up 1 ONOS instance
+ Start 2x4 dual-homed leaf-spine topology
+ Pingall
+ """
+ from tests.USECASE.SegmentRouting.dependencies.SRBridgingTest import SRBridgingTest
+ SRBridgingTest.runTest( main,
+ test_idx = 14,
+ topology = '2x4',
+ onosNodes = 1,
+ description = "Bridging test between two tagged hosts",
+ vlan = [ 10, 10, 20, 20 ] )
+
+ def CASE15( self, main ):
+ """
+ Tests connectivity between two tagged hosts
+ (Ports are configured as vlan-tagged)
+
+ Sets up 3 ONOS instances
+ Start 0x1 single ToR topology
+ Pingall
+ """
+ from tests.USECASE.SegmentRouting.dependencies.SRBridgingTest import SRBridgingTest
+ SRBridgingTest.runTest( main,
+ test_idx = 15,
+ topology = '0x1',
+ onosNodes = 3,
+ description = "Bridging test between two tagged hosts",
+ vlan = [ 10, 10 ] )
+
+ def CASE16( self, main ):
+ """
+ Tests connectivity between two tagged hosts
+ (Ports are configured as vlan-tagged)
+
+ Sets up 3 ONOS instances
+ Start 0x2 dual-homed ToR topology
+ Pingall
+ """
+ from tests.USECASE.SegmentRouting.dependencies.SRBridgingTest import SRBridgingTest
+ SRBridgingTest.runTest( main,
+ test_idx = 16,
+ topology = '0x2',
+ onosNodes = 3,
+ description = "Bridging test between two tagged hosts",
+ vlan = [ 10, 10 ] )
+
+ def CASE17( self, main ):
+ """
+ Tests connectivity between two tagged hosts
+ (Ports are configured as vlan-tagged)
+
+ Sets up 3 ONOS instances
+ Start 2x2 leaf-spine topology
+ Pingall
+ """
+ from tests.USECASE.SegmentRouting.dependencies.SRBridgingTest import SRBridgingTest
+ SRBridgingTest.runTest( main,
+ test_idx = 17,
+ topology = '2x2',
+ onosNodes = 3,
+ description = "Bridging test between two tagged hosts",
+ vlan = [ 10, 10, 20, 20 ] )
+
+ def CASE18( self, main ):
+ """
+ Tests connectivity between two tagged hosts
+ (Ports are configured as vlan-tagged)
+
+ Sets up 3 ONOS instances
+ Start 2x4 dual-homed leaf-spine topology
+ Pingall
+ """
+ from tests.USECASE.SegmentRouting.dependencies.SRBridgingTest import SRBridgingTest
+ SRBridgingTest.runTest( main,
+ test_idx = 18,
+ topology = '2x4',
+ onosNodes = 3,
+ description = "Bridging test between two tagged hosts",
+ vlan = [ 10, 10, 20, 20 ] )
+
+ def CASE21( self, main ):
+ """
+ Tests connectivity between two untagged hosts
+ (Ports are configured as vlan-native with vlan-tagged)
+
+ Sets up 1 ONOS instance
+ Start 0x1 single ToR topology
+ Pingall
+ """
+ from tests.USECASE.SegmentRouting.dependencies.SRBridgingTest import SRBridgingTest
+ SRBridgingTest.runTest( main,
+ test_idx = 21,
+ topology = '0x1',
+ onosNodes = 1,
+ description = "Bridging test between two untagged hosts" )
+
+ def CASE22( self, main ):
+ """
+ Tests connectivity between two untagged hosts
+ (Ports are configured as vlan-native with vlan-tagged)
+
+ Sets up 1 ONOS instance
+ Start 0x2 dual-homed ToR topology
+ Pingall
+ """
+ from tests.USECASE.SegmentRouting.dependencies.SRBridgingTest import SRBridgingTest
+ SRBridgingTest.runTest( main,
+ test_idx = 22,
+ topology = '0x2',
+ onosNodes = 1,
+ description = "Bridging test between two untagged hosts" )
+
+ def CASE23( self, main ):
+ """
+ Tests connectivity between two untagged hosts
+ (Ports are configured as vlan-native with vlan-tagged)
+
+ Sets up 1 ONOS instance
+ Start 2x2 leaf-spine topology
+ Pingall
+ """
+ from tests.USECASE.SegmentRouting.dependencies.SRBridgingTest import SRBridgingTest
+ SRBridgingTest.runTest( main,
+ test_idx = 23,
+ topology = '2x2',
+ onosNodes = 1,
+ description = "Bridging test between two untagged hosts" )
+
+ def CASE24( self, main ):
+ """
+ Tests connectivity between two untagged hosts
+ (Ports are configured as vlan-native with vlan-tagged)
+
+ Sets up 1 ONOS instance
+ Start 2x4 dual-homed leaf-spine topology
+ Pingall
+ """
+ from tests.USECASE.SegmentRouting.dependencies.SRBridgingTest import SRBridgingTest
+ SRBridgingTest.runTest( main,
+ test_idx = 24,
+ topology = '2x4',
+ onosNodes = 1,
+ description = "Bridging test between two untagged hosts" )
+
+ def CASE25( self, main ):
+ """
+ Tests connectivity between two untagged hosts
+ (Ports are configured as vlan-native with vlan-tagged)
+
+ Sets up 3 ONOS instances
+ Start 0x1 single ToR topology
+ Pingall
+ """
+ from tests.USECASE.SegmentRouting.dependencies.SRBridgingTest import SRBridgingTest
+ SRBridgingTest.runTest( main,
+ test_idx = 25,
+ topology = '0x1',
+ onosNodes = 3,
+ description = "Bridging test between two untagged hosts" )
+
+ def CASE26( self, main ):
+ """
+ Tests connectivity between two untagged hosts
+ (Ports are configured as vlan-native with vlan-tagged)
+
+ Sets up 3 ONOS instances
+ Start 0x2 dual-homed ToR topology
+ Pingall
+ """
+ from tests.USECASE.SegmentRouting.dependencies.SRBridgingTest import SRBridgingTest
+ SRBridgingTest.runTest( main,
+ test_idx = 26,
+ topology = '0x2',
+ onosNodes = 3,
+ description = "Bridging test between two untagged hosts" )
+
+ def CASE27( self, main ):
+ """
+ Tests connectivity between two untagged hosts
+ (Ports are configured as vlan-native with vlan-tagged)
+
+ Sets up 3 ONOS instances
+ Start 2x2 leaf-spine topology
+ Pingall
+ """
+ from tests.USECASE.SegmentRouting.dependencies.SRBridgingTest import SRBridgingTest
+ SRBridgingTest.runTest( main,
+ test_idx = 27,
+ topology = '2x2',
+ onosNodes = 3,
+ description = "Bridging test between two untagged hosts" )
+
+ def CASE28( self, main ):
+ """
+ Tests connectivity between two untagged hosts
+ (Ports are configured as vlan-native with vlan-tagged)
+
+ Sets up 3 ONOS instances
+ Start 2x4 dual-homed leaf-spine topology
+ Pingall
+ """
+ from tests.USECASE.SegmentRouting.dependencies.SRBridgingTest import SRBridgingTest
+ SRBridgingTest.runTest( main,
+ test_idx = 28,
+ topology = '2x4',
+ onosNodes = 3,
+ description = "Bridging test between two untagged hosts" )
+
+ def CASE31( self, main ):
+ """
+ Tests connectivity between two untagged hosts
+ (One port is configured as vlan-native with vlan-tagged,
+ another with vlan-untagged)
+
+ Sets up 1 ONOS instance
+ Start 0x1 single ToR topology
+ Pingall
+ """
+ from tests.USECASE.SegmentRouting.dependencies.SRBridgingTest import SRBridgingTest
+ SRBridgingTest.runTest( main,
+ test_idx = 31,
+ topology = '0x1',
+ onosNodes = 1,
+ description = "Bridging test between two untagged hosts, "
+ "one on vlan-untagged port and the other on vlan-native port" )
+
+ def CASE32( self, main ):
+ """
+ Tests connectivity between two untagged hosts
+ (One port is configured as vlan-native with vlan-tagged,
+ another with vlan-untagged)
+
+ Sets up 1 ONOS instance
+ Start 0x2 dual-homed ToR topology
+ Pingall
+ """
+ from tests.USECASE.SegmentRouting.dependencies.SRBridgingTest import SRBridgingTest
+ SRBridgingTest.runTest( main,
+ test_idx = 32,
+ topology = '0x2',
+ onosNodes = 1,
+ description = "Bridging test between two untagged hosts, "
+ "one on vlan-untagged port and the other on vlan-native port" )
+
+ def CASE33( self, main ):
+ """
+ Tests connectivity between two untagged hosts
+ (One port is configured as vlan-native with vlan-tagged,
+ another with vlan-untagged)
+
+ Sets up 1 ONOS instance
+ Start 2x2 leaf-spine topology
+ Pingall
+ """
+ from tests.USECASE.SegmentRouting.dependencies.SRBridgingTest import SRBridgingTest
+ SRBridgingTest.runTest( main,
+ test_idx = 33,
+ topology = '2x2',
+ onosNodes = 1,
+ description = "Bridging test between two untagged hosts, "
+ "one on vlan-untagged port and the other on vlan-native port" )
+
+ def CASE34( self, main ):
+ """
+ Tests connectivity between two untagged hosts
+ (One port is configured as vlan-native with vlan-tagged,
+ another with vlan-untagged)
+
+ Sets up 1 ONOS instance
+ Start 2x4 dual-homed leaf-spine topology
+ Pingall
+ """
+ from tests.USECASE.SegmentRouting.dependencies.SRBridgingTest import SRBridgingTest
+ SRBridgingTest.runTest( main,
+ test_idx = 34,
+ topology = '2x4',
+ onosNodes = 1,
+ description = "Bridging test between two untagged hosts, "
+ "one on vlan-untagged port and the other on vlan-native port" )
+
+ def CASE35( self, main ):
+ """
+ Tests connectivity between two untagged hosts
+ (One port is configured as vlan-native with vlan-tagged,
+ another with vlan-untagged)
+
+ Sets up 3 ONOS instances
+ Start 0x1 single ToR topology
+ Pingall
+ """
+ from tests.USECASE.SegmentRouting.dependencies.SRBridgingTest import SRBridgingTest
+ SRBridgingTest.runTest( main,
+ test_idx = 35,
+ topology = '0x1',
+ onosNodes = 3,
+ description = "Bridging test between two untagged hosts, "
+ "one on vlan-untagged port and the other on vlan-native port" )
+
+ def CASE36( self, main ):
+ """
+ Tests connectivity between two untagged hosts
+ (One port is configured as vlan-native with vlan-tagged,
+ another with vlan-untagged)
+
+ Sets up 3 ONOS instances
+ Start 0x2 dual-homed ToR topology
+ Pingall
+ """
+ from tests.USECASE.SegmentRouting.dependencies.SRBridgingTest import SRBridgingTest
+ SRBridgingTest.runTest( main,
+ test_idx = 36,
+ topology = '0x2',
+ onosNodes = 3,
+ description = "Bridging test between two untagged hosts, "
+ "one on vlan-untagged port and the other on vlan-native port" )
+
+ def CASE37( self, main ):
+ """
+ Tests connectivity between two untagged hosts
+ (One port is configured as vlan-native with vlan-tagged,
+ another with vlan-untagged)
+
+ Sets up 3 ONOS instances
+ Start 2x2 leaf-spine topology
+ Pingall
+ """
+ from tests.USECASE.SegmentRouting.dependencies.SRBridgingTest import SRBridgingTest
+ SRBridgingTest.runTest( main,
+ test_idx = 37,
+ topology = '2x2',
+ onosNodes = 3,
+ description = "Bridging test between two untagged hosts, "
+ "one on vlan-untagged port and the other on vlan-native port" )
+
+ def CASE38( self, main ):
+ """
+ Tests connectivity between two untagged hosts
+ (One port is configured as vlan-native with vlan-tagged,
+ another with vlan-untagged)
+
+ Sets up 3 ONOS instances
+ Start 2x4 dual-homed leaf-spine topology
+ Pingall
+ """
+ from tests.USECASE.SegmentRouting.dependencies.SRBridgingTest import SRBridgingTest
+ SRBridgingTest.runTest(main,
+ test_idx = 38,
+ topology = '2x4',
+ onosNodes = 3,
+ description = "Bridging test between two untagged hosts, "
+ "one on vlan-untagged port and the other on vlan-native port" )
+
+ def CASE41( self, main ):
+ """
+ Tests connectivity between untagged host and tagged host
+ (Ports are configured as vlan-untagged and
+ vlan-tagged with same vlan id, respectively)
+
+ Sets up 1 ONOS instance
+ Start 0x1 single ToR topology
+ Pingall
+ """
+ from tests.USECASE.SegmentRouting.dependencies.SRBridgingTest import SRBridgingTest
+ SRBridgingTest.runTest( main,
+ test_idx = 41,
+ topology = '0x1',
+ onosNodes = 1,
+ description = "Bridging test between untagged host and tagged host",
+ vlan = [ 0, 10 ] )
+
+ def CASE42( self, main ):
+ """
+ Tests connectivity between untagged host and tagged host
+ (Ports are configured as vlan-untagged and
+ vlan-tagged with same vlan id, respectively)
+
+ Sets up 1 ONOS instance
+ Start 0x2 dual-homed ToR topology
+ Pingall
+ """
+ from tests.USECASE.SegmentRouting.dependencies.SRBridgingTest import SRBridgingTest
+ SRBridgingTest.runTest( main,
+ test_idx = 42,
+ topology = '0x2',
+ onosNodes = 1,
+ description = "Bridging test between untagged host and tagged host",
+ vlan = [ 0, 10 ] )
+
+ def CASE43( self, main ):
+ """
+ Tests connectivity between untagged host and tagged host
+ (Ports are configured as vlan-untagged and
+ vlan-tagged with same vlan id, respectively)
+
+ Sets up 1 ONOS instance
+ Start 2x2 leaf-spine topology
+ Pingall
+ """
+ from tests.USECASE.SegmentRouting.dependencies.SRBridgingTest import SRBridgingTest
+ SRBridgingTest.runTest( main,
+ test_idx = 43,
+ topology = '2x2',
+ onosNodes = 1,
+ description = "Bridging test between untagged host and tagged host",
+ vlan = [ 0, 10, 0, 20 ] )
+
+ def CASE44( self, main ):
+ """
+ Tests connectivity between untagged host and tagged host
+ (Ports are configured as vlan-untagged and
+ vlan-tagged with same vlan id, respectively)
+
+ Sets up 1 ONOS instance
+ Start 2x4 dual-homed leaf-spine topology
+ Pingall
+ """
+ from tests.USECASE.SegmentRouting.dependencies.SRBridgingTest import SRBridgingTest
+ SRBridgingTest.runTest( main,
+ test_idx = 44,
+ topology = '2x4',
+ onosNodes = 1,
+ description = "Bridging test between untagged host and tagged host",
+ vlan = [ 0, 10, 0, 20 ] )
+
+ def CASE45( self, main ):
+ """
+ Tests connectivity between untagged host and tagged host
+ (Ports are configured as vlan-untagged and
+ vlan-tagged with same vlan id, respectively)
+
+ Sets up 3 ONOS instances
+ Start 0x1 single ToR topology
+ Pingall
+ """
+ from tests.USECASE.SegmentRouting.dependencies.SRBridgingTest import SRBridgingTest
+ SRBridgingTest.runTest( main,
+ test_idx = 45,
+ topology = '0x1',
+ onosNodes = 3,
+ description = "Bridging test between untagged host and tagged host",
+ vlan = [ 0, 10 ] )
+
+ def CASE46( self, main ):
+ """
+ Tests connectivity between untagged host and tagged host
+ (Ports are configured as vlan-untagged and
+ vlan-tagged with same vlan id, respectively)
+
+ Sets up 3 ONOS instances
+ Start 0x2 dual-homed ToR topology
+ Pingall
+ """
+ from tests.USECASE.SegmentRouting.dependencies.SRBridgingTest import SRBridgingTest
+ SRBridgingTest.runTest( main,
+ test_idx = 46,
+ topology = '0x2',
+ onosNodes = 3,
+ description = "Bridging test between untagged host and tagged host",
+ vlan = [ 0, 10 ] )
+
+ def CASE47( self, main ):
+ """
+ Tests connectivity between untagged host and tagged host
+ (Ports are configured as vlan-untagged and
+ vlan-tagged with same vlan id, respectively)
+
+ Sets up 3 ONOS instances
+ Start 2x2 leaf-spine topology
+ Pingall
+ """
+ from tests.USECASE.SegmentRouting.dependencies.SRBridgingTest import SRBridgingTest
+ SRBridgingTest.runTest( main,
+ test_idx = 47,
+ topology = '2x2',
+ onosNodes = 3,
+ description = "Bridging test between untagged host and tagged host",
+ vlan = [ 0, 10, 0, 20 ] )
+
+ def CASE48( self, main ):
+ """
+ Tests connectivity between untagged host and tagged host
+ (Ports are configured as vlan-untagged and
+ vlan-tagged with same vlan id, respectively)
+
+ Sets up 3 ONOS instances
+ Start 2x4 dual-homed leaf-spine topology
+ Pingall
+ """
+ from tests.USECASE.SegmentRouting.dependencies.SRBridgingTest import SRBridgingTest
+ SRBridgingTest.runTest( main,
+ test_idx = 48,
+ topology = '2x4',
+ onosNodes = 3,
+ description = "Bridging test between untagged host and tagged host",
+ vlan = [ 0, 10, 0, 20 ] )
+
+ def CASE51( self, main ):
+ """
+ Tests connectivity between two untagged hosts with different vlan id
+ (Ports are configured as vlan-untagged 10 and 20, respectively)
+
+ Sets up 1 ONOS instance
+ Start 0x1 single ToR topology
+ Pingall
+ """
+ from tests.USECASE.SegmentRouting.dependencies.SRBridgingTest import SRBridgingTest
+ SRBridgingTest.runTest( main,
+ test_idx = 51,
+ topology = '0x1',
+ onosNodes = 1,
+ description = "Bridging test between two untagged hosts with different vlan id" )
+
+ def CASE52( self, main ):
+ """
+ Tests connectivity between two untagged hosts with different vlan id
+ (Ports are configured as vlan-untagged 10 and 20, respectively)
+
+ Sets up 1 ONOS instance
+ Start 0x2 dual-homed ToR topology
+ Pingall
+ """
+ from tests.USECASE.SegmentRouting.dependencies.SRBridgingTest import SRBridgingTest
+ SRBridgingTest.runTest( main,
+ test_idx = 52,
+ topology = '0x2',
+ onosNodes = 1,
+ description = "Bridging test between two untagged hosts with different vlan id" )
+
+ def CASE53( self, main ):
+ """
+ Tests connectivity between two untagged hosts with different vlan id
+ (Ports are configured as vlan-untagged 10 and 20, respectively)
+
+ Sets up 1 ONOS instance
+ Start 2x2 leaf-spine topology
+ Pingall
+ """
+ from tests.USECASE.SegmentRouting.dependencies.SRBridgingTest import SRBridgingTest
+ SRBridgingTest.runTest( main,
+ test_idx = 53,
+ topology = '2x2',
+ onosNodes = 1,
+ description = "Bridging test between two untagged hosts with different vlan id" )
+
+ def CASE54( self, main ):
+ """
+ Tests connectivity between two untagged hosts with different vlan id
+ (Ports are configured as vlan-untagged 10 and 20, respectively)
+
+ Sets up 1 ONOS instance
+ Start 2x4 dual-homed leaf-spine topology
+ Pingall
+ """
+ from tests.USECASE.SegmentRouting.dependencies.SRBridgingTest import SRBridgingTest
+ SRBridgingTest.runTest( main,
+ test_idx = 54,
+ topology = '2x4',
+ onosNodes = 1,
+ description = "Bridging test between two untagged hosts with different vlan id" )
+
+ def CASE55( self, main ):
+ """
+ Tests connectivity between two untagged hosts with different vlan id
+ (Ports are configured as vlan-untagged 10 and 20, respectively)
+
+ Sets up 3 ONOS instances
+ Start 0x1 single ToR topology
+ Pingall
+ """
+ from tests.USECASE.SegmentRouting.dependencies.SRBridgingTest import SRBridgingTest
+ SRBridgingTest.runTest( main,
+ test_idx = 55,
+ topology = '0x1',
+ onosNodes = 3,
+ description = "Bridging test between two untagged hosts with different vlan id" )
+
+ def CASE56( self, main ):
+ """
+ Tests connectivity between two untagged hosts with different vlan id
+ (Ports are configured as vlan-untagged 10 and 20, respectively)
+
+ Sets up 3 ONOS instances
+ Start 0x2 dual-homed ToR topology
+ Pingall
+ """
+ from tests.USECASE.SegmentRouting.dependencies.SRBridgingTest import SRBridgingTest
+ SRBridgingTest.runTest( main,
+ test_idx = 56,
+ topology = '0x2',
+ onosNodes = 3,
+ description = "Bridging test between two untagged hosts with different vlan id" )
+
+ def CASE57( self, main ):
+ """
+ Tests connectivity between two untagged hosts with different vlan id
+ (Ports are configured as vlan-untagged 10 and 20, respectively)
+
+ Sets up 3 ONOS instances
+ Start 2x2 leaf-spine topology
+ Pingall
+ """
+ from tests.USECASE.SegmentRouting.dependencies.SRBridgingTest import SRBridgingTest
+ SRBridgingTest.runTest( main,
+ test_idx = 57,
+ topology = '2x2',
+ onosNodes = 3,
+ description = "Bridging test between two untagged hosts with different vlan id" )
+
+ def CASE58( self, main ):
+ """
+ Tests connectivity between two untagged hosts with different vlan id
+ (Ports are configured as vlan-untagged 10 and 20, respectively)
+
+ Sets up 3 ONOS instances
+ Start 2x4 dual-homed leaf-spine topology
+ Pingall
+ """
+ from tests.USECASE.SegmentRouting.dependencies.SRBridgingTest import SRBridgingTest
+ SRBridgingTest.runTest( main,
+ test_idx = 58,
+ topology = '2x4',
+ onosNodes = 3,
+ description = "Bridging test between two untagged hosts with different vlan id" )
+
+ def CASE61( self, main ):
+ """
+ Tests connectivity between two tagged hosts with different vlan id
+ (Ports are configured as vlan-tagged 10 and 20, respectively)
+
+ Sets up 1 ONOS instance
+ Start 0x1 single ToR topology
+ Pingall
+ """
+ from tests.USECASE.SegmentRouting.dependencies.SRBridgingTest import SRBridgingTest
+ SRBridgingTest.runTest( main,
+ test_idx = 61,
+ topology = '0x1',
+ onosNodes = 1,
+ description = "Bridging test between two tagged hosts with different vlan id",
+ vlan = [ 10, 20 ] )
+
+ def CASE62( self, main ):
+ """
+ Tests connectivity between two tagged hosts with different vlan id
+ (Ports are configured as vlan-tagged 10 and 20, respectively)
+
+ Sets up 1 ONOS instance
+ Start 0x2 dual-homed ToR topology
+ Pingall
+ """
+ from tests.USECASE.SegmentRouting.dependencies.SRBridgingTest import SRBridgingTest
+ SRBridgingTest.runTest( main,
+ test_idx = 62,
+ topology = '0x2',
+ onosNodes = 1,
+ description = "Bridging test between two tagged hosts with different vlan id",
+ vlan = [ 10, 20 ] )
+
+ def CASE63( self, main ):
+ """
+ Tests connectivity between two tagged hosts with different vlan id
+ (Ports are configured as vlan-tagged 10 and 20, respectively)
+
+ Sets up 1 ONOS instance
+ Start 2x2 leaf-spine topology
+ Pingall
+ """
+ from tests.USECASE.SegmentRouting.dependencies.SRBridgingTest import SRBridgingTest
+ SRBridgingTest.runTest( main,
+ test_idx = 63,
+ topology = '2x2',
+ onosNodes = 1,
+ description = "Bridging test between two tagged hosts with different vlan id",
+ vlan = [ 10, 20, 30, 40 ] )
+
+ def CASE64( self, main ):
+ """
+ Tests connectivity between two tagged hosts with different vlan id
+ (Ports are configured as vlan-tagged 10 and 20, respectively)
+
+ Sets up 1 ONOS instance
+ Start 2x4 dual-homed leaf-spine topology
+ Pingall
+ """
+ from tests.USECASE.SegmentRouting.dependencies.SRBridgingTest import SRBridgingTest
+ SRBridgingTest.runTest( main,
+ test_idx = 64,
+ topology = '2x4',
+ onosNodes = 1,
+ description = "Bridging test between two tagged hosts with different vlan id",
+ vlan = [ 10, 20, 30, 40 ] )
+
+ def CASE65( self, main ):
+ """
+ Tests connectivity between two tagged hosts with different vlan id
+ (Ports are configured as vlan-tagged 10 and 20, respectively)
+
+ Sets up 3 ONOS instances
+ Start 0x1 single ToR topology
+ Pingall
+ """
+ from tests.USECASE.SegmentRouting.dependencies.SRBridgingTest import SRBridgingTest
+ SRBridgingTest.runTest( main,
+ test_idx = 65,
+ topology = '0x1',
+ onosNodes = 3,
+ description = "Bridging test between two tagged hosts with different vlan id",
+ vlan = [ 10, 20 ] )
+
+ def CASE66( self, main ):
+ """
+ Tests connectivity between two tagged hosts with different vlan id
+ (Ports are configured as vlan-tagged 10 and 20, respectively)
+
+ Sets up 3 ONOS instances
+ Start 0x2 dual-homed ToR topology
+ Pingall
+ """
+ from tests.USECASE.SegmentRouting.dependencies.SRBridgingTest import SRBridgingTest
+ SRBridgingTest.runTest( main,
+ test_idx = 66,
+ topology = '0x2',
+ onosNodes = 3,
+ description = "Bridging test between two tagged hosts with different vlan id",
+ vlan = [ 10, 20 ] )
+
+ def CASE67( self, main ):
+ """
+ Tests connectivity between two tagged hosts with different vlan id
+ (Ports are configured as vlan-tagged 10 and 20, respectively)
+
+ Sets up 3 ONOS instances
+ Start 2x2 leaf-spine topology
+ Pingall
+ """
+ from tests.USECASE.SegmentRouting.dependencies.SRBridgingTest import SRBridgingTest
+ SRBridgingTest.runTest( main,
+ test_idx = 67,
+ topology = '2x2',
+ onosNodes = 3,
+ description = "Bridging test between two tagged hosts with different vlan id",
+ vlan = [ 10, 20, 30, 40 ] )
+
+ def CASE68( self, main ):
+ """
+ Tests connectivity between two tagged hosts with different vlan id
+ (Ports are configured as vlan-tagged 10 and 20, respectively)
+
+ Sets up 3 ONOS instances
+ Start 2x4 dual-homed leaf-spine topology
+ Pingall
+ """
+ from tests.USECASE.SegmentRouting.dependencies.SRBridgingTest import SRBridgingTest
+ SRBridgingTest.runTest( main,
+ test_idx = 68,
+ topology = '2x4',
+ onosNodes = 3,
+ description = "Bridging test between two tagged hosts with different vlan id",
+ vlan = [ 10, 20, 30, 40 ] )
+
+ def CASE71( self, main ):
+ """
+ Tests connectivity between untagged and tagged hosts with different vlan id
+ (Ports are configured as vlan-untagged 10 and vlan-tagged 20, respectively)
+
+ Sets up 1 ONOS instance
+ Start 0x1 single ToR topology
+ Pingall
+ """
+ from tests.USECASE.SegmentRouting.dependencies.SRBridgingTest import SRBridgingTest
+ SRBridgingTest.runTest( main,
+ test_idx = 71,
+ topology = '0x1',
+ onosNodes = 1,
+ description = "Bridging test between untagged and tagged hosts with different vlan id",
+ vlan = [ 0, 20 ] )
+
+ def CASE72( self, main ):
+ """
+ Tests connectivity between untagged and tagged hosts with different vlan id
+ (Ports are configured as vlan-untagged 10 and vlan-tagged 20, respectively)
+
+ Sets up 1 ONOS instance
+ Start 0x2 dual-homed ToR topology
+ Pingall
+ """
+ from tests.USECASE.SegmentRouting.dependencies.SRBridgingTest import SRBridgingTest
+ SRBridgingTest.runTest( main,
+ test_idx = 72,
+ topology = '0x2',
+ onosNodes = 1,
+ description = "Bridging test between untagged and tagged hosts with different vlan id",
+ vlan = [ 0, 20 ] )
+
+ def CASE73( self, main ):
+ """
+ Tests connectivity between untagged and tagged hosts with different vlan id
+ (Ports are configured as vlan-untagged 10 and vlan-tagged 20, respectively)
+
+ Sets up 1 ONOS instance
+ Start 2x2 leaf-spine topology
+ Pingall
+ """
+ from tests.USECASE.SegmentRouting.dependencies.SRBridgingTest import SRBridgingTest
+ SRBridgingTest.runTest( main,
+ test_idx = 73,
+ topology = '2x2',
+ onosNodes = 1,
+ description = "Bridging test between untagged and tagged hosts with different vlan id",
+ vlan = [ 0, 20, 0, 40 ] )
+
+ def CASE74( self, main ):
+ """
+ Tests connectivity between untagged and tagged hosts with different vlan id
+ (Ports are configured as vlan-untagged 10 and vlan-tagged 20, respectively)
+
+ Sets up 1 ONOS instance
+ Start 2x2 dual-homed leaf-spine topology
+ Pingall
+ """
+ from tests.USECASE.SegmentRouting.dependencies.SRBridgingTest import SRBridgingTest
+ SRBridgingTest.runTest( main,
+ test_idx = 74,
+ topology = '2x4',
+ onosNodes = 1,
+ description = "Bridging test between untagged and tagged hosts with different vlan id",
+ vlan = [ 0, 20, 0, 40 ] )
+
+ def CASE75( self, main ):
+ """
+ Tests connectivity between untagged and tagged hosts with different vlan id
+ (Ports are configured as vlan-untagged 10 and vlan-tagged 20, respectively)
+
+ Sets up 3 ONOS instances
+ Start 0x1 single ToR topology
+ Pingall
+ """
+ from tests.USECASE.SegmentRouting.dependencies.SRBridgingTest import SRBridgingTest
+ SRBridgingTest.runTest( main,
+ test_idx = 75,
+ topology = '0x1',
+ onosNodes = 3,
+ description = "Bridging test between untagged and tagged hosts with different vlan id",
+ vlan = [ 0, 20 ] )
+
+ def CASE76( self, main ):
+ """
+ Tests connectivity between untagged and tagged hosts with different vlan id
+ (Ports are configured as vlan-untagged 10 and vlan-tagged 20, respectively)
+
+ Sets up 3 ONOS instances
+ Start 0x2 dual-homed ToR topology
+ Pingall
+ """
+ from tests.USECASE.SegmentRouting.dependencies.SRBridgingTest import SRBridgingTest
+ SRBridgingTest.runTest( main,
+ test_idx = 76,
+ topology = '0x2',
+ onosNodes = 3,
+ description = "Bridging test between untagged and tagged hosts with different vlan id",
+ vlan = [ 0, 20 ] )
+
+ def CASE77( self, main ):
+ """
+ Tests connectivity between untagged and tagged hosts with different vlan id
+ (Ports are configured as vlan-untagged 10 and vlan-tagged 20, respectively)
+
+ Sets up 3 ONOS instances
+ Start 2x2 leaf-spine topology
+ Pingall
+ """
+ from tests.USECASE.SegmentRouting.dependencies.SRBridgingTest import SRBridgingTest
+ SRBridgingTest.runTest( main,
+ test_idx = 77,
+ topology = '2x2',
+ onosNodes = 3,
+ description = "Bridging test between untagged and tagged hosts with different vlan id",
+ vlan = [ 0, 20, 0, 40 ] )
+
+ def CASE78( self, main ):
+ """
+ Tests connectivity between untagged and tagged hosts with different vlan id
+ (Ports are configured as vlan-untagged 10 and vlan-tagged 20, respectively)
+
+ Sets up 3 ONOS instances
+ Start 2x2 dual-homed leaf-spine topology
+ Pingall
+ """
+ from tests.USECASE.SegmentRouting.dependencies.SRBridgingTest import SRBridgingTest
+ SRBridgingTest.runTest( main,
+ test_idx = 78,
+ topology = '2x4',
+ onosNodes = 3,
+ description = "Bridging test between untagged and tagged hosts with different vlan id",
+ vlan = [ 0, 20, 0, 40 ] )
diff --git a/TestON/tests/USECASE/SegmentRouting/SRBridging/SRBridging.topo b/TestON/tests/USECASE/SegmentRouting/SRBridging/SRBridging.topo
new file mode 100644
index 0000000..a672a8e
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRBridging/SRBridging.topo
@@ -0,0 +1,36 @@
+<TOPOLOGY>
+ <COMPONENT>
+ <ONOScell>
+ <host>localhost</host> # ONOS "bench" machine
+ <user>sdn</user>
+ <password>rocks</password>
+ <type>OnosClusterDriver</type>
+ <connect_order>1</connect_order>
+ <COMPONENTS>
+ <cluster_name></cluster_name> # Used as a prefix for cluster components. Defaults to 'ONOS'
+ <diff_clihost></diff_clihost> # if it has different host other than localhost for CLI. True or empty. OC# will be used if True.
+ <karaf_username></karaf_username>
+ <karaf_password></karaf_password>
+ <web_user></web_user>
+ <web_pass></web_pass>
+ <rest_port></rest_port>
+ <prompt></prompt> # TODO: we technically need a few of these, one per component
+ <onos_home></onos_home> # defines where onos home is
+ <nodes>3</nodes> # number of nodes in the cluster
+ </COMPONENTS>
+ </ONOScell>
+
+ <Mininet1>
+ <host>OCN</host>
+ <user>sdn</user>
+ <password>rocks</password>
+ <type>MininetCliDriver</type>
+ <connect_order>2</connect_order>
+ <COMPONENTS>
+ <home>~/mininet/custom/</home>
+ <prompt></prompt>
+ </COMPONENTS>
+ </Mininet1>
+
+ </COMPONENT>
+</TOPOLOGY>
\ No newline at end of file
diff --git a/TestON/tests/USECASE/SegmentRouting/SRBridging/__init__.py b/TestON/tests/USECASE/SegmentRouting/SRBridging/__init__.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/TestON/tests/USECASE/SegmentRouting/SRBridging/__init__.py