blob: eefb4d548e8c32e122f6be1b5a2445808ebd25b5 [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 Castro5608a392016-06-22 17:02:35 -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
Flavio Castrof7faa422016-06-14 11:02:09 -070027
Jeremy Ronquillo23fb2162017-09-15 14:59:57 -070028
Flavio Castrof7faa422016-06-14 11:02:09 -070029class SRSanity:
Jeremy Ronquillo23fb2162017-09-15 14:59:57 -070030
Flavio Castrof7faa422016-06-14 11:02:09 -070031 def __init__( self ):
32 self.default = ''
33
34 def CASE1( self, main ):
Flavio Castrof7faa422016-06-14 11:02:09 -070035 """
Flavio Castro0a05b8d2016-06-16 17:26:51 -070036 Sets up 1-node Onos-cluster
37 Start 2x2 Leaf-Spine topology
38 Pingall
Flavio Castrof7faa422016-06-14 11:02:09 -070039 """
Devin Lim57221b02018-02-14 15:45:36 -080040 try:
41 from tests.USECASE.SegmentRouting.SRSanity.dependencies.SRSanityFuncs import SRSanityFuncs
42 except ImportError:
43 main.log.error( "SRSanityFuncs not found. Exiting the test" )
44 main.cleanAndExit()
45 try:
46 main.funcs
47 except ( NameError, AttributeError ):
48 main.funcs = SRSanityFuncs()
49 main.funcs.runTest( main, 1, 1,
50 '2x2', 116 )
Flavio Castrof7faa422016-06-14 11:02:09 -070051
Flavio Castrof7faa422016-06-14 11:02:09 -070052 def CASE2( self, main ):
53 """
Flavio Castro0a05b8d2016-06-16 17:26:51 -070054 Sets up 1-node Onos-cluster
55 Start 4x4 Leaf-Spine topology
56 Pingall
Flavio Castrof7faa422016-06-14 11:02:09 -070057 """
Devin Lim57221b02018-02-14 15:45:36 -080058 try:
59 from tests.USECASE.SegmentRouting.SRSanity.dependencies.SRSanityFuncs import SRSanityFuncs
60 except ImportError:
61 main.log.error( "SRSanityFuncs not found. Exiting the test" )
62 main.cleanAndExit()
63 try:
64 main.funcs
65 except ( NameError, AttributeError ):
66 main.funcs = SRSanityFuncs()
67 main.funcs.runTest( main, 2, 1,
68 '4x4', 350 )
Flavio Castrof7faa422016-06-14 11:02:09 -070069
70 def CASE3( self, main ):
71 """
Flavio Castro02b43632016-06-20 17:07:27 -070072 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.SRSanity.dependencies.SRSanityFuncs import SRSanityFuncs
78 except ImportError:
79 main.log.error( "SRSanityFuncs not found. Exiting the test" )
80 main.cleanAndExit()
81 try:
82 main.funcs
83 except ( NameError, AttributeError ):
84 main.funcs = SRSanityFuncs()
85 main.funcs.runTest( main, 3, 1,
86 '0x1', 15 )
Flavio Castro02b43632016-06-20 17:07:27 -070087
88 def CASE4( self, main ):
89 """
Flavio Castro0a05b8d2016-06-16 17:26:51 -070090 Sets up 3-node Onos-cluster
91 Start 2x2 Leaf-Spine topology
Flavio Castrof7faa422016-06-14 11:02:09 -070092 Pingall
93 """
Devin Lim57221b02018-02-14 15:45:36 -080094 try:
95 from tests.USECASE.SegmentRouting.SRSanity.dependencies.SRSanityFuncs import SRSanityFuncs
96 except ImportError:
97 main.log.error( "SRSanityFuncs not found. Exiting the test" )
98 main.cleanAndExit()
99 try:
100 main.funcs
101 except ( NameError, AttributeError ):
102 main.funcs = SRSanityFuncs()
103 main.funcs.runTest( main, 4, 3,
104 '2x2', 116 )
Flavio Castro02b43632016-06-20 17:07:27 -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.SRSanity.dependencies.SRSanityFuncs import SRSanityFuncs
114 except ImportError:
115 main.log.error( "SRSanityFuncs not found. Exiting the test" )
116 main.cleanAndExit()
117 try:
118 main.funcs
119 except ( NameError, AttributeError ):
120 main.funcs = SRSanityFuncs()
121 main.funcs.runTest( main, 5, 3,
122 '4x4', 350 )
Flavio Castro02b43632016-06-20 17:07:27 -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.SRSanity.dependencies.SRSanityFuncs import SRSanityFuncs
132 except ImportError:
133 main.log.error( "SRSanityFuncs not found. Exiting the test" )
134 main.cleanAndExit()
135 try:
136 main.funcs
137 except ( NameError, AttributeError ):
138 main.funcs = SRSanityFuncs()
139 main.funcs.runTest( main, 6, 3,
140 '0x1', 15 )