blob: 0557929d731e0a2463c24e18cf939e645380624f [file] [log] [blame]
adminbae64d82013-08-01 10:50:15 -07001
2class OnosPerf4nodes:
3
4 def __init__(self) :
5 self.default = ''
6
7 def CASE1(self,main) :
8 '''
9 First case is to simply check if ONOS, ZK, and Cassandra are all running properly.
10 If ONOS if not running properly, it will restart ONOS once before continuing.
11 It will then check if the ONOS has a view of all the switches and links as defined in the params file.
12 The test will only pass if ONOS is running properly, and has a full view of all topology elements.
13 '''
14 import time
admine0ae8202013-08-28 11:51:43 -070015 main.ONOS1.stop()
16 main.ONOS2.stop()
17 main.ONOS3.stop()
18 main.ONOS4.stop()
admincd0944e2013-09-30 12:07:19 -070019 main.Cassandra1.start()
20 main.Cassandra2.start()
21 main.Cassandra3.start()
22 main.Cassandra4.start()
23 time.sleep(20)
24 main.ONOS1.drop_keyspace()
25 main.ONOS1.start()
26 time.sleep(10)
27 main.ONOS2.start()
28 main.ONOS3.start()
29 main.ONOS4.start()
30 main.ONOS1.start_rest()
31 time.sleep(5)
32 test= main.ONOS1.rest_status()
33 if test == main.FALSE:
34 main.ONOS1.start_rest()
adminbae64d82013-08-01 10:50:15 -070035 main.ONOS1.get_version()
admincd0944e2013-09-30 12:07:19 -070036 main.log.report("Startup check Zookeeper1, Cassandra1, and ONOS1 connections")
37 main.case("Checking if the startup was clean...")
38 main.step("Testing startup Zookeeper")
adminbae64d82013-08-01 10:50:15 -070039 data = main.Zookeeper1.isup()
40 utilities.assert_equals(expect=main.TRUE,actual=data,onpass="Zookeeper is up!",onfail="Zookeeper is down...")
41 main.step("Testing startup Cassandra")
42 data = main.Cassandra1.isup()
admin530b4c92013-08-14 16:54:35 -070043 if data == main.FALSE:
44 main.Cassandra1.stop()
45 main.Cassandra2.stop()
46 main.Cassandra3.stop()
47 main.Cassandra4.stop()
48
49 time.sleep(5)
50
51 main.Cassandra1.start()
52 main.Cassandra2.start()
53 main.Cassandra3.start()
54 main.Cassandra4.start()
adminbae64d82013-08-01 10:50:15 -070055 utilities.assert_equals(expect=main.TRUE,actual=data,onpass="Cassandra is up!",onfail="Cassandra is down...")
adminbae64d82013-08-01 10:50:15 -070056 main.step("Testing startup ONOS")
57 data = main.ONOS1.isup()
admincd0944e2013-09-30 12:07:19 -070058 data = data and main.ONOS2.isup()
59 data = data and main.ONOS3.isup()
60 data = data and main.ONOS4.isup()
adminbae64d82013-08-01 10:50:15 -070061 if data == main.FALSE:
admincd0944e2013-09-30 12:07:19 -070062 main.log.report("Something is funny... restarting ONOS")
adminbae64d82013-08-01 10:50:15 -070063 main.ONOS1.stop()
admincd0944e2013-09-30 12:07:19 -070064 main.ONOS2.stop()
65 main.ONOS3.stop()
66 main.ONOS4.stop()
adminbae64d82013-08-01 10:50:15 -070067 time.sleep(5)
admincd0944e2013-09-30 12:07:19 -070068 main.ONOS1.start()
69 time.sleep(10)
70 main.ONOS2.start()
71 main.ONOS3.start()
72 main.ONOS4.start()
adminbae64d82013-08-01 10:50:15 -070073 data = main.ONOS1.isup()
admincd0944e2013-09-30 12:07:19 -070074 utilities.assert_equals(expect=main.TRUE,actual=data,onpass="ONOS is up and running!",onfail="ONOS didn't start...")
adminbae64d82013-08-01 10:50:15 -070075
76 def CASE2(self,main) :
77 '''
78 Makes sure that the HW links are all up
79 Verifies that at least one mininet host exists.
80 Proves that there is actually a mininet that we are working with
81 '''
82 import time
83 main.step("Checking if MN switches exist")
84 main.log.report("Check if MN switches exist")
admin530b4c92013-08-14 16:54:35 -070085 #result = main.ONOS1.check_status_report(main.params['RestIP'],main.params['NR_Switches'],main.params['NR_Links'])
86 #for i in range(2):
87 # if result == main.FALSE:
88 # time.sleep(5)
89 # result = main.ONOS1.check_status_report(main.params['RestIP'],main.params['NR_Switches'],main.params['NR_Links'])
90 # else:
91 # break
92 #main.step("Verifying the result")
93 #utilities.assert_equals(expect=main.TRUE,actual=result,onpass="MN switches exist",onfail="MN is missing switches and or links...")
adminbae64d82013-08-01 10:50:15 -070094
admin530b4c92013-08-14 16:54:35 -070095 main.step("assigning ONOS controllers to switches")
96 for i in range(25):
97 if i < 3:
98 j=i+1
99 main.Mininet1.assign_sw_controller(sw=str(j),ip1=main.params['CTRL']['ip1'],port1=main.params['CTRL']['port1'])
100 time.sleep(1)
Jon Hallf89c8552014-04-02 13:14:06 -0700101 main.Mininet1.assign_sw_controller(sw=str(j),count=4,ip1=main.params['CTRL']['ip1'],port1=main.params['CTRL']['port1'],ip2=main.params['CTRL']['ip2'],port2=main.params['CTRL']['port2'],ip3=main.params['CTRL']['ip3'],port3=main.params['CTRL']['port3'],ip4=main.params['CTRL']['ip4'],port4=main.params['CTRL']['port4'])
admin530b4c92013-08-14 16:54:35 -0700102 elif i >= 3 and i < 5:
103 j=i+1
104 main.Mininet1.assign_sw_controller(sw=str(j),ip1=main.params['CTRL']['ip2'],port1=main.params['CTRL']['port2'])
105 time.sleep(1)
Jon Hallf89c8552014-04-02 13:14:06 -0700106 main.Mininet1.assign_sw_controller(sw=str(j),count=4,ip1=main.params['CTRL']['ip1'],port1=main.params['CTRL']['port1'],ip2=main.params['CTRL']['ip2'],port2=main.params['CTRL']['port2'],ip3=main.params['CTRL']['ip3'],port3=main.params['CTRL']['port3'],ip4=main.params['CTRL']['ip4'],port4=main.params['CTRL']['port4'])
admin530b4c92013-08-14 16:54:35 -0700107 elif i >= 5 and i < 15:
108 j=i+1
109 main.Mininet1.assign_sw_controller(sw=str(j),ip1=main.params['CTRL']['ip3'],port1=main.params['CTRL']['port3'])
110 time.sleep(1)
Jon Hallf89c8552014-04-02 13:14:06 -0700111 main.Mininet1.assign_sw_controller(sw=str(j),count=4,ip1=main.params['CTRL']['ip1'],port1=main.params['CTRL']['port1'],ip2=main.params['CTRL']['ip2'],port2=main.params['CTRL']['port2'],ip3=main.params['CTRL']['ip3'],port3=main.params['CTRL']['port3'],ip4=main.params['CTRL']['ip4'],port4=main.params['CTRL']['port4'])
admin530b4c92013-08-14 16:54:35 -0700112 else:
113 j=i+16
114 main.Mininet1.assign_sw_controller(sw=str(j),ip1=main.params['CTRL']['ip4'],port1=main.params['CTRL']['port4'])
115 time.sleep(1)
Jon Hallf89c8552014-04-02 13:14:06 -0700116 main.Mininet1.assign_sw_controller(sw=str(j),count=4,ip1=main.params['CTRL']['ip1'],port1=main.params['CTRL']['port1'],ip2=main.params['CTRL']['ip2'],port2=main.params['CTRL']['port2'],ip3=main.params['CTRL']['ip3'],port3=main.params['CTRL']['port3'],ip4=main.params['CTRL']['ip4'],port4=main.params['CTRL']['port4'])
admin530b4c92013-08-14 16:54:35 -0700117 main.Mininet1.get_sw_controller("s1")
admincd0944e2013-09-30 12:07:19 -0700118 time.sleep(5)
adminbae64d82013-08-01 10:50:15 -0700119
120 def CASE3(self,main) :
121 '''
admin530b4c92013-08-14 16:54:35 -0700122 Verifies that ONOS sees the right topology...
123 '''
124 import time
125 main.log.report("checking if ONOS sees the right topo...")
126 main.case("TOPO check")
127 main.step("calling rest calls")
admincd0944e2013-09-30 12:07:19 -0700128 for i in range(4):
admin530b4c92013-08-14 16:54:35 -0700129 result = main.ONOS1.check_status(main.params['RestIP'],main.params['NR_Switches'],main.params['NR_Links'])
130 time.sleep(5)
131 if result == 1:
132 break
133 if result == 0:
134 main.ONOS1.start()
135 main.ONOS2.start()
136 main.ONOS3.start()
137 main.ONOS4.start()
admin07529932013-11-22 14:58:28 -0800138 time.sleep(45)
admincd0944e2013-09-30 12:07:19 -0700139 for i in range(4):
admin530b4c92013-08-14 16:54:35 -0700140 result = main.ONOS1.check_status(main.params['RestIP'],main.params['NR_Switches'],main.params['NR_Links'])
141 time.sleep(5)
142 if result == 1:
143 break
144 utilities.assert_equals(expect=1,actual=result)
145
146 def CASE4(self,main) :
147 '''
adminbae64d82013-08-01 10:50:15 -0700148 This Test case:
149 - Clears out any leftover flows
150 - Adds new flows into ONOS
151 - Checks flows up to 10 times waiting for each flow to be caluculated and no "NOT" statements inte get_flow
152 '''
153 import time
154 main.log.report("Deleting and adding flows")
155 main.case("Taking care of these flows!")
156 main.step("Cleaning out any leftover flows...")
157 main.log.info("deleting...")
158 main.ONOS1.delete_flow("all")
159 main.log.info("adding...")
160 t1 = time.time()
161 main.ONOS1.add_flow(main.params['FLOWDEF'])
162 main.log.info("Checking...")
163 for i in range(15):
164 result = main.ONOS1.check_flow()
165 if result == main.TRUE:
166 t2 = time.time()
admin530b4c92013-08-14 16:54:35 -0700167 main.log.info( 'Adding flows took %0.3f s' % (t2-t1))
adminbae64d82013-08-01 10:50:15 -0700168 break
169 time.sleep(5)
170 main.log.info("Checking Flows again...")
admin530b4c92013-08-14 16:54:35 -0700171
172 strtTime = time.time()
173 count = 1
174 i = 6
175 while i < 16 :
176 main.log.info("\n\t\t\t\th"+str(i)+" IS PINGING h"+str(i+25) )
177 ping = main.Mininet1.pingHost(src="h"+str(i),target="h"+str(i+25))
178 if ping == main.FALSE and count < 3:
179 count = count + 1
180 i = 6
181 main.log.info("Ping failed, making attempt number "+str(count)+" in 10 seconds")
182 time.sleep(10)
183 elif ping == main.FALSE and count ==3:
184 main.log.error("Ping test failed")
185 i = 17
186 result = main.FALSE
187 elif ping == main.TRUE:
188 i = i + 1
189 result = main.TRUE
190 endTime = time.time()
191 if result == main.TRUE:
192 main.log.info("\tTime to complete ping test: "+str(round(endTime-strtTime,2))+" seconds")
193 else:
194 main.log.info("\tPING TEST FAIL")
195
adminbae64d82013-08-01 10:50:15 -0700196 utilities.assert_equals(expect=main.TRUE,actual=result,onpass="flows are good",onfail="FLOWS not correct")
197
admincd0944e2013-09-30 12:07:19 -0700198 main.log.report("checking if ONOS sees the right topo...")
199 main.case("TOPO check")
200 main.step("calling rest calls")
201 for i in range(3):
202 result = main.ONOS1.check_status(main.params['RestIP'],main.params['NR_Switches'],main.params['NR_Links'])
203 time.sleep(5)
204 if result == 1:
205 break
adminbae64d82013-08-01 10:50:15 -0700206
admin530b4c92013-08-14 16:54:35 -0700207 def CASE5(self,main) :
adminbae64d82013-08-01 10:50:15 -0700208 '''
209 Tests a single ping
210 '''
211 main.log.report("Testing a single ping")
212 main.case("Testing ping...")
213 ping_result = main.Mininet4.pingHost(src=main.params['PING']['source1'],target=main.params['PING']['target1'])
214 utilities.assert_equals(expect=main.TRUE,actual=ping_result,onpass="NO PACKET LOSS, HOST IS REACHABLE",onfail="PACKET LOST, HOST IS NOT REACHABLE")
215
216
admin530b4c92013-08-14 16:54:35 -0700217 def CASE6(self,main) :
adminbae64d82013-08-01 10:50:15 -0700218 '''
219 Starts continuous pings on the Mininet nodes
220 '''
admin530b4c92013-08-14 16:54:35 -0700221 main.log.report("Starting continuous ping, then toggle a single link in the center triangle")
adminbae64d82013-08-01 10:50:15 -0700222 import time
admin530b4c92013-08-14 16:54:35 -0700223 import os
adminbae64d82013-08-01 10:50:15 -0700224 main.case("Starting long ping... ")
225 main.Mininet4.pingLong(src=main.params['PING']['source1'],target=main.params['PING']['target1'])
226 main.Mininet4.pingLong(src=main.params['PING']['source2'],target=main.params['PING']['target2'])
227 main.Mininet4.pingLong(src=main.params['PING']['source3'],target=main.params['PING']['target3'])
228 main.Mininet4.pingLong(src=main.params['PING']['source4'],target=main.params['PING']['target4'])
229 main.Mininet4.pingLong(src=main.params['PING']['source5'],target=main.params['PING']['target5'])
230 main.Mininet4.pingLong(src=main.params['PING']['source6'],target=main.params['PING']['target6'])
231 main.Mininet4.pingLong(src=main.params['PING']['source7'],target=main.params['PING']['target7'])
232 main.Mininet4.pingLong(src=main.params['PING']['source8'],target=main.params['PING']['target8'])
233 main.Mininet4.pingLong(src=main.params['PING']['source9'],target=main.params['PING']['target9'])
234 main.Mininet4.pingLong(src=main.params['PING']['source10'],target=main.params['PING']['target10'])
admin530b4c92013-08-14 16:54:35 -0700235 main.step("Check that the pings are going")
adminbae64d82013-08-01 10:50:15 -0700236 result = main.Mininet4.pingstatus(src=main.params['PING']['source1'])
237 result = result & main.Mininet4.pingstatus(src=main.params['PING']['source2'])
238 result = result & main.Mininet4.pingstatus(src=main.params['PING']['source3'])
239 result = result & main.Mininet4.pingstatus(src=main.params['PING']['source4'])
240 result = result & main.Mininet4.pingstatus(src=main.params['PING']['source5'])
241 result = result & main.Mininet4.pingstatus(src=main.params['PING']['source6'])
242 result = result & main.Mininet4.pingstatus(src=main.params['PING']['source7'])
243 result = result & main.Mininet4.pingstatus(src=main.params['PING']['source8'])
244 result = result & main.Mininet4.pingstatus(src=main.params['PING']['source9'])
245 result = result & main.Mininet4.pingstatus(src=main.params['PING']['source10'])
admin530b4c92013-08-14 16:54:35 -0700246 main.step( "Link down number of iterations: " + main.params['Iterations'] )
adminbae64d82013-08-01 10:50:15 -0700247 for i in range(int(main.params['Iterations'])):
admin530b4c92013-08-14 16:54:35 -0700248 main.log.info("Bringing Link down... ")
249 main.Mininet1.link(END1="s1",END2="s2",OPTION="down")
adminbae64d82013-08-01 10:50:15 -0700250 main.log.info( "Waiting " + main.params['WaitTime'] + " seconds.... " )
251 time.sleep( int(main.params['WaitTime']) )
252 main.log.info("Bringing Link up... ")
admin530b4c92013-08-14 16:54:35 -0700253 main.Mininet1.link(END1="s1",END2="s2",OPTION="up")
adminbae64d82013-08-01 10:50:15 -0700254 main.log.info( "Waiting " + main.params['WaitTime'] + " seconds.... " )
255 time.sleep( int(main.params['WaitTime']) )
256 main.case("Killing remote ping processes ")
admin530b4c92013-08-14 16:54:35 -0700257 result = result & main.Mininet4.pingKill()
adminbae64d82013-08-01 10:50:15 -0700258 utilities.assert_equals(expect=main.TRUE,actual=result)
259
260
261 def CASE7(self,main) :
262 '''
263 Processes all of the ping data and outputs raw data and an overall average
264 '''
265 import os
266 import time
admine0ae8202013-08-28 11:51:43 -0700267 main.log.report("Process ping data (Fail is time is >20 seconds)")
adminbae64d82013-08-01 10:50:15 -0700268 main.case("Processing Ping data")
269 time.sleep(3)
admin530b4c92013-08-14 16:54:35 -0700270 #result=os.popen("/home/admin/tools/shell.sh " + main.params['Iterations']).read()
271 try:
adminee3fc6f2013-12-17 15:49:10 -0800272 result=os.popen("/home/admin/ONLabTest/TestON/scripts/get_reroute_times.py").read()
admin530b4c92013-08-14 16:54:35 -0700273 average=result.split(":")[1]
274 main.log.info( "Reroute times are... " )
275 main.log.report( result + " seconds" )
276 try:
277 if float(average) < float(main.params['TargetTime']) :
278 test=main.TRUE
279 else:
280 test=main.FALSE
281 except ValueError:
282 main.log.error("Data is corrupted")
283 test=main.FALSE
284 except:
285 main.log.report("No data")
286 test=main.FALSE
287 utilities.assert_equals(expect=main.TRUE,actual=test,onpass="Average is less then the target time!",onfail="Average is worse then target time... ")
288
289 def CASE8(self,main) :
290 '''
291 Starts continuous pings on the Mininet nodes
292 '''
293 main.log.report("Start continuous pings, then toggle multiple links in center triangle")
294 import time
295 import os
admine0ae8202013-08-28 11:51:43 -0700296 time.sleep(20)
admin530b4c92013-08-14 16:54:35 -0700297 main.case("Starting long ping... ")
298 main.Mininet4.pingLong(src=main.params['PING']['source1'],target=main.params['PING']['target1'])
299 main.Mininet4.pingLong(src=main.params['PING']['source2'],target=main.params['PING']['target2'])
300 main.Mininet4.pingLong(src=main.params['PING']['source3'],target=main.params['PING']['target3'])
301 main.Mininet4.pingLong(src=main.params['PING']['source4'],target=main.params['PING']['target4'])
302 main.Mininet4.pingLong(src=main.params['PING']['source5'],target=main.params['PING']['target5'])
303 main.Mininet4.pingLong(src=main.params['PING']['source6'],target=main.params['PING']['target6'])
304 main.Mininet4.pingLong(src=main.params['PING']['source7'],target=main.params['PING']['target7'])
305 main.Mininet4.pingLong(src=main.params['PING']['source8'],target=main.params['PING']['target8'])
306 main.Mininet4.pingLong(src=main.params['PING']['source9'],target=main.params['PING']['target9'])
307 main.Mininet4.pingLong(src=main.params['PING']['source10'],target=main.params['PING']['target10'])
308 main.step("Check that the pings are going")
309 result = main.Mininet4.pingstatus(src=main.params['PING']['source1'])
310 result = result & main.Mininet4.pingstatus(src=main.params['PING']['source2'])
311 result = result & main.Mininet4.pingstatus(src=main.params['PING']['source3'])
312 result = result & main.Mininet4.pingstatus(src=main.params['PING']['source4'])
313 result = result & main.Mininet4.pingstatus(src=main.params['PING']['source5'])
314 result = result & main.Mininet4.pingstatus(src=main.params['PING']['source6'])
315 result = result & main.Mininet4.pingstatus(src=main.params['PING']['source7'])
316 result = result & main.Mininet4.pingstatus(src=main.params['PING']['source8'])
317 result = result & main.Mininet4.pingstatus(src=main.params['PING']['source9'])
318 result = result & main.Mininet4.pingstatus(src=main.params['PING']['source10'])
319 main.step( "Making topo change while flows are rerouting")
320 main.step( "Link down number of iterations: " + main.params['Iterations'] )
321 for i in range(int(main.params['Iterations'])):
322 main.log.info("s1-s2 link down")
323 main.Mininet1.link(END1="s1",END2="s2",OPTION="down")
324 main.Mininet1.link(END1="s1",END2="s3",OPTION="up")
325 main.Mininet1.link(END1="s2",END2="s3",OPTION="up")
326
327 time.sleep(5)
328
329 main.log.info("s1-s2 link up | s1-s3 link down | s2-s3 link down")
330 main.Mininet1.link(END1="s1",END2="s2",OPTION="up")
331 main.Mininet1.link(END1="s1",END2="s3",OPTION="down")
332 main.Mininet1.link(END1="s2",END2="s3",OPTION="down")
333
334 main.log.info( "Waiting " + main.params['WaitTime'] + " seconds.... " )
admin07529932013-11-22 14:58:28 -0800335 time.sleep( int(main.params['WaitTime']) + 60 )
admin530b4c92013-08-14 16:54:35 -0700336
337 main.case("Killing remote ping processes ")
338 result = result & main.Mininet4.pingKill()
339 utilities.assert_equals(expect=main.TRUE,actual=result)
admin530b4c92013-08-14 16:54:35 -0700340 main.log.info("Make sure all links in triangle are up")
341 main.Mininet1.link(END1="s1",END2="s2",OPTION="up")
342 main.Mininet1.link(END1="s1",END2="s3",OPTION="up")
343 main.Mininet1.link(END1="s2",END2="s3",OPTION="up")
admine0ae8202013-08-28 11:51:43 -0700344
345 def CASE9(self,main) :
346 '''
347 Starts continuous pings on the Mininet nodes
348 '''
admin530b4c92013-08-14 16:54:35 -0700349 main.log.report("Start continuous pings, then toggle one link in center triangle and start/stop 1 ONOS node")
350 import time
351 import os
352
admine0ae8202013-08-28 11:51:43 -0700353 time.sleep(20)
admin530b4c92013-08-14 16:54:35 -0700354 main.case("Starting long ping... ")
355 main.Mininet4.pingLong(src=main.params['PING']['source1'],target=main.params['PING']['target1'])
356 main.Mininet4.pingLong(src=main.params['PING']['source2'],target=main.params['PING']['target2'])
357 main.Mininet4.pingLong(src=main.params['PING']['source3'],target=main.params['PING']['target3'])
358 main.Mininet4.pingLong(src=main.params['PING']['source4'],target=main.params['PING']['target4'])
359 main.Mininet4.pingLong(src=main.params['PING']['source5'],target=main.params['PING']['target5'])
360 main.Mininet4.pingLong(src=main.params['PING']['source6'],target=main.params['PING']['target6'])
361 main.Mininet4.pingLong(src=main.params['PING']['source7'],target=main.params['PING']['target7'])
362 main.Mininet4.pingLong(src=main.params['PING']['source8'],target=main.params['PING']['target8'])
363 main.Mininet4.pingLong(src=main.params['PING']['source9'],target=main.params['PING']['target9'])
364 main.Mininet4.pingLong(src=main.params['PING']['source10'],target=main.params['PING']['target10'])
365 main.step("Check that the pings are going")
366 result = main.Mininet4.pingstatus(src=main.params['PING']['source1'])
367 result = result & main.Mininet4.pingstatus(src=main.params['PING']['source2'])
368 result = result & main.Mininet4.pingstatus(src=main.params['PING']['source3'])
369 result = result & main.Mininet4.pingstatus(src=main.params['PING']['source4'])
370 result = result & main.Mininet4.pingstatus(src=main.params['PING']['source5'])
371 result = result & main.Mininet4.pingstatus(src=main.params['PING']['source6'])
372 result = result & main.Mininet4.pingstatus(src=main.params['PING']['source7'])
373 result = result & main.Mininet4.pingstatus(src=main.params['PING']['source8'])
374 result = result & main.Mininet4.pingstatus(src=main.params['PING']['source9'])
375 result = result & main.Mininet4.pingstatus(src=main.params['PING']['source10'])
376 main.step( "Making topo change while flows are rerouting")
377 main.step( "Link down number of iterations: " + main.params['Iterations'] )
378 for i in range(int(main.params['Iterations'])):
379 main.log.info("s1-s2 link down | Onos 1 down")
380 main.Mininet1.link(END1="s1",END2="s2",OPTION="down")
381 if i % 4 == 0:
382 main.ONOS1.stop()
383 elif i % 4 == 1:
384 main.ONOS2.stop()
385 elif i % 4 == 2:
386 main.ONOS3.stop()
387 else:
388 main.ONOS4.stop()
389
390 time.sleep(5)
391
392 main.log.info("s1-s2 link up | Onos 1 back up")
393 main.Mininet1.link(END1="s1",END2="s2",OPTION="up")
394 if i % 4 == 0:
395 main.ONOS1.start()
396 main.ONOS1.isup()
397 elif i % 4 == 1:
398 main.ONOS2.start()
399 main.ONOS2.isup()
400 elif i % 4 == 2:
401 main.ONOS3.start()
402 main.ONOS3.isup()
403 else:
404 main.ONOS4.start()
405 main.ONOS4.isup()
406
407 main.log.info( "Waiting " + main.params['WaitTime'] + " seconds.... " )
408 time.sleep( int(main.params['WaitTime']) )
409
410 main.case("Killing remote ping processes ")
411 result = result & main.Mininet4.pingKill()
412 utilities.assert_equals(expect=main.TRUE,actual=result)
413