blob: a2fca038f56184d4f8b8d7046e3dd25cbe9ee579 [file] [log] [blame]
Jeremy Ronquillob27ce4c2017-07-17 12:41:28 -07001"""
Jeremy Ronquillo23fb2162017-09-15 14:59:57 -07002Copyright 2016 Open Networking Foundation ( ONF )
Jeremy Ronquillob27ce4c2017-07-17 12:41:28 -07003
4Please refer questions to either the onos test mailing list at <onos-test@onosproject.org>,
5the System Testing Plans and Results wiki page at <https://wiki.onosproject.org/x/voMg>,
6or the System Testing Guide page at <https://wiki.onosproject.org/x/WYQg>
7
8 TestON is free software: you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation, either version 2 of the License, or
Jeremy Ronquillo23fb2162017-09-15 14:59:57 -070011 ( at your option ) any later version.
Jeremy Ronquillob27ce4c2017-07-17 12:41:28 -070012
13 TestON is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with TestON. If not, see <http://www.gnu.org/licenses/>.
20"""
Flavio Castro519072e2016-06-23 13:30:48 -070021# CASE1: 2x2 topo + 3-node ONOS CLUSTER + IP connectivity test + Control plane resilience
22# CASE2: 4x4 topo + 3-node ONOS CLUSTER + IP connectivity test + Control plane resilience
23# CASE3: Single switch + 3-node ONOS CLUSTER + IP connectivity test + Control plane resilience
24
Jeremy Ronquillo23fb2162017-09-15 14:59:57 -070025
Flavio Castro519072e2016-06-23 13:30:48 -070026class SROnosFailure:
Jeremy Ronquillo23fb2162017-09-15 14:59:57 -070027
Flavio Castro519072e2016-06-23 13:30:48 -070028 def __init__( self ):
29 self.default = ''
30
31 def CASE1( self, main ):
32 """
33 Sets up 3-node Onos-cluster
34 Start 2x2 Leaf-Spine topology
35 Pingall
36 Induce ONOS Failure
37 Pingall
38 """
Devin Lim57221b02018-02-14 15:45:36 -080039 try:
40 from tests.USECASE.SegmentRouting.SROnosFailure.dependencies.SROnosFailureFuncs import SROnosFailureFuncs
41 except ImportError:
42 main.log.error( "SRClusterRestartFuncs not found. Exiting the test" )
43 main.cleanAndExit()
44 try:
45 main.funcs
46 except ( NameError, AttributeError ):
47 main.funcs = SROnosFailureFuncs()
48 main.funcs.runTest( main, 1, 3,
49 '2x2', 116 )
Flavio Castro519072e2016-06-23 13:30:48 -070050
51 def CASE2( self, main ):
52 """
53 Sets up 3-node Onos-cluster
54 Start 4x4 Leaf-Spine topology
55 Pingall
56 Induce ONOS Failure
57 Pingall
58 """
Devin Lim57221b02018-02-14 15:45:36 -080059 try:
60 from tests.USECASE.SegmentRouting.SROnosFailure.dependencies.SROnosFailureFuncs import SROnosFailureFuncs
61 except ImportError:
62 main.log.error( "SRClusterRestartFuncs not found. Exiting the test" )
63 main.cleanAndExit()
64 try:
65 main.funcs
66 except ( NameError, AttributeError ):
67 main.funcs = SROnosFailureFuncs()
68 main.funcs.runTest( main, 2, 3,
69 '4x4', 350 )
Flavio Castro519072e2016-06-23 13:30:48 -070070
71 def CASE3( self, main ):
72 """
73 Sets up 3-node Onos-cluster
74 Start single switch topology
75 Pingall
76 Induce ONOS Failure
77 Pingall
78 """
Devin Lim57221b02018-02-14 15:45:36 -080079 try:
80 from tests.USECASE.SegmentRouting.SROnosFailure.dependencies.SROnosFailureFuncs import SROnosFailureFuncs
81 except ImportError:
82 main.log.error( "SRClusterRestartFuncs not found. Exiting the test" )
83 main.cleanAndExit()
84 try:
85 main.funcs
86 except ( NameError, AttributeError ):
87 main.funcs = SROnosFailureFuncs()
88 main.funcs.runTest( main, 3, 3,
89 '0x1', 15 )