[ONOS-7524] Mininet based SRMulticast tests
Change-Id: I92f69417f10b24fad386fe348fa4ed148ad173e7
diff --git a/TestON/tests/USECASE/SegmentRouting/SRMulticast/SRMulticast.py b/TestON/tests/USECASE/SegmentRouting/SRMulticast/SRMulticast.py
index 616ba4c..b2a7139 100644
--- a/TestON/tests/USECASE/SegmentRouting/SRMulticast/SRMulticast.py
+++ b/TestON/tests/USECASE/SegmentRouting/SRMulticast/SRMulticast.py
@@ -4,8 +4,12 @@
def CASE1( self, main ):
"""
- Sets up 3 ONOS instances
- Start 2x2 topology of hardware switches
+ Sets up 3 ONOS instances, start H-AGG topology
+ Create a Multicast flow between a source and sink on the same dual-tor leaf
+ Verify flows and groups
+ Verify traffic
+ Remove sink
+ Verify flows and groups
"""
try:
from tests.USECASE.SegmentRouting.SRMulticast.dependencies.SRMulticastTest import SRMulticastTest
@@ -18,135 +22,260 @@
main.funcs = SRMulticastTest()
main.funcs.runTest( main,
test_idx=1,
- topology='2x2',
- onosNodes=1,
- description="TBD" )
+ onosNodes=3,
+ description="Create a Multicast flow between a source and sink on the same dual-tor leaf" )
- def CASE01( self, main ):
+ def CASE2( self, main ):
"""
- Sets up 3 ONOS instances, start 2x5 topology
- Create a Multicast flow between a source and sink on the same dual-tor leaf
- Verify flows and groups
- Verify traffic
- Remove sink
- Verify flows and groups
- """
- pass
-
- def CASE02( self, main ):
- """
- Sets up 3 ONOS instances, start 2x5 topology
+ Sets up 3 ONOS instances, start H-AGG topology
Create a Multicast flow between a source and sink on different dual-tor leaves
Verify flows and groups
Verify traffic
Remove sink
Verify flows and groups
"""
- pass
+ try:
+ from tests.USECASE.SegmentRouting.SRMulticast.dependencies.SRMulticastTest import SRMulticastTest
+ except ImportError:
+ main.log.error( "SRMulticastTest not found. Exiting the test" )
+ main.cleanAndExit()
+ try:
+ main.funcs
+ except ( NameError, AttributeError ):
+ main.funcs = SRMulticastTest()
+ main.funcs.runTest( main,
+ test_idx=2,
+ onosNodes=3,
+ description="Create a Multicast flow between a source and sink on different dual-tor leaves" )
- def CASE03( self, main ):
+ def CASE3( self, main ):
"""
- Sets up 3 ONOS instances, start 2x5 topology
+ Sets up 3 ONOS instances, start H-AGG topology
Create a Multicast flow between a source and sink on different leaves (sink on single-tor)
Verify flows and groups
Verify traffic
Remove sink
Verify flows and groups
"""
- pass
+ try:
+ from tests.USECASE.SegmentRouting.SRMulticast.dependencies.SRMulticastTest import SRMulticastTest
+ except ImportError:
+ main.log.error( "SRMulticastTest not found. Exiting the test" )
+ main.cleanAndExit()
+ try:
+ main.funcs
+ except ( NameError, AttributeError ):
+ main.funcs = SRMulticastTest()
+ main.funcs.runTest( main,
+ test_idx=3,
+ onosNodes=3,
+ description="Create a Multicast flow between a source and sink on different leaves (sink on single-tor)" )
- def CASE04( self, main ):
+ def CASE4( self, main ):
"""
- Sets up 3 ONOS instances, start 2x5 topology
- Combines CASE01 and CASE02
+ Sets up 3 ONOS instances, start H-AGG topology
+ Combines CASE1 and CASE2
Verify flows and groups
Verify traffic
Remove sinks
Verify flows and groups
"""
- pass
+ try:
+ from tests.USECASE.SegmentRouting.SRMulticast.dependencies.SRMulticastTest import SRMulticastTest
+ except ImportError:
+ main.log.error( "SRMulticastTest not found. Exiting the test" )
+ main.cleanAndExit()
+ try:
+ main.funcs
+ except ( NameError, AttributeError ):
+ main.funcs = SRMulticastTest()
+ main.funcs.runTest( main,
+ test_idx=4,
+ onosNodes=3,
+ description="Combines CASE1 and CASE2" )
- def CASE05( self, main ):
+ def CASE5( self, main ):
"""
- Sets up 3 ONOS instances, start 2x5 topology
- Combines CASE02 and CASE03
+ Sets up 3 ONOS instances, start H-AGG topology
+ Combines CASE2 and CASE3
Verify flows and groups
Verify traffic
Remove sinks
Verify flows and groups
"""
- pass
+ try:
+ from tests.USECASE.SegmentRouting.SRMulticast.dependencies.SRMulticastTest import SRMulticastTest
+ except ImportError:
+ main.log.error( "SRMulticastTest not found. Exiting the test" )
+ main.cleanAndExit()
+ try:
+ main.funcs
+ except ( NameError, AttributeError ):
+ main.funcs = SRMulticastTest()
+ main.funcs.runTest( main,
+ test_idx=5,
+ onosNodes=3,
+ description="Combines CASE2 and CASE3" )
- def CASE06( self, main ):
+ def CASE6( self, main ):
"""
- Sets up 3 ONOS instances, start 2x5 topology
- Combines CASE01 and CASE03
+ Sets up 3 ONOS instances, start H-AGG topology
+ Combines CASE1 and CASE3
Verify flows and groups
Verify traffic
Remove sinks
Verify flows and groups
"""
- pass
+ try:
+ from tests.USECASE.SegmentRouting.SRMulticast.dependencies.SRMulticastTest import SRMulticastTest
+ except ImportError:
+ main.log.error( "SRMulticastTest not found. Exiting the test" )
+ main.cleanAndExit()
+ try:
+ main.funcs
+ except ( NameError, AttributeError ):
+ main.funcs = SRMulticastTest()
+ main.funcs.runTest( main,
+ test_idx=5,
+ onosNodes=3,
+ description="Combines CASE1 and CASE3" )
- def CASE07( self, main ):
+ def CASE7( self, main ):
"""
- Sets up 3 ONOS instances, start 2x5 topology
- Combines CASE01, CASE02 and CASE03
+ Sets up 3 ONOS instances, start H-AGG topology
+ Combines CASE1, CASE2 and CASE3
Verify flows and groups
Verify traffic
Remove sinks
Verify flows and groups
"""
- pass
+ try:
+ from tests.USECASE.SegmentRouting.SRMulticast.dependencies.SRMulticastTest import SRMulticastTest
+ except ImportError:
+ main.log.error( "SRMulticastTest not found. Exiting the test" )
+ main.cleanAndExit()
+ try:
+ main.funcs
+ except ( NameError, AttributeError ):
+ main.funcs = SRMulticastTest()
+ main.funcs.runTest( main,
+ test_idx=7,
+ onosNodes=3,
+ description="Combines CASE7 with route removal" )
- def CASE08( self, main ):
+ def CASE8( self, main ):
"""
- Sets up 3 ONOS instances, start 2x5 topology
- Combines CASE07 with route removal
+ Sets up 3 ONOS instances, start H-AGG topology
+ Combines CASE7 with route removal
Verify flows and groups
"""
- pass
+ try:
+ from tests.USECASE.SegmentRouting.SRMulticast.dependencies.SRMulticastTest import SRMulticastTest
+ except ImportError:
+ main.log.error( "SRMulticastTest not found. Exiting the test" )
+ main.cleanAndExit()
+ try:
+ main.funcs
+ except ( NameError, AttributeError ):
+ main.funcs = SRMulticastTest()
+ main.funcs.runTest( main,
+ test_idx=8,
+ onosNodes=3,
+ description="Combines CASE7 with route removal",
+ removeRoute=True )
def CASE101( self, main ):
"""
- Sets up 3 ONOS instances, start 2x5 topology
- Combines CASE07 with a link failure (link ingress-spine)
+ Sets up 3 ONOS instances, start H-AGG topology
+ Combines CASE7 with a link failure (link ingress-spine)
Verify flows and groups
Verify traffic
"""
- pass
+ try:
+ from tests.USECASE.SegmentRouting.SRMulticast.dependencies.SRMulticastTest import SRMulticastTest
+ except ImportError:
+ main.log.error( "SRMulticastTest not found. Exiting the test" )
+ main.cleanAndExit()
+ try:
+ main.funcs
+ except ( NameError, AttributeError ):
+ main.funcs = SRMulticastTest()
+ main.funcs.runTest( main,
+ test_idx=101,
+ onosNodes=3,
+ description="Combines CASE7 with a link failure (link ingress-spine)",
+ linkFailure=True )
def CASE102( self, main ):
"""
- Sets up 3 ONOS instances, start 2x5 topology
- Combines CASE07 with a link failure (link spine-egress-dt-leaf)
+ Sets up 3 ONOS instances, start H-AGG topology
+ Combines CASE7 with a link failure (link spine-egress-dt-leaf)
Verify flows and groups
Verify traffic
"""
- pass
+ try:
+ from tests.USECASE.SegmentRouting.SRMulticast.dependencies.SRMulticastTest import SRMulticastTest
+ except ImportError:
+ main.log.error( "SRMulticastTest not found. Exiting the test" )
+ main.cleanAndExit()
+ try:
+ main.funcs
+ except ( NameError, AttributeError ):
+ main.funcs = SRMulticastTest()
+ main.funcs.runTest( main,
+ test_idx=102,
+ onosNodes=3,
+ description="Combines CASE7 with a link failure (link spine-engress-dt-leaf)",
+ linkFailure=True )
def CASE103( self, main ):
"""
- Sets up 3 ONOS instances, start 2x5 topology
- Combines CASE07 with a link failure (link spine-egress-st-leaf)
+ Sets up 3 ONOS instances, start H-AGG topology
+ Combines CASE7 with a link failure (link spine-egress-st-leaf)
Verify flows and groups
Verify traffic
"""
- pass
+ try:
+ from tests.USECASE.SegmentRouting.SRMulticast.dependencies.SRMulticastTest import SRMulticastTest
+ except ImportError:
+ main.log.error( "SRMulticastTest not found. Exiting the test" )
+ main.cleanAndExit()
+ try:
+ main.funcs
+ except ( NameError, AttributeError ):
+ main.funcs = SRMulticastTest()
+ main.funcs.runTest( main,
+ test_idx=103,
+ onosNodes=3,
+ description="Combines CASE7 with a link failure (link spine-engress-st-leaf)",
+ linkFailure=True )
def CASE201( self, main ):
"""
- Sets up 3 ONOS instances, start 2x5 topology
- Combines CASE07 with spine failure
+ Sets up 3 ONOS instances, start H-AGG topology
+ Combines CASE7 with spine failure
Verify flows and groups
Verify traffic
"""
- pass
+ try:
+ from tests.USECASE.SegmentRouting.SRMulticast.dependencies.SRMulticastTest import SRMulticastTest
+ except ImportError:
+ main.log.error( "SRMulticastTest not found. Exiting the test" )
+ main.cleanAndExit()
+ try:
+ main.funcs
+ except ( NameError, AttributeError ):
+ main.funcs = SRMulticastTest()
+ main.funcs.runTest( main,
+ test_idx=201,
+ onosNodes=3,
+ description="Combines CASE7 with spine failure",
+ switchFailure=True )
def CASE202( self, main ):
"""
- Sets up 3 ONOS instances, start 2x5 topology
- Combines CASE07 with ingress failure and recovery
+ Sets up 3 ONOS instances, start H-AGG topology
+ Combines CASE7 with ingress failure and recovery
Verify flows and groups are removed (failure)
Verify flows and groups (recovery)
Verify traffic (recovery)
@@ -155,8 +284,8 @@
def CASE203( self, main ):
"""
- Sets up 3 ONOS instances, start 2x5 topology
- Combines CASE07 with egress-dt-leaf failure and recovery
+ Sets up 3 ONOS instances, start H-AGG topology
+ Combines CASE7 with egress-dt-leaf failure and recovery
Verify flows and groups are removed for the failing sink (failure)
Verify traffic on remaining sinks (failure)
Verify flows and groups (recovery)
@@ -166,8 +295,8 @@
def CASE204( self, main ):
"""
- Sets up 3 ONOS instances, start 2x5 topology
- Combines CASE07 with egress-st-leaf failure and recovery
+ Sets up 3 ONOS instances, start H-AGG topology
+ Combines CASE7 with egress-st-leaf failure and recovery
Verify flows and groups are removed for the failing sink (failure)
Verify traffic on remaining sinks (failure)
Verify flows and groups (recovery)
@@ -177,8 +306,8 @@
def CASE205( self, main ):
"""
- Sets up 3 ONOS instances, start 2x5 topology
- Combines CASE07 with egress leaves failure and recovery
+ Sets up 3 ONOS instances, start H-AGG topology
+ Combines CASE7 with egress leaves failure and recovery
Verify flows and groups are removed for the failing sinks (failure)
Verify traffic on remaining sink (failure)
Verify flows and groups (recovery)
@@ -188,8 +317,8 @@
def CASE301( self, main ):
"""
- Sets up 3 ONOS instances, start 2x5 topology
- Combines CASE07 with ONOS failure and recovery
+ Sets up 3 ONOS instances, start H-AGG topology
+ Combines CASE7 with ONOS failure and recovery
Verify flows and groups (failure)
Verify traffic (failure)
Verify flows and groups (recovery)