blob: 53daa33db7fdd387824e8566f3b0d950cd186f75 [file] [log] [blame]
Flavio Castro519072e2016-06-23 13:30:48 -07001# CASE1: 2x2 topo + 3-node ONOS CLUSTER + IP connectivity test + Control plane resilience
2# CASE2: 4x4 topo + 3-node ONOS CLUSTER + IP connectivity test + Control plane resilience
3# CASE3: Single switch + 3-node ONOS CLUSTER + IP connectivity test + Control plane resilience
4
5class SROnosFailure:
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 ONOS Failure
15 Pingall
16 """
17 description = "ONOS Failure 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 ], '4', '8', '2' )
31 run.pingAll( main, 'CASE1_Failure' )
32 run.recoverOnos( main, [ 0 ], '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 ONOS Failure
48 Pingall
49 """
50 description = "ONOS Failure 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 ], '8', '32', '2' )
64 run.pingAll( main, 'CASE2_Failure' )
65 run.recoverOnos( main, [ 0 ], '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 ONOS Failure
81 Pingall
82 """
83 description = "ONOS Failure 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', '0', '2' )
97 run.pingAll( main, 'CASE3_Failure' )
98 run.recoverOnos( main, [ 0 ], '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 )