blob: adc86c9dca47b819122ff6b9c5d186a2c4a4a693 [file] [log] [blame]
suibin zhangd0f09b32016-03-29 00:57:57 -07001class COMPflow:
2
3 def __init__( self ):
4 self.default = ''
5
6 def CASE1( self, main ):
7 import time
8 import os
9 import imp
10
11 """
12 - Construct tests variables
13 - GIT ( optional )
14 - Checkout ONOS master branch
15 - Pull latest ONOS code
16 - Building ONOS ( optional )
17 - Install ONOS package
18 - Build ONOS package
19 """
20
21 main.case( "Constructing test variables and building ONOS package" )
22 main.step( "Constructing test variables" )
23 stepResult = main.FALSE
24
25 # Test variables
26 main.testOnDirectory = os.path.dirname( os.getcwd ( ) )
27 main.cellName = main.params[ 'ENV' ][ 'cellName' ]
28 main.apps = main.params[ 'ENV' ][ 'cellApps' ]
29 gitBranch = main.params[ 'GIT' ][ 'branch' ]
30 gitPull = main.params[ 'GIT' ][ 'pull' ]
31 main.ONOSport = main.params[ 'CTRL' ][ 'port' ]
32 main.maxNodes = int( main.params[ 'SCALE' ][ 'max' ] )
33 main.startUpSleep = int( main.params[ 'SLEEP' ][ 'startup' ] )
34 main.startMNSleep = int( main.params[ 'SLEEP' ][ 'startMN' ] )
35 main.addFlowSleep = int( main.params[ 'SLEEP' ][ 'addFlow' ] )
36 main.delFlowSleep = int( main.params[ 'SLEEP' ][ 'delFlow' ] )
37 main.debug = main.params['DEBUG']
38 #main.swDPID = main.params[ 'TEST' ][ 'swDPID' ]
39 main.cellData = {} # for creating cell file
40 main.CLIs = []
41 main.ONOSip = []
42
43 main.debug = True if "on" in main.debug else False
44
45 main.ONOSip = main.ONOSbench.getOnosIps()
46
47 # Assigning ONOS cli handles to a list
48 for i in range( 1, main.maxNodes + 1 ):
49 main.CLIs.append( getattr( main, 'ONOScli' + str( i ) ) )
50
51
52 if main.CLIs:
53 stepResult = main.TRUE
54 else:
55 main.log.error( "Did not properly created list of ONOS CLI handle" )
56 stepResult = main.FALSE
57
58 utilities.assert_equals( expect=main.TRUE,
59 actual=stepResult,
60 onpass="Successfully construct " +
61 "test variables ",
62 onfail="Failed to construct test variables" )
63
64 if gitPull == 'True':
65 main.step( "Building ONOS in " + gitBranch + " branch" )
66 onosBuildResult = main.startUp.onosBuild( main, gitBranch )
67 stepResult = onosBuildResult
68 utilities.assert_equals( expect=main.TRUE,
69 actual=stepResult,
70 onpass="Successfully compiled " +
71 "latest ONOS",
72 onfail="Failed to compile " +
73 "latest ONOS" )
74 else:
75 main.log.warn( "Did not pull new code so skipping mvn " +
76 "clean install" )
77
78 def CASE2( self, main ):
79 """
80 - Set up cell
81 - Create cell file
82 - Set cell file
83 - Verify cell file
84 - Kill ONOS process
85 - Uninstall ONOS cluster
86 - Verify ONOS start up
87 - Install ONOS cluster
88 - Connect to cli
89 """
90
91 main.numCtrls = int( main.maxNodes )
92
93 main.case( "Starting up " + str( main.numCtrls ) +
94 " node(s) ONOS cluster" )
95
96 #kill off all onos processes
97 main.log.info( "Safety check, killing all ONOS processes" +
98 " before initiating environment setup" )
99
suibin zhangd0f09b32016-03-29 00:57:57 -0700100
101 print "NODE COUNT = ", main.numCtrls
102
103 tempOnosIp = []
104 for i in range( main.numCtrls ):
105 tempOnosIp.append( main.ONOSip[i] )
106
suibin zhang5c735ca2016-03-30 16:01:06 -0700107 main.log.info("Apps in cell file: " + main.apps)
suibin zhangd0f09b32016-03-29 00:57:57 -0700108 main.ONOSbench.createCellFile( main.ONOSbench.ip_address, "temp", main.Mininet1.ip_address, main.apps, tempOnosIp )
109
110 main.step( "Apply cell to environment" )
111 cellResult = main.ONOSbench.setCell( "temp" )
112 verifyResult = main.ONOSbench.verifyCell()
113 stepResult = cellResult and verifyResult
114 utilities.assert_equals( expect=main.TRUE,
115 actual=stepResult,
116 onpass="Successfully applied cell to " + \
117 "environment",
118 onfail="Failed to apply cell to environment " )
119
120 main.step( "Creating ONOS package" )
suibin zhang5c735ca2016-03-30 16:01:06 -0700121 packageResult = main.ONOSbench.onosPackage(opTimeout=240)
suibin zhangd0f09b32016-03-29 00:57:57 -0700122 stepResult = packageResult
123 utilities.assert_equals( expect=main.TRUE,
124 actual=stepResult,
125 onpass="Successfully created ONOS package",
126 onfail="Failed to create ONOS package" )
127
128 time.sleep( main.startUpSleep )
129 main.step( "Uninstalling ONOS package" )
130 onosUninstallResult = main.TRUE
131 for i in range( main.numCtrls ):
132 onosUninstallResult = onosUninstallResult and \
133 main.ONOSbench.onosUninstall( nodeIp=main.ONOSip[ i ] )
134 stepResult = onosUninstallResult
135 utilities.assert_equals( expect=main.TRUE,
136 actual=stepResult,
137 onpass="Successfully uninstalled ONOS package",
138 onfail="Failed to uninstall ONOS package" )
139
140 time.sleep( main.startUpSleep )
141 main.step( "Installing ONOS package" )
142 onosInstallResult = main.TRUE
143 for i in range( main.numCtrls ):
144 onosInstallResult = onosInstallResult and \
145 main.ONOSbench.onosInstall( node=main.ONOSip[ i ] )
146 stepResult = onosInstallResult
147 utilities.assert_equals( expect=main.TRUE,
148 actual=stepResult,
149 onpass="Successfully installed ONOS package",
150 onfail="Failed to install ONOS package" )
151
152 time.sleep( main.startUpSleep )
153 main.step( "Starting ONOS service" )
154 stopResult = main.TRUE
155 startResult = main.TRUE
156 onosIsUp = main.TRUE
157
158 for i in range( main.numCtrls ):
159 onosIsUp = onosIsUp and main.ONOSbench.isup( main.ONOSip[ i ] )
160 if onosIsUp == main.TRUE:
161 main.log.report( "ONOS instance is up and ready" )
162 else:
163 main.log.report( "ONOS instance may not be up, stop and " +
164 "start ONOS again " )
165 for i in range( main.numCtrls ):
166 stopResult = stopResult and \
167 main.ONOSbench.onosStop( main.ONOSip[ i ] )
168 for i in range( main.numCtrls ):
169 startResult = startResult and \
170 main.ONOSbench.onosStart( main.ONOSip[ i ] )
171 stepResult = onosIsUp and stopResult and startResult
172 utilities.assert_equals( expect=main.TRUE,
173 actual=stepResult,
174 onpass="ONOS service is ready",
175 onfail="ONOS service did not start properly" )
176
suibin zhangd0f09b32016-03-29 00:57:57 -0700177
178 def CASE10( self, main ):
179 '''
180 Start Mininet
181 '''
suibin zhang5c735ca2016-03-30 16:01:06 -0700182 import time
suibin zhangd0f09b32016-03-29 00:57:57 -0700183
184 main.numSw = int(main.params['CASE10']['numSw'])
suibin zhang5c735ca2016-03-30 16:01:06 -0700185 main.case( "Enable openflow-base on onos and start Mininet." )
suibin zhangd0f09b32016-03-29 00:57:57 -0700186 main.caseExplanation = "Start mininet with custom topology and compare topology " +\
187 "elements between Mininet and ONOS"
188
suibin zhang5c735ca2016-03-30 16:01:06 -0700189 main.step("Activate openflow-base App")
190 stepResult = main.ONOSbench.onosCli( ONOSIp = main.ONOSip[0], cmdstr = "app activate org.onosproject.openflow-base" )
191 time.sleep(10)
192 print stepResult
193 time.sleep(5)
194
suibin zhangd0f09b32016-03-29 00:57:57 -0700195 main.step( "Setup Mininet Linear Topology with " + str(main.numSw) + " switches" )
196 stepResult = main.Mininet1.startNet( args = main.params['CASE10']['mnArgs'] )
197
198 utilities.assert_equals( expect=main.TRUE,
199 actual=stepResult,
200 onpass="Successfully loaded topology",
201 onfail="Failed to load topology" )
202
suibin zhang5c735ca2016-03-30 16:01:06 -0700203 time.sleep(int(main.params['SLEEP']['startMN']))
suibin zhangd0f09b32016-03-29 00:57:57 -0700204 main.step( "Assign switches to controller" )
205 for i in range(1, main.numSw + 1):
206 main.Mininet1.assignSwController( "s" + str(i), main.ONOSip[0] )
207
208 utilities.assert_equals( expect=main.TRUE,
209 actual=stepResult,
210 onpass="Successfully assigned switch to controller",
211 onfail="Failed to assign switch to controller" )
212
suibin zhang5c735ca2016-03-30 16:01:06 -0700213 main.deviceIdPrefix = "of:"
214
suibin zhangd0f09b32016-03-29 00:57:57 -0700215 time.sleep( main.startMNSleep )
216
suibin zhang5c735ca2016-03-30 16:01:06 -0700217 def CASE11( self, main ):
218 '''
219 Start Null Provider
220 '''
221 import time
222
223 main.numSw = int(main.params['CASE11']['numSw'])
224
225 main.case("Activate Null Provider App")
226 stepResult = main.ONOSbench.onosCli( ONOSIp = main.ONOSip[0], cmdstr = "app activate org.onosproject.null" )
227 time.sleep(10)
228 print stepResult
229 time.sleep(5)
230
231 main.case( "Setup Null Provider for linear Topology" )
232 main.step( "Setup Null Provider Linear Topology with " + str(main.numSw) + " devices." )
233 main.ONOSbench.onosCfgSet( main.ONOSip[0], "org.onosproject.provider.nil.NullProviders", "deviceCount " + str(main.numSw))
234 main.ONOSbench.onosCfgSet( main.ONOSip[0], "org.onosproject.provider.nil.NullProviders", "topoShape " + main.params['CASE11']['nullTopo'] )
235 main.ONOSbench.onosCfgSet( main.ONOSip[0], "org.onosproject.provider.nil.NullProviders", "enabled " + main.params['CASE11']['nullStart'])
236 time.sleep(5)
237
238 main.log.info("Check to make sure null providers are configured correctly.")
239 main.ONOSbench.handle.sendline("onos $OC1 summary")
240 stepResult = main.ONOSbench.handle.expect(":~")
241 main.log.info("ONOS Summary: " + main.ONOSbench.handle.before)
242
243 main.deviceIdPrefix = "null:"
244
245 time.sleep( main.startMNSleep )
suibin zhangd0f09b32016-03-29 00:57:57 -0700246
247
248
249 def CASE1000( self, main ):
250 '''
251 create JSON object with batched flows
252 '''
253 import numpy
254 import time
suibin zhang570cb452016-03-29 19:03:15 -0700255 from pprint import pprint
suibin zhangd0f09b32016-03-29 00:57:57 -0700256
257 main.case( "Create a json object for the batched flows" )
258
suibin zhanga5875da2016-04-02 20:54:50 -0700259 main.step( "Parse batch creation information" )
suibin zhanga82fe3f2016-03-29 11:26:21 -0700260 main.batchSize = int(main.params['CASE1000']['batchSize'])
261 main.log.info("Number of flows in a batch is:" + str(main.batchSize))
suibin zhangd0f09b32016-03-29 00:57:57 -0700262
263 main.flowJsonBatchList = []
264 postTimes = []
suibin zhanga82fe3f2016-03-29 11:26:21 -0700265 startSw = 1
suibin zhangd0f09b32016-03-29 00:57:57 -0700266
267 main.step("Creating a full list of batches")
268 for index in range(1, int(main.params['CASE1000']['batches']) + 1):
suibin zhanga82fe3f2016-03-29 11:26:21 -0700269 if startSw <= main.numSw:
suibin zhangff4abfe2016-03-29 11:52:08 -0700270 ind = startSw
271 else:
272 startSw = 1
273 ind = startSw
274
275 main.log.info("Creating batch: " + str(index))
276 flowJsonBatch = main.ONOSrest.createFlowBatch( numSw = main.numSw,
277 swIndex = ind,
suibin zhanga82fe3f2016-03-29 11:26:21 -0700278 batchSize = main.batchSize,
suibin zhangd0f09b32016-03-29 00:57:57 -0700279 batchIndex = index,
suibin zhang5c735ca2016-03-30 16:01:06 -0700280 deviceIdpreFix=main.deviceIdPrefix,
suibin zhangd0f09b32016-03-29 00:57:57 -0700281 ingressPort = 2,
282 egressPort = 3)
suibin zhangff4abfe2016-03-29 11:52:08 -0700283 main.flowJsonBatchList.append(flowJsonBatch)
suibin zhanga82fe3f2016-03-29 11:26:21 -0700284
suibin zhangff4abfe2016-03-29 11:52:08 -0700285 startSw += 1
suibin zhanga5875da2016-04-02 20:54:50 -0700286 main.log.info( "Number of items created in the batch list is: " + str(len(main.flowJsonBatchList)))
suibin zhangff4abfe2016-03-29 11:52:08 -0700287
suibin zhanga82fe3f2016-03-29 11:26:21 -0700288
suibin zhanga5875da2016-04-02 20:54:50 -0700289 def CASE2000(self, main):
290 '''
291 Args:
292 main:
suibin zhangd0f09b32016-03-29 00:57:57 -0700293
suibin zhanga5875da2016-04-02 20:54:50 -0700294 Returns:
295
296 '''
297 main.case("Using REST API /flows/{} to post flow batch")
suibin zhangd0f09b32016-03-29 00:57:57 -0700298 main.step("Using REST API /flows/{} to post flow batch")
suibin zhanga5875da2016-04-02 20:54:50 -0700299
300 main.addedBatchList = []
suibin zhangd0f09b32016-03-29 00:57:57 -0700301 tStartPost = time.time()
302 for item in main.flowJsonBatchList:
303 ts = time.time()
suibin zhang570cb452016-03-29 19:03:15 -0700304 status, response = main.ONOSrest.sendFlowBatch(batch = item )
suibin zhangd0f09b32016-03-29 00:57:57 -0700305 teBatch = time.time() - ts
306 postTimes.append(teBatch)
307 main.log.info("Batch Rest Post Elapse time is: " + str(teBatch))
suibin zhang570cb452016-03-29 19:03:15 -0700308 main.addedBatchList.append(response[1])
suibin zhangd0f09b32016-03-29 00:57:57 -0700309
310 tLastPostEnd = time.time()
311
312 main.step("Check to ensure all flows are in added state.")
suibin zhang5c735ca2016-03-30 16:01:06 -0700313 #pprint(main.addedBatchList)
suibin zhangd0f09b32016-03-29 00:57:57 -0700314 resp = main.FALSE
315 while resp != main.TRUE:
316 resp = main.ONOSrest.checkFlowsState()
suibin zhang5c735ca2016-03-30 16:01:06 -0700317 time.sleep( float(main.params['SLEEP']['chkFlow']) )
suibin zhangd0f09b32016-03-29 00:57:57 -0700318 tAllAdded = time.time()
319
suibin zhangdec01c52016-03-29 19:23:33 -0700320 main.numFlows = int(main.params['CASE1000']['batches']) *\
suibin zhanga82fe3f2016-03-29 11:26:21 -0700321 int(main.params['CASE1000']['batchSize'])
suibin zhangdec01c52016-03-29 19:23:33 -0700322 main.log.info("Total number of flows: " + str (main.numFlows) )
suibin zhangd0f09b32016-03-29 00:57:57 -0700323 main.log.info("Sum of each POST elapse time: " + str(numpy.sum(postTimes)) )
324 main.log.info("Total POST elapse time: " + str(tLastPostEnd-tStartPost))
suibin zhangdec01c52016-03-29 19:23:33 -0700325 main.log.info("Rate of ADD Controller response: " + str(main.numFlows / (tLastPostEnd - tStartPost)))
suibin zhangd0f09b32016-03-29 00:57:57 -0700326
327 duration = tAllAdded - tLastPostEnd
328 main.log.info("Elapse time from end of last REST POST to Flows in ADDED state: " +\
329 str(duration))
suibin zhang5c735ca2016-03-30 16:01:06 -0700330 main.log.info("Rate of Confirmed Batch Flow ADD is (flows/sec): " + str( main.numFlows / duration))
suibin zhangd0f09b32016-03-29 00:57:57 -0700331
suibin zhanga5875da2016-04-02 20:54:50 -0700332 def CASE2100(self, main):
333 '''
334 Posting flow batches using threads
335 '''
336 main.case("Using REST API /flows/{} to post flow batch - multi-threads")
337 main.step("Using REST API /flows/{} to post flow batch - multi-threads")
338
339 from Queue import Queue
340 from threading import Thread
341 import time
342
343 main.threadID = 0
344 main.addedBatchList = []
345 q = Queue()
346 tAllAdded = 0
347
348 def postWorker(id):
349 while True:
350 item = q.get()
351 status,response = main.ONOSrest.sendFlowBatch(batch = item)
352 main.log.info("Thread {} is working on posting. ".format(id))
353 main.addedBatchList.append(response[1])
354 q.task_done()
355
356 for i in range( int( main.params['CASE2100']['numThreads'])):
357 threadID = "ThreadID-" + str(i)
358 t = Thread(target = postWorker, name = threadID, args=(threadID,) )
359 t.daemon = True
360 t.start()
361
362 tStartPost = time.time()
363 for item in main.flowJsonBatchList:
364 q.put(item)
365
366 q.join()
367 tLastPostEnd = time.time()
368
369 main.step("Check to ensure all flows are in added state.")
370 #pprint(main.addedBatchList)
371 resp = main.FALSE
372 while resp != main.TRUE and ( tAllAdded - tLastPostEnd < int (main.params['CASE2100']['chkFlowTO']) ):
373 resp = main.ONOSrest.checkFlowsState()
374 time.sleep( float(main.params['SLEEP']['chkFlow']) )
375 tAllAdded = time.time()
376
377 if tAllAdded - tLastPostEnd >= int (main.params['CASE2100']['chkFlowTO']):
378 main.log.warn("ONOS Flows still in pending state after: {} seconds.".format(tAllAdded - tLastPostEnd))
379
380 main.numFlows = int(main.params['CASE1000']['batches']) *\
381 int(main.params['CASE1000']['batchSize'])
382 main.log.info("Total number of flows: " + str (main.numFlows) )
383 main.log.info("Sum of each POST elapse time: " + str(numpy.sum(postTimes)) )
384 main.log.info("Total POST elapse time: " + str(tLastPostEnd-tStartPost))
385 main.log.info("Rate of ADD Controller response: " + str(main.numFlows / (tLastPostEnd - tStartPost)))
386
387 duration = tAllAdded - tLastPostEnd
388 main.log.info("Elapse time from end of last REST POST to Flows in ADDED state: " +\
389 str(duration))
390 main.log.info("Rate of Confirmed Batch Flow ADD is (flows/sec): " + str( main.numFlows / duration))
391 main.log.info("Number of flow Batches in the addedBatchList is: " + str( len(main.addedBatchList)))
392
393
394 def CASE3100(self, main):
395 '''
396 DELETE flow batches using threads
397 '''
398 main.case("Using REST API /flows/{} to delete flow batch - multi-threads")
399 main.step("Using REST API /flows/{} to delete flow batch - multi-threads")
400
401 from Queue import Queue
402 from threading import Thread
403 import time
404 import json
405
406 main.threadID = 0
407 q = Queue()
408 tAllRemoved = 0
409
410 main.log.info("Number of flow batches at start of remove: " + str( len( main.addedBatchList)))
411 def removeWorker(id):
412 while True:
413 item = q.get()
414 response = main.ONOSrest.removeFlowBatch(batch = json.loads(item) )
415 main.log.info("Thread {} is working on deleting. ".format(id))
416 q.task_done()
417
418 for i in range( int( main.params['CASE2100']['numThreads'])):
419 threadID = "ThreadID-" + str(i)
420 t = Thread(target = removeWorker, name = threadID, args=(threadID,) )
421 t.daemon = True
422 t.start()
423
424 tStartDelete = time.time()
425 for item in main.addedBatchList:
426 q.put(item)
427
428 q.join()
429 tLastDeleteEnd = time.time()
430 main.log.info("Number of flow batches at end of remove: " + str( len( main.addedBatchList)))
431
432 main.step("Check to ensure all flows are in added state.")
433 #pprint(main.addedBatchList)
434 resp = main.FALSE
435 while resp != main.TRUE and ( tAllRemoved - tLastDeleteEnd < int (main.params['CASE3100']['chkFlowTO']) ):
436 resp = main.ONOSrest.checkFlowsState()
437 time.sleep( float(main.params['SLEEP']['chkFlow']) )
438 tAllRemoved = time.time()
439
440 if tLastDeleteEnd - tLastDeleteEnd >= int (main.params['CASE2100']['chkFlowTO']):
441 main.log.warn("ONOS Flows still in pending state after: {} seconds.".format(tAllAdded - tLastPostEnd))
442
443 main.numFlows = int(main.params['CASE1000']['batches']) *\
444 int(main.params['CASE1000']['batchSize'])
445 main.log.info("Total number of flows: " + str (main.numFlows) )
446 main.log.info("Sum of each DELETE elapse time: " + str(numpy.sum(postTimes)) )
447 main.log.info("Total DELETE elapse time: " + str(tLastDeleteEnd-tStartDelete))
448 main.log.info("Rate of DELETE Controller response: " + str(main.numFlows / (tLastDeleteEnd-tStartDelete)))
449
450 duration = tAllRemoved - tLastDeleteEnd
451 main.log.info("Elapse time from end of last REST DELETE to Flows in REMOVED state: " +\
452 str(duration))
453 main.log.info("Rate of Confirmed Batch Flow REMOVED is (flows/sec): " + str( main.numFlows / duration))
454
455
456 def CASE3000(self, main):
suibin zhangd0f09b32016-03-29 00:57:57 -0700457 import time
458 import numpy
suibin zhang570cb452016-03-29 19:03:15 -0700459 import json
suibin zhangd0f09b32016-03-29 00:57:57 -0700460
461 rmTimes = []
462
463 main.case("Remove flow timing")
464
465 tStartRemove = time.time()
suibin zhang570cb452016-03-29 19:03:15 -0700466 for item in main.addedBatchList:
suibin zhangd0f09b32016-03-29 00:57:57 -0700467 ts = time.time()
suibin zhang37e4aa92016-03-30 16:16:16 -0700468 #print(item)
suibin zhang570cb452016-03-29 19:03:15 -0700469 resp = main.ONOSrest.removeFlowBatch(batch = json.loads(item) )
suibin zhangd0f09b32016-03-29 00:57:57 -0700470 teBatch = time.time() - ts
471 rmTimes.append(teBatch)
472 main.log.info("Batch Rest Remove Elapse time is: " + str(teBatch))
473
474 tLastRemoveEnd = time.time()
475
suibin zhangf59d3682016-03-29 19:27:13 -0700476 main.step("Check to ensure all flows are not in PENDING state.")
suibin zhangd0f09b32016-03-29 00:57:57 -0700477 resp = main.FALSE
478 while resp != main.TRUE:
479 resp = main.ONOSrest.checkFlowsState()
480 time.sleep(0.5)
481 tAllRemoved = time.time()
482
483 main.log.info("Total number of flows: " + str (int(main.params['CASE1000']['batches']) *\
suibin zhang5c735ca2016-03-30 16:01:06 -0700484 int(main.params['CASE1000']['batchSize']) ))
suibin zhangd0f09b32016-03-29 00:57:57 -0700485 main.log.info("Sum of each DELETE elapse time: " + str(numpy.sum(rmTimes)) )
suibin zhang570cb452016-03-29 19:03:15 -0700486 main.log.info("Total DELETE elapse time: " + str(tLastRemoveEnd-tStartRemove))
suibin zhang5c735ca2016-03-30 16:01:06 -0700487 main.log.info("Rate of DELETE Controller response (flows/sec): " + str(main.numFlows / (tLastRemoveEnd - tStartRemove)))
suibin zhangd0f09b32016-03-29 00:57:57 -0700488
suibin zhangdec01c52016-03-29 19:23:33 -0700489 duration = tAllRemoved - tLastRemoveEnd
suibin zhangf59d3682016-03-29 19:27:13 -0700490 main.log.info("Elapse time from end of last REST DELETE to Flows in REMOVED state: " +\
suibin zhangdec01c52016-03-29 19:23:33 -0700491 str(duration))
suibin zhang5c735ca2016-03-30 16:01:06 -0700492 main.log.info("Rate of Confirmed Batch Flow DELETE is (flows/sec): " + str( main.numFlows / duration))
suibin zhangd0f09b32016-03-29 00:57:57 -0700493
494 def CASE100(self,main):
495 from pprint import pprint
496
497 main.case( "Check to ensure onos flows." )
498
499 resp = main.ONOSrest.checkFlowsState()
suibin zhangdec01c52016-03-29 19:23:33 -0700500 #pprint(resp)
suibin zhangd0f09b32016-03-29 00:57:57 -0700501
502
503 def CASE110( self, main ):
504 '''
505 Report errors/warnings/exceptions
506 '''
507 main.log.info("Error report: \n" )
508 main.ONOSbench.logReport( main.ONOSip[ 0 ],
509 [ "INFO",
510 "FOLLOWER",
511 "WARN",
512 "flow",
513 "ERROR",
514 "Except" ],
515 "s" )
516 main.stop()
517