blob: d0cc985008332a3a456eb6140f87aea5249df5cd [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 Castroab163ca2016-07-07 14:05:00 -070021# CASE1: 2x2 Leaf-Spine topo and test IP connectivity
22# CASE2: 4x4 topo + IP connectivity test
23# CASE3: Single switch topo + IP connectivity test
24# CASE4: 2x2 topo + 3-node ONOS CLUSTER + IP connectivity test
25# CASE5: 4x4 topo + 3-node ONOS CLUSTER + IP connectivity test
26# CASE6: Single switch + 3-node ONOS CLUSTER + IP connectivity test
27
Jeremy Ronquillo23fb2162017-09-15 14:59:57 -070028
Flavio Castroab163ca2016-07-07 14:05:00 -070029class SRDynamic:
Jeremy Ronquillo23fb2162017-09-15 14:59:57 -070030
Flavio Castroab163ca2016-07-07 14:05:00 -070031 def __init__( self ):
32 self.default = ''
33
34 def CASE1( self, main ):
35 """
36 Sets up 1-node Onos-cluster
37 Start 2x2 Leaf-Spine topology
38 Pingall
39 """
Devin Lim57221b02018-02-14 15:45:36 -080040 try:
41 from tests.USECASE.SegmentRouting.SRDynamic.dependencies.SRDynamicFuncs import SRDynamicFuncs
42 except ImportError:
43 main.log.error( "SRClusterRestartFuncs not found. Exiting the test" )
44 main.cleanAndExit()
45 try:
46 main.funcs
47 except ( NameError, AttributeError ):
48 main.funcs = SRDynamicFuncs()
Flavio Castroab163ca2016-07-07 14:05:00 -070049
Devin Lim57221b02018-02-14 15:45:36 -080050 main.funcs.runTest( main, 1, 1, '2x2', 116, 140, False )
Flavio Castroab163ca2016-07-07 14:05:00 -070051
52 def CASE2( self, main ):
53 """
54 Sets up 1-node Onos-cluster
55 Start 4x4 Leaf-Spine topology
56 Pingall
57 """
Devin Lim57221b02018-02-14 15:45:36 -080058 try:
59 from tests.USECASE.SegmentRouting.SRDynamic.dependencies.SRDynamicFuncs import SRDynamicFuncs
60 except ImportError:
61 main.log.error( "SRClusterRestartFuncs not found. Exiting the test" )
62 main.cleanAndExit()
63 try:
64 main.funcs
65 except ( NameError, AttributeError ):
66 main.funcs = SRDynamicFuncs()
67
68 main.funcs.runTest( main, 2, 1, '4x4', 350, 380, False )
Flavio Castroab163ca2016-07-07 14:05:00 -070069
70 def CASE3( self, main ):
71 """
72 Sets up 1-node Onos-cluster
73 Start single switch topology
74 Pingall
75 """
Devin Lim57221b02018-02-14 15:45:36 -080076 try:
77 from tests.USECASE.SegmentRouting.SRDynamic.dependencies.SRDynamicFuncs import SRDynamicFuncs
78 except ImportError:
79 main.log.error( "SRClusterRestartFuncs not found. Exiting the test" )
80 main.cleanAndExit()
81 try:
82 main.funcs
83 except ( NameError, AttributeError ):
84 main.funcs = SRDynamicFuncs()
85
86 main.funcs.runTest( main, 3, 1, '0x1', 15, 18, False )
Flavio Castroab163ca2016-07-07 14:05:00 -070087
88 def CASE4( self, main ):
89 """
90 Sets up 3-node Onos-cluster
91 Start 2x2 Leaf-Spine topology
92 Pingall
93 """
Devin Lim57221b02018-02-14 15:45:36 -080094 try:
95 from tests.USECASE.SegmentRouting.SRDynamic.dependencies.SRDynamicFuncs import SRDynamicFuncs
96 except ImportError:
97 main.log.error( "SRClusterRestartFuncs not found. Exiting the test" )
98 main.cleanAndExit()
99 try:
100 main.funcs
101 except ( NameError, AttributeError ):
102 main.funcs = SRDynamicFuncs()
Flavio Castroab163ca2016-07-07 14:05:00 -0700103
Devin Lim57221b02018-02-14 15:45:36 -0800104 main.funcs.runTest( main, 4, 3, '2x2', 116, 140, True )
Flavio Castroab163ca2016-07-07 14:05:00 -0700105
106 def CASE5( self, main ):
107 """
108 Sets up 3-node Onos-cluster
109 Start 4x4 Leaf-Spine topology
110 Pingall
111 """
Devin Lim57221b02018-02-14 15:45:36 -0800112 try:
113 from tests.USECASE.SegmentRouting.SRDynamic.dependencies.SRDynamicFuncs import SRDynamicFuncs
114 except ImportError:
115 main.log.error( "SRClusterRestartFuncs not found. Exiting the test" )
116 main.cleanAndExit()
117 try:
118 main.funcs
119 except ( NameError, AttributeError ):
120 main.funcs = SRDynamicFuncs()
121
122 main.funcs.runTest( main, 5, 3, '4x4', 350, 380, True )
Flavio Castroab163ca2016-07-07 14:05:00 -0700123
124 def CASE6( self, main ):
125 """
126 Sets up 3-node Onos-cluster
127 Start single switch topology
128 Pingall
129 """
Devin Lim57221b02018-02-14 15:45:36 -0800130 try:
131 from tests.USECASE.SegmentRouting.SRDynamic.dependencies.SRDynamicFuncs import SRDynamicFuncs
132 except ImportError:
133 main.log.error( "SRClusterRestartFuncs not found. Exiting the test" )
134 main.cleanAndExit()
135 try:
136 main.funcs
137 except ( NameError, AttributeError ):
138 main.funcs = SRDynamicFuncs()
139
140 main.funcs.runTest( main, 6, 3, '0x1', 15, 20, True )