blob: e62dc7872aba998cf6edf20d76da9401cc4fffde [file] [log] [blame]
Flavio Castro5608a392016-06-22 17:02:35 -07001# CASE1: 2x2 Leaf-Spine topo and test IP connectivity
2# CASE2: 4x4 topo + IP connectivity test
3# CASE3: Single switch topo + IP connectivity test
4# CASE4: 2x2 topo + 3-node ONOS CLUSTER + IP connectivity test
5# CASE5: 4x4 topo + 3-node ONOS CLUSTER + IP connectivity test
6# CASE6: Single switch + 3-node ONOS CLUSTER + IP connectivity test
Flavio Castrof7faa422016-06-14 11:02:09 -07007
8class SRSanity:
Flavio Castrof7faa422016-06-14 11:02:09 -07009 def __init__( self ):
10 self.default = ''
11
12 def CASE1( self, main ):
Flavio Castrof7faa422016-06-14 11:02:09 -070013 """
Flavio Castro0a05b8d2016-06-16 17:26:51 -070014 Sets up 1-node Onos-cluster
15 Start 2x2 Leaf-Spine topology
16 Pingall
Flavio Castrof7faa422016-06-14 11:02:09 -070017 """
Flavio Castro49c218d2016-06-21 16:55:57 -070018 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import \
19 Testcaselib as run
20 if not hasattr( main, 'apps' ):
21 run.initTest( main )
Flavio Castrof7faa422016-06-14 11:02:09 -070022
Flavio Castro0a05b8d2016-06-16 17:26:51 -070023 description = "Bridging and Routing sanity test with 2x2 Leaf-spine "
24 main.case( description )
Flavio Castrof7faa422016-06-14 11:02:09 -070025
Flavio Castro0a05b8d2016-06-16 17:26:51 -070026 main.cfgName = '2x2'
27 main.numCtrls = 1
Flavio Castro49c218d2016-06-21 16:55:57 -070028 run.installOnos( main )
29 run.startMininet( main, 'cord_fabric.py' )
30 # pre-configured routing and bridging test
31 run.checkFlows( main, minFlowCount=116 )
32 run.pingAll( main, "CASE1" )
33 # TODO Dynamic config of hosts in subnet
34 # TODO Dynamic config of host not in subnet
35 # TODO Dynamic config of vlan xconnect
36 # TODO Vrouter integration
37 # TODO Mcast integration
38 run.cleanup( main )
Flavio Castrof7faa422016-06-14 11:02:09 -070039
Flavio Castrof7faa422016-06-14 11:02:09 -070040 def CASE2( self, main ):
41 """
Flavio Castro0a05b8d2016-06-16 17:26:51 -070042 Sets up 1-node Onos-cluster
43 Start 4x4 Leaf-Spine topology
44 Pingall
Flavio Castrof7faa422016-06-14 11:02:09 -070045 """
Flavio Castro49c218d2016-06-21 16:55:57 -070046 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import \
47 Testcaselib as run
48 if not hasattr( main, 'apps' ):
49 run.initTest( main )
Flavio Castro0a05b8d2016-06-16 17:26:51 -070050 description = "Bridging and Routing sanity test with 4x4 Leaf-spine "
51 main.case( description )
52 main.cfgName = '4x4'
53 main.numCtrls = 1
Flavio Castro49c218d2016-06-21 16:55:57 -070054 run.installOnos( main )
55 run.startMininet( main, 'cord_fabric.py', args="--leaf=4 --spine=4" )
56 # pre-configured routing and bridging test
57 run.checkFlows( main, minFlowCount=350 )
58 run.pingAll( main, 'CASE2' )
59 # TODO Dynamic config of hosts in subnet
60 # TODO Dynamic config of host not in subnet
61 # TODO Dynamic config of vlan xconnect
62 # TODO Vrouter integration
63 # TODO Mcast integration
64 run.cleanup( main )
Flavio Castrof7faa422016-06-14 11:02:09 -070065
66 def CASE3( self, main ):
67 """
Flavio Castro02b43632016-06-20 17:07:27 -070068 Sets up 1-node Onos-cluster
69 Start single switch topology
70 Pingall
71 """
Flavio Castro49c218d2016-06-21 16:55:57 -070072 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import \
73 Testcaselib as run
74 if not hasattr( main, 'apps' ):
75 run.initTest( main )
Flavio Castro02b43632016-06-20 17:07:27 -070076 description = "Bridging and Routing sanity test with single switch "
77 main.case( description )
78 main.cfgName = '0x1'
79 main.numCtrls = 1
Flavio Castro49c218d2016-06-21 16:55:57 -070080 run.installOnos( main )
81 run.startMininet( main, 'cord_fabric.py', args="--leaf=1 --spine=0" )
82 # pre-configured routing and bridging test
83 run.checkFlows( main, minFlowCount=15 )
84 run.pingAll( main, 'CASE3' )
85 # TODO Dynamic config of hosts in subnet
86 # TODO Dynamic config of host not in subnet
87 # TODO Dynamic config of vlan xconnect
88 # TODO Vrouter integration
89 # TODO Mcast integration
90 run.cleanup( main )
Flavio Castro02b43632016-06-20 17:07:27 -070091
92 def CASE4( self, main ):
93 """
Flavio Castro0a05b8d2016-06-16 17:26:51 -070094 Sets up 3-node Onos-cluster
95 Start 2x2 Leaf-Spine topology
Flavio Castrof7faa422016-06-14 11:02:09 -070096 Pingall
97 """
Flavio Castro49c218d2016-06-21 16:55:57 -070098 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import \
99 Testcaselib as run
100 if not hasattr( main, 'apps' ):
101 run.initTest( main )
Flavio Castro0a05b8d2016-06-16 17:26:51 -0700102 description = "Bridging and Routing sanity test with 2x2 Leaf-spine "
Flavio Castrof7faa422016-06-14 11:02:09 -0700103 main.case( description )
Flavio Castro0a05b8d2016-06-16 17:26:51 -0700104 main.cfgName = '2x2'
105 main.numCtrls = 3
Flavio Castro49c218d2016-06-21 16:55:57 -0700106 run.installOnos( main )
107 run.startMininet( main, 'cord_fabric.py' )
108 # pre-configured routing and bridging test
109 run.checkFlows( main, minFlowCount=116 )
110 run.pingAll( main, 'CASE4' )
111 # TODO Dynamic config of hosts in subnet
112 # TODO Dynamic config of host not in subnet
113 # TODO Dynamic config of vlan xconnect
114 # TODO Vrouter integration
115 # TODO Mcast integration
116 run.cleanup( main )
Flavio Castro02b43632016-06-20 17:07:27 -0700117
118 def CASE5( self, main ):
119 """
120 Sets up 3-node Onos-cluster
121 Start 4x4 Leaf-Spine topology
122 Pingall
123 """
Flavio Castro49c218d2016-06-21 16:55:57 -0700124 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import \
125 Testcaselib as run
126 if not hasattr( main, 'apps' ):
127 run.initTest( main )
Flavio Castro02b43632016-06-20 17:07:27 -0700128 description = "Bridging and Routing sanity test with 4x4 Leaf-spine "
129 main.case( description )
130 main.cfgName = '4x4'
131 main.numCtrls = 3
Flavio Castro49c218d2016-06-21 16:55:57 -0700132 run.installOnos( main )
133 run.startMininet( main, 'cord_fabric.py', args="--leaf=4 --spine=4" )
134 # pre-configured routing and bridging test
135 run.checkFlows( main, minFlowCount=350 )
136 run.pingAll( main, 'CASE5' )
137 # TODO Dynamic config of hosts in subnet
138 # TODO Dynamic config of host not in subnet
139 # TODO Dynamic config of vlan xconnect
140 # TODO Vrouter integration
141 # TODO Mcast integration
142 run.cleanup( main )
Flavio Castro02b43632016-06-20 17:07:27 -0700143
144 def CASE6( self, main ):
145 """
146 Sets up 3-node Onos-cluster
147 Start single switch topology
148 Pingall
149 """
Flavio Castro49c218d2016-06-21 16:55:57 -0700150 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import \
151 Testcaselib as run
152 if not hasattr( main, 'apps' ):
153 run.initTest( main )
Flavio Castro02b43632016-06-20 17:07:27 -0700154 description = "Bridging and Routing sanity test with single switch "
155 main.case( description )
156 main.cfgName = '0x1'
157 main.numCtrls = 3
Flavio Castro49c218d2016-06-21 16:55:57 -0700158 run.installOnos( main )
159 run.startMininet( main, 'cord_fabric.py', args="--leaf=1 --spine=0" )
160 # pre-configured routing and bridging test
161 run.checkFlows( main, minFlowCount=15 )
162 run.pingAll( main, 'CASE4' )
163 # TODO Dynamic config of hosts in subnet
164 # TODO Dynamic config of host not in subnet
165 # TODO Dynamic config of vlan xconnect
166 # TODO Vrouter integration
167 # TODO Mcast integration
168 run.cleanup( main )