blob: c69645f04f90eaf70c429d56baf226164b055377 [file] [log] [blame]
Flavio Castro0a05b8d2016-06-16 17:26:51 -07001# This test should always succeed. it runs cases 1,2,3
Flavio Castro49c218d2016-06-21 16:55:57 -07002# CASE1: 2x2 Leaf-Spine topo and test IP connectivity
3# CASE2: 4x4 topo + IP connectivity test
4# CASE3: Single switch topo + IP connectivity test
5# CASE4: 2x2 topo + 3-node ONOS CLUSTER + IP connectivity test
6# CASE5: 4x4 topo + 3-node ONOS CLUSTER + IP connectivity test
7# CASE6: Single switch + 3-node ONOS CLUSTER + IP connectivity test
Flavio Castrof7faa422016-06-14 11:02:09 -07008
9class SRSanity:
Flavio Castrof7faa422016-06-14 11:02:09 -070010 def __init__( self ):
11 self.default = ''
12
13 def CASE1( self, main ):
Flavio Castrof7faa422016-06-14 11:02:09 -070014 """
Flavio Castro0a05b8d2016-06-16 17:26:51 -070015 Sets up 1-node Onos-cluster
16 Start 2x2 Leaf-Spine topology
17 Pingall
Flavio Castrof7faa422016-06-14 11:02:09 -070018 """
Flavio Castro49c218d2016-06-21 16:55:57 -070019 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import \
20 Testcaselib as run
21 if not hasattr( main, 'apps' ):
22 run.initTest( main )
Flavio Castrof7faa422016-06-14 11:02:09 -070023
Flavio Castro0a05b8d2016-06-16 17:26:51 -070024 description = "Bridging and Routing sanity test with 2x2 Leaf-spine "
25 main.case( description )
Flavio Castrof7faa422016-06-14 11:02:09 -070026
Flavio Castro0a05b8d2016-06-16 17:26:51 -070027 main.cfgName = '2x2'
28 main.numCtrls = 1
Flavio Castro49c218d2016-06-21 16:55:57 -070029 run.installOnos( main )
30 run.startMininet( main, 'cord_fabric.py' )
31 # pre-configured routing and bridging test
32 run.checkFlows( main, minFlowCount=116 )
33 run.pingAll( main, "CASE1" )
34 # TODO Dynamic config of hosts in subnet
35 # TODO Dynamic config of host not in subnet
36 # TODO Dynamic config of vlan xconnect
37 # TODO Vrouter integration
38 # TODO Mcast integration
39 run.cleanup( main )
Flavio Castrof7faa422016-06-14 11:02:09 -070040
Flavio Castrof7faa422016-06-14 11:02:09 -070041 def CASE2( self, main ):
42 """
Flavio Castro0a05b8d2016-06-16 17:26:51 -070043 Sets up 1-node Onos-cluster
44 Start 4x4 Leaf-Spine topology
45 Pingall
Flavio Castrof7faa422016-06-14 11:02:09 -070046 """
Flavio Castro49c218d2016-06-21 16:55:57 -070047 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import \
48 Testcaselib as run
49 if not hasattr( main, 'apps' ):
50 run.initTest( main )
Flavio Castro0a05b8d2016-06-16 17:26:51 -070051 description = "Bridging and Routing sanity test with 4x4 Leaf-spine "
52 main.case( description )
53 main.cfgName = '4x4'
54 main.numCtrls = 1
Flavio Castro49c218d2016-06-21 16:55:57 -070055 run.installOnos( main )
56 run.startMininet( main, 'cord_fabric.py', args="--leaf=4 --spine=4" )
57 # pre-configured routing and bridging test
58 run.checkFlows( main, minFlowCount=350 )
59 run.pingAll( main, 'CASE2' )
60 # TODO Dynamic config of hosts in subnet
61 # TODO Dynamic config of host not in subnet
62 # TODO Dynamic config of vlan xconnect
63 # TODO Vrouter integration
64 # TODO Mcast integration
65 run.cleanup( main )
Flavio Castrof7faa422016-06-14 11:02:09 -070066
67 def CASE3( self, main ):
68 """
Flavio Castro02b43632016-06-20 17:07:27 -070069 Sets up 1-node Onos-cluster
70 Start single switch topology
71 Pingall
72 """
Flavio Castro49c218d2016-06-21 16:55:57 -070073 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import \
74 Testcaselib as run
75 if not hasattr( main, 'apps' ):
76 run.initTest( main )
Flavio Castro02b43632016-06-20 17:07:27 -070077 description = "Bridging and Routing sanity test with single switch "
78 main.case( description )
79 main.cfgName = '0x1'
80 main.numCtrls = 1
Flavio Castro49c218d2016-06-21 16:55:57 -070081 run.installOnos( main )
82 run.startMininet( main, 'cord_fabric.py', args="--leaf=1 --spine=0" )
83 # pre-configured routing and bridging test
84 run.checkFlows( main, minFlowCount=15 )
85 run.pingAll( main, 'CASE3' )
86 # TODO Dynamic config of hosts in subnet
87 # TODO Dynamic config of host not in subnet
88 # TODO Dynamic config of vlan xconnect
89 # TODO Vrouter integration
90 # TODO Mcast integration
91 run.cleanup( main )
Flavio Castro02b43632016-06-20 17:07:27 -070092
93 def CASE4( self, main ):
94 """
Flavio Castro0a05b8d2016-06-16 17:26:51 -070095 Sets up 3-node Onos-cluster
96 Start 2x2 Leaf-Spine topology
Flavio Castrof7faa422016-06-14 11:02:09 -070097 Pingall
98 """
Flavio Castro49c218d2016-06-21 16:55:57 -070099 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import \
100 Testcaselib as run
101 if not hasattr( main, 'apps' ):
102 run.initTest( main )
Flavio Castro0a05b8d2016-06-16 17:26:51 -0700103 description = "Bridging and Routing sanity test with 2x2 Leaf-spine "
Flavio Castrof7faa422016-06-14 11:02:09 -0700104 main.case( description )
Flavio Castro0a05b8d2016-06-16 17:26:51 -0700105 main.cfgName = '2x2'
106 main.numCtrls = 3
Flavio Castro49c218d2016-06-21 16:55:57 -0700107 run.installOnos( main )
108 run.startMininet( main, 'cord_fabric.py' )
109 # pre-configured routing and bridging test
110 run.checkFlows( main, minFlowCount=116 )
111 run.pingAll( main, 'CASE4' )
112 # TODO Dynamic config of hosts in subnet
113 # TODO Dynamic config of host not in subnet
114 # TODO Dynamic config of vlan xconnect
115 # TODO Vrouter integration
116 # TODO Mcast integration
117 run.cleanup( main )
Flavio Castro02b43632016-06-20 17:07:27 -0700118
119 def CASE5( self, main ):
120 """
121 Sets up 3-node Onos-cluster
122 Start 4x4 Leaf-Spine topology
123 Pingall
124 """
Flavio Castro49c218d2016-06-21 16:55:57 -0700125 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import \
126 Testcaselib as run
127 if not hasattr( main, 'apps' ):
128 run.initTest( main )
Flavio Castro02b43632016-06-20 17:07:27 -0700129 description = "Bridging and Routing sanity test with 4x4 Leaf-spine "
130 main.case( description )
131 main.cfgName = '4x4'
132 main.numCtrls = 3
Flavio Castro49c218d2016-06-21 16:55:57 -0700133 run.installOnos( main )
134 run.startMininet( main, 'cord_fabric.py', args="--leaf=4 --spine=4" )
135 # pre-configured routing and bridging test
136 run.checkFlows( main, minFlowCount=350 )
137 run.pingAll( main, 'CASE5' )
138 # TODO Dynamic config of hosts in subnet
139 # TODO Dynamic config of host not in subnet
140 # TODO Dynamic config of vlan xconnect
141 # TODO Vrouter integration
142 # TODO Mcast integration
143 run.cleanup( main )
Flavio Castro02b43632016-06-20 17:07:27 -0700144
145 def CASE6( self, main ):
146 """
147 Sets up 3-node Onos-cluster
148 Start single switch topology
149 Pingall
150 """
Flavio Castro49c218d2016-06-21 16:55:57 -0700151 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import \
152 Testcaselib as run
153 if not hasattr( main, 'apps' ):
154 run.initTest( main )
Flavio Castro02b43632016-06-20 17:07:27 -0700155 description = "Bridging and Routing sanity test with single switch "
156 main.case( description )
157 main.cfgName = '0x1'
158 main.numCtrls = 3
Flavio Castro49c218d2016-06-21 16:55:57 -0700159 run.installOnos( main )
160 run.startMininet( main, 'cord_fabric.py', args="--leaf=1 --spine=0" )
161 # pre-configured routing and bridging test
162 run.checkFlows( main, minFlowCount=15 )
163 run.pingAll( main, 'CASE4' )
164 # TODO Dynamic config of hosts in subnet
165 # TODO Dynamic config of host not in subnet
166 # TODO Dynamic config of vlan xconnect
167 # TODO Vrouter integration
168 # TODO Mcast integration
169 run.cleanup( main )