blob: ae70e0006a3734675f3c6ee8af410a3f41f91642 [file] [log] [blame]
Flavio Castro519072e2016-06-23 13:30:48 -07001# CASE1: 2x2 topo + 3-node ONOS CLUSTER + IP connectivity test + CLUSTER restart
2# CASE2: 4x4 topo + 3-node ONOS CLUSTER + IP connectivity test + CLUSTER restart
3# CASE3: Single switch + 3-node ONOS CLUSTER + IP connectivity test + CLUSTER restart
4
5class SRClusterRestart:
6 def __init__( self ):
7 self.default = ''
8
9 def CASE1( self, main ):
10 """
11 Sets up 3-node Onos-cluster
12 Start 2x2 Leaf-Spine topology
13 Pingall
14 Induce CLUSTER restart
15 Pingall
16 """
17 description = "Cluster Restart test with 2x2 Leaf-spine "
18 main.case( description )
19 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import \
20 Testcaselib as run
21 if not hasattr( main, 'apps' ):
22 run.initTest( main )
23 main.cfgName = '2x2'
24 main.numCtrls = 3
25 run.installOnos( main )
26 run.startMininet( main, 'cord_fabric.py' )
27 # pre-configured routing and bridging test
28 run.checkFlows( main, minFlowCount=116 )
29 run.pingAll( main, "CASE1" )
30 run.killOnos( main, [ 0, 1, 2 ], '4', '8', '0' )
31 run.pingAll( main, 'CASE1_Failure', dumpflows=False )
32 run.recoverOnos( main, [ 0, 1, 2 ], '4', '8', '3' )
33 run.checkFlows( main, minFlowCount=116 )
34 run.pingAll( main, 'CASE1_Failure' )
35 # TODO Dynamic config of hosts in subnet
36 # TODO Dynamic config of host not in subnet
37 # TODO Dynamic config of vlan xconnect
38 # TODO Vrouter integration
39 # TODO Mcast integration
40 run.cleanup( main )
41
42 def CASE2( self, main ):
43 """
44 Sets up 3-node Onos-cluster
45 Start 4x4 Leaf-Spine topology
46 Pingall
47 Induce Cluster Restart
48 Pingall
49 """
50 description = "Cluster Restart test with 4x4 Leaf-spine "
51 main.case( description )
52 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import \
53 Testcaselib as run
54 if not hasattr( main, 'apps' ):
55 run.initTest( main )
56 main.cfgName = '4x4'
57 main.numCtrls = 3
58 run.installOnos( main )
59 run.startMininet( main, 'cord_fabric.py', args="--leaf=4 --spine=4" )
60 # pre-configured routing and bridging test
61 run.checkFlows( main, minFlowCount=350 )
62 run.pingAll( main, 'CASE2' )
63 run.killOnos( main, [ 0, 1, 2 ], '8', '32', '0' )
64 run.pingAll( main, 'CASE2_Failure', dumpflows=False )
65 run.recoverOnos( main, [ 0, 1, 2 ], '8', '32', '3' )
66 run.checkFlows( main, minFlowCount=350 )
67 run.pingAll( main, 'CASE3_Recovery' )
68 # TODO Dynamic config of hosts in subnet
69 # TODO Dynamic config of host not in subnet
70 # TODO Dynamic config of vlan xconnect
71 # TODO Vrouter integration
72 # TODO Mcast integration
73 run.cleanup( main )
74
75 def CASE3( self, main ):
76 """
77 Sets up 3-node Onos-cluster
78 Start single switch topology
79 Pingall
80 Induce Cluster Restart
81 Pingall
82 """
83 description = "Cluster Restart test with single switch "
84 main.case( description )
85 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import \
86 Testcaselib as run
87 if not hasattr( main, 'apps' ):
88 run.initTest( main )
89 main.cfgName = '0x1'
90 main.numCtrls = 3
91 run.installOnos( main )
92 run.startMininet( main, 'cord_fabric.py', args="--leaf=1 --spine=0" )
93 # pre-configured routing and bridging test
94 run.checkFlows( main, minFlowCount=15 )
95 run.pingAll( main, 'CASE3' )
96 run.killOnos( main, [ 0, 1, 2 ], '1', '0', '0' )
97 run.pingAll( main, 'CASE3_Failure', dumpflows=False )
98 run.recoverOnos( main, [ 0, 1, 2 ], '1', '0', '3' )
99 run.checkFlows( main, minFlowCount=15 )
100 run.pingAll( main, 'CASE3_Failure' )
101 # TODO Dynamic config of hosts in subnet
102 # TODO Dynamic config of host not in subnet
103 # TODO Dynamic config of vlan xconnect
104 # TODO Vrouter integration
105 # TODO Mcast integration
106 run.cleanup( main )