blob: 631248b70a985225c8f93a77f352fb07e8a37f9a [file] [log] [blame]
Flavio Castro0a05b8d2016-06-16 17:26:51 -07001# This test should always succeed. it runs cases 1,2,3
2#CASE1: 2x2 Leaf-Spine topo and test IP connectivity
3#CASE2: 4x4 topo + IP connectivity test
Flavio Castro02b43632016-06-20 17:07:27 -07004#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:
10
11 def __init__( self ):
12 self.default = ''
13
14 def CASE1( self, main ):
Flavio Castrof7faa422016-06-14 11:02:09 -070015 """
Flavio Castro0a05b8d2016-06-16 17:26:51 -070016 Sets up 1-node Onos-cluster
17 Start 2x2 Leaf-Spine topology
18 Pingall
Flavio Castrof7faa422016-06-14 11:02:09 -070019 """
Flavio Castro0a05b8d2016-06-16 17:26:51 -070020 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import 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
29 run.installOnos(main)
30 run.startMininet(main, 'cord_fabric.py')
31 #pre-configured routing and bridging test
Flavio Castro02b43632016-06-20 17:07:27 -070032 run.checkFlows(main, minFlowCount=116)
Flavio Castro0a05b8d2016-06-16 17:26:51 -070033 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 Castro0a05b8d2016-06-16 17:26:51 -070047 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as run
48 if not hasattr(main,'apps'):
49 run.initTest(main)
50 description = "Bridging and Routing sanity test with 4x4 Leaf-spine "
51 main.case( description )
52 main.cfgName = '4x4'
53 main.numCtrls = 1
54 run.installOnos(main)
55 run.startMininet(main, 'cord_fabric.py', args="--leaf=4 --spine=4")
56 #pre-configured routing and bridging test
Flavio Castro02b43632016-06-20 17:07:27 -070057 run.checkFlows(main, minFlowCount=350)
Flavio Castro0a05b8d2016-06-16 17:26:51 -070058 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 """
72 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as run
73 if not hasattr(main,'apps'):
74 run.initTest(main)
75 description = "Bridging and Routing sanity test with single switch "
76 main.case( description )
77 main.cfgName = '0x1'
78 main.numCtrls = 1
79 run.installOnos(main)
80 run.startMininet(main, 'cord_fabric.py', args="--leaf=1 --spine=0")
81 #pre-configured routing and bridging test
82 run.checkFlows(main, minFlowCount=15)
83 run.pingAll(main, 'CASE3')
84 #TODO Dynamic config of hosts in subnet
85 #TODO Dynamic config of host not in subnet
86 #TODO Dynamic config of vlan xconnect
87 #TODO Vrouter integration
88 #TODO Mcast integration
89 run.cleanup(main)
90
91 def CASE4( self, main ):
92 """
Flavio Castro0a05b8d2016-06-16 17:26:51 -070093 Sets up 3-node Onos-cluster
94 Start 2x2 Leaf-Spine topology
Flavio Castrof7faa422016-06-14 11:02:09 -070095 Pingall
96 """
Flavio Castro0a05b8d2016-06-16 17:26:51 -070097 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as run
98 if not hasattr(main,'apps'):
99 run.initTest(main)
100 description = "Bridging and Routing sanity test with 2x2 Leaf-spine "
Flavio Castrof7faa422016-06-14 11:02:09 -0700101 main.case( description )
Flavio Castro0a05b8d2016-06-16 17:26:51 -0700102 main.cfgName = '2x2'
103 main.numCtrls = 3
104 run.installOnos(main)
105 run.startMininet(main, 'cord_fabric.py')
106 #pre-configured routing and bridging test
Flavio Castro02b43632016-06-20 17:07:27 -0700107 run.checkFlows(main, minFlowCount=116)
108 run.pingAll(main, 'CASE4')
Flavio Castro0a05b8d2016-06-16 17:26:51 -0700109 #TODO Dynamic config of hosts in subnet
110 #TODO Dynamic config of host not in subnet
111 #TODO Dynamic config of vlan xconnect
112 #TODO Vrouter integration
113 #TODO Mcast integration
114 run.cleanup(main)
Flavio Castro02b43632016-06-20 17:07:27 -0700115
116 def CASE5( self, main ):
117 """
118 Sets up 3-node Onos-cluster
119 Start 4x4 Leaf-Spine topology
120 Pingall
121 """
122 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as run
123 if not hasattr(main,'apps'):
124 run.initTest(main)
125 description = "Bridging and Routing sanity test with 4x4 Leaf-spine "
126 main.case( description )
127 main.cfgName = '4x4'
128 main.numCtrls = 3
129 run.installOnos(main)
130 run.startMininet(main, 'cord_fabric.py', args="--leaf=4 --spine=4")
131 #pre-configured routing and bridging test
132 run.checkFlows(main, minFlowCount=350)
133 run.pingAll(main, 'CASE5')
134 #TODO Dynamic config of hosts in subnet
135 #TODO Dynamic config of host not in subnet
136 #TODO Dynamic config of vlan xconnect
137 #TODO Vrouter integration
138 #TODO Mcast integration
139 run.cleanup(main)
140
141 def CASE6( self, main ):
142 """
143 Sets up 3-node Onos-cluster
144 Start single switch topology
145 Pingall
146 """
147 from tests.USECASE.SegmentRouting.dependencies.Testcaselib import Testcaselib as run
148 if not hasattr(main,'apps'):
149 run.initTest(main)
150 description = "Bridging and Routing sanity test with single switch "
151 main.case( description )
152 main.cfgName = '0x1'
153 main.numCtrls = 3
154 run.installOnos(main)
155 run.startMininet(main, 'cord_fabric.py', args="--leaf=1 --spine=0")
156 #pre-configured routing and bridging test
157 run.checkFlows(main, minFlowCount=15)
158 run.pingAll(main, 'CASE4')
159 #TODO Dynamic config of hosts in subnet
160 #TODO Dynamic config of host not in subnet
161 #TODO Dynamic config of vlan xconnect
162 #TODO Vrouter integration
163 #TODO Mcast integration
164 run.cleanup(main)