blob: ae70e0006a3734675f3c6ee8af410a3f41f91642 [file] [log] [blame]
# CASE1: 2x2 topo + 3-node ONOS CLUSTER + IP connectivity test + CLUSTER restart
# CASE2: 4x4 topo + 3-node ONOS CLUSTER + IP connectivity test + CLUSTER restart
# CASE3: Single switch + 3-node ONOS CLUSTER + IP connectivity test + CLUSTER restart
class SRClusterRestart:
def __init__( self ):
self.default = ''
def CASE1( self, main ):
"""
Sets up 3-node Onos-cluster
Start 2x2 Leaf-Spine topology
Pingall
Induce CLUSTER restart
Pingall
"""
description = "Cluster Restart test with 2x2 Leaf-spine "
main.case( description )
from tests.USECASE.SegmentRouting.dependencies.Testcaselib import \
Testcaselib as run
if not hasattr( main, 'apps' ):
run.initTest( main )
main.cfgName = '2x2'
main.numCtrls = 3
run.installOnos( main )
run.startMininet( main, 'cord_fabric.py' )
# pre-configured routing and bridging test
run.checkFlows( main, minFlowCount=116 )
run.pingAll( main, "CASE1" )
run.killOnos( main, [ 0, 1, 2 ], '4', '8', '0' )
run.pingAll( main, 'CASE1_Failure', dumpflows=False )
run.recoverOnos( main, [ 0, 1, 2 ], '4', '8', '3' )
run.checkFlows( main, minFlowCount=116 )
run.pingAll( main, 'CASE1_Failure' )
# TODO Dynamic config of hosts in subnet
# TODO Dynamic config of host not in subnet
# TODO Dynamic config of vlan xconnect
# TODO Vrouter integration
# TODO Mcast integration
run.cleanup( main )
def CASE2( self, main ):
"""
Sets up 3-node Onos-cluster
Start 4x4 Leaf-Spine topology
Pingall
Induce Cluster Restart
Pingall
"""
description = "Cluster Restart test with 4x4 Leaf-spine "
main.case( description )
from tests.USECASE.SegmentRouting.dependencies.Testcaselib import \
Testcaselib as run
if not hasattr( main, 'apps' ):
run.initTest( main )
main.cfgName = '4x4'
main.numCtrls = 3
run.installOnos( main )
run.startMininet( main, 'cord_fabric.py', args="--leaf=4 --spine=4" )
# pre-configured routing and bridging test
run.checkFlows( main, minFlowCount=350 )
run.pingAll( main, 'CASE2' )
run.killOnos( main, [ 0, 1, 2 ], '8', '32', '0' )
run.pingAll( main, 'CASE2_Failure', dumpflows=False )
run.recoverOnos( main, [ 0, 1, 2 ], '8', '32', '3' )
run.checkFlows( main, minFlowCount=350 )
run.pingAll( main, 'CASE3_Recovery' )
# TODO Dynamic config of hosts in subnet
# TODO Dynamic config of host not in subnet
# TODO Dynamic config of vlan xconnect
# TODO Vrouter integration
# TODO Mcast integration
run.cleanup( main )
def CASE3( self, main ):
"""
Sets up 3-node Onos-cluster
Start single switch topology
Pingall
Induce Cluster Restart
Pingall
"""
description = "Cluster Restart test with single switch "
main.case( description )
from tests.USECASE.SegmentRouting.dependencies.Testcaselib import \
Testcaselib as run
if not hasattr( main, 'apps' ):
run.initTest( main )
main.cfgName = '0x1'
main.numCtrls = 3
run.installOnos( main )
run.startMininet( main, 'cord_fabric.py', args="--leaf=1 --spine=0" )
# pre-configured routing and bridging test
run.checkFlows( main, minFlowCount=15 )
run.pingAll( main, 'CASE3' )
run.killOnos( main, [ 0, 1, 2 ], '1', '0', '0' )
run.pingAll( main, 'CASE3_Failure', dumpflows=False )
run.recoverOnos( main, [ 0, 1, 2 ], '1', '0', '3' )
run.checkFlows( main, minFlowCount=15 )
run.pingAll( main, 'CASE3_Failure' )
# TODO Dynamic config of hosts in subnet
# TODO Dynamic config of host not in subnet
# TODO Dynamic config of vlan xconnect
# TODO Vrouter integration
# TODO Mcast integration
run.cleanup( main )