blob: b4c5ac34ad4ad043a8857d43c4375998272da3ed [file] [log] [blame]
GlennRCb3202c52015-08-24 14:43:30 -07001
2# This is a performance scale intent that test onos to see how many intents can
3# be installed and rerouted using the null provider and mininet.
GlennRCed771242016-01-13 17:02:47 -08004'''
5This test will not test on reroute and OVS!!!
6If you need test on reroute or OVS, change the params file
7
8Test information:
9 - BatchSize: 1000
10 - Minimum intents: 10,000
11 - Maximum Intents: 1,000,000
12 - Check Interval: 10,000
13 - Link:
14 - ingress: 0000000000000001/9
15 - egress: 0000000000000002/9
16 - Timeout: 120 Seconds
17'''
GlennRCb3202c52015-08-24 14:43:30 -070018
19class SCPFmaxIntents:
20
21 def __init__( self ):
22 self.default = ''
23
GlennRCed771242016-01-13 17:02:47 -080024 def CASE1( self, main ):
GlennRCb3202c52015-08-24 14:43:30 -070025 import time
26 import os
27 import imp
28
29 """
30 - Construct tests variables
31 - GIT ( optional )
32 - Checkout ONOS master branch
33 - Pull latest ONOS code
34 - Building ONOS ( optional )
35 - Install ONOS package
36 - Build ONOS package
GlennRCec6c7612015-08-31 14:52:10 -070037 - Set up cell
38 - Create cell file
39 - Set cell file
40 - Verify cell file
41 - Kill ONOS process
GlennRCb3202c52015-08-24 14:43:30 -070042 """
43
44 main.case( "Constructing test variables and building ONOS package" )
45 main.step( "Constructing test variables" )
46 stepResult = main.FALSE
47
48 # Test variables
49 main.testOnDirectory = os.path.dirname( os.getcwd ( ) )
50 main.dependencyPath = main.testOnDirectory + \
51 main.params['DEPENDENCY']['path']
52 main.cellName = main.params[ 'ENV' ][ 'cellName' ]
53 main.apps = main.params[ 'ENV' ][ 'cellApps' ]
GlennRCb3202c52015-08-24 14:43:30 -070054 main.topology = main.params[ 'DEPENDENCY' ][ 'topology' ]
55 main.scale = ( main.params[ 'SCALE' ][ 'size' ] ).split( "," )
56 main.maxNodes = int( main.params[ 'SCALE' ][ 'max' ] )
57 main.ONOSport = main.params[ 'CTRL' ][ 'port' ]
58 main.timeout = int(main.params['SLEEP']['timeout'])
GlennRCb3202c52015-08-24 14:43:30 -070059 main.startUpSleep = int( main.params[ 'SLEEP' ][ 'startup' ] )
60 main.installSleep = int( main.params[ 'SLEEP' ][ 'install' ] )
61 main.verifySleep = int( main.params[ 'SLEEP' ][ 'verify' ] )
62 main.rerouteSleep = int ( main.params['SLEEP']['reroute'] )
GlennRCed771242016-01-13 17:02:47 -080063 main.verifyAttempts = int( main.params['ATTEMPTS']['verify'] )
64 main.ingress = main.params['LINK']['ingress']
65 main.egress = main.params['LINK']['egress']
GlennRC4c745432015-09-17 17:09:13 -070066 main.dbFileName = main.params['DATABASE']['file']
GlennRCb3202c52015-08-24 14:43:30 -070067 main.cellData = {} # for creating cell file
GlennRCed771242016-01-13 17:02:47 -080068 main.reroute = main.params['reroute']
69 if main.reroute == "True":
70 main.reroute = True
71 else:
72 main.reroute = False
GlennRCb3202c52015-08-24 14:43:30 -070073 main.CLIs = []
74 main.ONOSip = []
75 main.maxNumBatch = 0
GlennRCb3202c52015-08-24 14:43:30 -070076 main.ONOSip = main.ONOSbench.getOnosIps()
77 main.log.info(main.ONOSip)
GlennRC4c745432015-09-17 17:09:13 -070078 main.setupSkipped = False
79
80 wrapperFile1 = main.params[ 'DEPENDENCY' ][ 'wrapper1' ]
81 wrapperFile2 = main.params[ 'DEPENDENCY' ][ 'wrapper2' ]
82 gitBranch = main.params[ 'GIT' ][ 'branch' ]
83 gitPull = main.params[ 'GIT' ][ 'pull' ]
84 nic = main.params['DATABASE']['nic']
85 node = main.params['DATABASE']['node']
86 nic = main.params['DATABASE']['nic']
87 node = main.params['DATABASE']['node']
GlennRCb3202c52015-08-24 14:43:30 -070088
GlennRCec6c7612015-08-31 14:52:10 -070089 # main.scale[ 0 ] determines the current number of ONOS controller
90 main.numCtrls = int( main.scale[ 0 ] )
91
GlennRC4c745432015-09-17 17:09:13 -070092 main.log.info("Creating list of ONOS cli handles")
93 for i in range(main.maxNodes):
94 main.CLIs.append( getattr( main, 'ONOScli' + str( i+1 )))
GlennRCb3202c52015-08-24 14:43:30 -070095
GlennRC4c745432015-09-17 17:09:13 -070096 if not main.CLIs:
97 main.log.error("Failed to create the list of ONOS cli handles")
98 main.cleanup()
99 main.exit()
100
101 main.log.info("Loading wrapper files")
GlennRCb3202c52015-08-24 14:43:30 -0700102 main.startUp = imp.load_source( wrapperFile1,
103 main.dependencyPath +
104 wrapperFile1 +
105 ".py" )
106
107 main.intentFunctions = imp.load_source( wrapperFile2,
108 main.dependencyPath +
109 wrapperFile2 +
110 ".py" )
111
112 copyResult = main.ONOSbench.copyMininetFile( main.topology,
113 main.dependencyPath,
114 main.Mininet1.user_name,
115 main.Mininet1.ip_address )
116
GlennRC4c745432015-09-17 17:09:13 -0700117 commit = main.ONOSbench.getVersion(report=True)
118 commit = commit.split(" ")[1]
GlennRCb3202c52015-08-24 14:43:30 -0700119
120 if gitPull == 'True':
GlennRC4c745432015-09-17 17:09:13 -0700121 if not main.startUp.onosBuild( main, gitBranch ):
122 main.log.error("Failed to build ONOS")
123 main.cleanup()
124 main.exit()
GlennRCb3202c52015-08-24 14:43:30 -0700125 else:
126 main.log.warn( "Did not pull new code so skipping mvn " +
127 "clean install" )
128
GlennRC4c745432015-09-17 17:09:13 -0700129 main.log.info( "Starting up %s node(s) ONOS cluster" % main.numCtrls)
GlennRCb3202c52015-08-24 14:43:30 -0700130 main.log.info( "Safety check, killing all ONOS processes" +
Jon Hall70b2ff42015-11-17 15:49:44 -0800131 " before initiating environment setup" )
GlennRCb3202c52015-08-24 14:43:30 -0700132
133 for i in range( main.maxNodes ):
134 main.ONOSbench.onosDie( main.ONOSip[ i ] )
135
GlennRC4c745432015-09-17 17:09:13 -0700136 main.log.info( "NODE COUNT = %s" % main.numCtrls)
GlennRCb3202c52015-08-24 14:43:30 -0700137
138 tempOnosIp = []
139 for i in range( main.numCtrls ):
140 tempOnosIp.append( main.ONOSip[i] )
141
142 main.ONOSbench.createCellFile( main.ONOSbench.ip_address,
143 "temp",
144 main.Mininet1.ip_address,
145 main.apps,
146 tempOnosIp )
147
GlennRCed771242016-01-13 17:02:47 -0800148 main.step( "Apply cell to environment" )
149 cellResult = main.ONOSbench.setCell( "temp" )
150 verifyResult = main.ONOSbench.verifyCell()
151 stepResult = cellResult and verifyResult
152 utilities.assert_equals( expect=main.TRUE,
153 actual=stepResult,
154 onpass="Successfully applied cell to " + \
155 "environment",
156 onfail="Failed to apply cell to environment " )
GlennRCb3202c52015-08-24 14:43:30 -0700157
GlennRCed771242016-01-13 17:02:47 -0800158 main.step( "Creating ONOS package" )
159 packageResult = main.ONOSbench.onosPackage()
160 stepResult = packageResult
161 utilities.assert_equals( expect=main.TRUE,
162 actual=stepResult,
163 onpass="Successfully created ONOS package",
164 onfail="Failed to create ONOS package" )
GlennRCec6c7612015-08-31 14:52:10 -0700165
GlennRC58ea2542015-09-02 14:23:34 -0700166 main.log.info("Creating DB file")
GlennRC4c745432015-09-17 17:09:13 -0700167 with open(main.dbFileName, "w+") as dbFile:
GlennRCec6c7612015-08-31 14:52:10 -0700168 temp = "'" + commit + "',"
GlennRC58ea2542015-09-02 14:23:34 -0700169 temp += "'" + nic + "',"
170 temp += str(main.numCtrls) + ","
GlennRC5719ff02015-09-08 17:25:30 -0700171 temp += "'" + node + "1" + "'"
YPZhangb5d3f832016-01-23 22:54:26 -0800172 temp += ",0"
173 temp += ",0"
174 temp += ",0"
175 temp += ",0"
GlennRC4c745432015-09-17 17:09:13 -0700176 dbFile.write(temp)
GlennRCec6c7612015-08-31 14:52:10 -0700177
GlennRCed771242016-01-13 17:02:47 -0800178 def CASE2( self, main ):
GlennRCec6c7612015-08-31 14:52:10 -0700179 """
180 - Uninstall ONOS cluster
181 - Verify ONOS start up
182 - Install ONOS cluster
183 - Connect to cli
184 """
GlennRC4c745432015-09-17 17:09:13 -0700185
GlennRCed771242016-01-13 17:02:47 -0800186 main.step( "Installing ONOS with -f" )
187 onosInstallResult = main.TRUE
GlennRCb3202c52015-08-24 14:43:30 -0700188 for i in range( main.numCtrls ):
GlennRCed771242016-01-13 17:02:47 -0800189 onosInstallResult = onosInstallResult and \
190 main.ONOSbench.onosInstall( node=main.ONOSip[ i ] )
191 stepResult = onosInstallResult
192 utilities.assert_equals( expect=main.TRUE,
193 actual=stepResult,
194 onpass="Successfully installed ONOS package",
195 onfail="Failed to install ONOS package" )
GlennRCb3202c52015-08-24 14:43:30 -0700196
GlennRCed771242016-01-13 17:02:47 -0800197 time.sleep( main.startUpSleep )
GlennRCb3202c52015-08-24 14:43:30 -0700198
GlennRCed771242016-01-13 17:02:47 -0800199 main.step( "Start ONOS cli" )
200 cliResult = main.TRUE
GlennRCb3202c52015-08-24 14:43:30 -0700201 for i in range( main.numCtrls ):
GlennRCed771242016-01-13 17:02:47 -0800202 cliResult = cliResult and \
203 main.CLIs[ i ].startOnosCli( main.ONOSip[ i ] )
204 stepResult = cliResult
205 utilities.assert_equals( expect=main.TRUE,
206 actual=stepResult,
207 onpass="Successfully start ONOS cli",
208 onfail="Failed to start ONOS cli" )
209
210 time.sleep( main.startUpSleep )
GlennRCb3202c52015-08-24 14:43:30 -0700211
212 def CASE10( self, main ):
213 """
214 Setting up null-provider
215 """
216 import json
GlennRCb3202c52015-08-24 14:43:30 -0700217
218 # Activate apps
GlennRCed771242016-01-13 17:02:47 -0800219 main.step("Activating null-provider")
GlennRC4c745432015-09-17 17:09:13 -0700220 appStatus = main.CLIs[0].activateApp('org.onosproject.null')
GlennRCed771242016-01-13 17:02:47 -0800221 utilities.assert_equals( expect=main.TRUE,
222 actual=appStatus,
223 onpass="Successfully activated null-provider",
224 onfail="Failed activate null-provider" )
GlennRCb3202c52015-08-24 14:43:30 -0700225
226 # Setup the null-provider
GlennRCed771242016-01-13 17:02:47 -0800227 main.step("Configuring null-provider")
GlennRC4c745432015-09-17 17:09:13 -0700228 cfgStatus = main.ONOSbench.onosCfgSet( main.ONOSip[0],
229 'org.onosproject.provider.nil.NullProviders', 'deviceCount 3' )
230 cfgStatus = cfgStatus and main.ONOSbench.onosCfgSet( main.ONOSip[0],
231 'org.onosproject.provider.nil.NullProviders', 'topoShape reroute' )
232 cfgStatus = cfgStatus and main.ONOSbench.onosCfgSet( main.ONOSip[0],
233 'org.onosproject.provider.nil.NullProviders', 'enabled true' )
GlennRCb3202c52015-08-24 14:43:30 -0700234
GlennRCed771242016-01-13 17:02:47 -0800235 utilities.assert_equals( expect=main.TRUE,
236 actual=cfgStatus,
237 onpass="Successfully configured null-provider",
238 onfail="Failed to configure null-provider" )
GlennRCb3202c52015-08-24 14:43:30 -0700239
GlennRC4c745432015-09-17 17:09:13 -0700240 # give onos some time to settle
241 time.sleep(main.startUpSleep)
GlennRCb3202c52015-08-24 14:43:30 -0700242
GlennRCed771242016-01-13 17:02:47 -0800243 main.log.info("Setting default flows to zero")
GlennRC4c745432015-09-17 17:09:13 -0700244 main.defaultFlows = 0
GlennRCb3202c52015-08-24 14:43:30 -0700245
GlennRCed771242016-01-13 17:02:47 -0800246 main.step("Check status of null-provider setup")
247 caseResult = appStatus and cfgStatus
248 utilities.assert_equals( expect=main.TRUE,
249 actual=caseResult,
250 onpass="Setting up null-provider was successfull",
251 onfail="Failed to setup null-provider" )
252
253 # This tells the following cases if we are using the null-provider or ovs
254 main.switchType = "null:"
255
256 # If the null-provider setup was unsuccessfull, then there is no point to
257 # run the subsequent cases
258 if not caseResult:
GlennRC4c745432015-09-17 17:09:13 -0700259 main.setupSkipped = True
260
GlennRCb3202c52015-08-24 14:43:30 -0700261 def CASE11( self, main ):
262 '''
263 Setting up mininet
264 '''
265 import json
266 import time
267
GlennRCed771242016-01-13 17:02:47 -0800268 time.sleep(main.startUpSleep)
269
270 main.step("Activating openflow")
GlennRC4c745432015-09-17 17:09:13 -0700271 appStatus = main.CLIs[0].activateApp('org.onosproject.openflow')
GlennRCed771242016-01-13 17:02:47 -0800272 utilities.assert_equals( expect=main.TRUE,
273 actual=appStatus,
274 onpass="Successfully activated openflow",
275 onfail="Failed activate openflow" )
GlennRCb3202c52015-08-24 14:43:30 -0700276
GlennRCb3202c52015-08-24 14:43:30 -0700277 time.sleep(main.startUpSleep)
278
GlennRCed771242016-01-13 17:02:47 -0800279 main.step('Starting mininet topology')
GlennRC4c745432015-09-17 17:09:13 -0700280 mnStatus = main.Mininet1.startNet(topoFile='~/mininet/custom/rerouteTopo.py')
GlennRCed771242016-01-13 17:02:47 -0800281 utilities.assert_equals( expect=main.TRUE,
282 actual=mnStatus,
283 onpass="Successfully started Mininet",
284 onfail="Failed to activate Mininet" )
GlennRC4c745432015-09-17 17:09:13 -0700285
GlennRCed771242016-01-13 17:02:47 -0800286 main.step("Assinging masters to switches")
287 switches = main.Mininet1.getSwitches()
288 swStatus = main.Mininet1.assignSwController( sw=switches.keys(), ip=main.ONOSip )
289 utilities.assert_equals( expect=main.TRUE,
290 actual=swStatus,
291 onpass="Successfully assigned switches to masters",
292 onfail="Failed assign switches to masters" )
GlennRC4c745432015-09-17 17:09:13 -0700293
GlennRCb3202c52015-08-24 14:43:30 -0700294 time.sleep(main.startUpSleep)
295
GlennRCed771242016-01-13 17:02:47 -0800296 main.log.info("Getting default flows")
GlennRCb3202c52015-08-24 14:43:30 -0700297 jsonSum = json.loads(main.CLIs[0].summary())
GlennRCb3202c52015-08-24 14:43:30 -0700298 main.defaultFlows = jsonSum["flows"]
GlennRCb3202c52015-08-24 14:43:30 -0700299
GlennRCed771242016-01-13 17:02:47 -0800300 main.step("Check status of Mininet setup")
301 caseResult = appStatus and mnStatus and swStatus
302 utilities.assert_equals( expect=main.TRUE,
303 actual=caseResult,
304 onpass="Successfully setup Mininet",
305 onfail="Failed setup Mininet" )
306
307 # This tells the following cases if we are using the null-provider or ovs
308 main.switchType = "of:"
309
310 if not caseResult:
GlennRC4c745432015-09-17 17:09:13 -0700311 main.setupSkipped = True
GlennRCb3202c52015-08-24 14:43:30 -0700312
313 def CASE20( self, main ):
GlennRCb3202c52015-08-24 14:43:30 -0700314 '''
315 Pushing intents
316 '''
GlennRC4c745432015-09-17 17:09:13 -0700317
GlennRCed771242016-01-13 17:02:47 -0800318 if main.reroute:
319 if main.switchType == "of:":
320 main.minIntents = int(main.params['OVS']['REROUTE']['min_intents'])
321 main.maxIntents = int(main.params['OVS']['REROUTE']['max_intents'])
322 main.checkInterval = int(main.params['OVS']['REROUTE']['check_interval'])
323 main.batchSize = int(main.params['OVS']['REROUTE']['batch_size'])
324 else:
325 main.minIntents = int(main.params['NULL']['REROUTE']['min_intents'])
326 main.maxIntents = int(main.params['NULL']['REROUTE']['max_intents'])
327 main.checkInterval = int(main.params['NULL']['REROUTE']['check_interval'])
328 main.batchSize = int(main.params['NULL']['REROUTE']['batch_size'])
329 else:
330 if main.switchType == "of:":
331 main.minIntents = int(main.params['OVS']['PUSH']['min_intents'])
332 main.maxIntents = int(main.params['OVS']['PUSH']['max_intents'])
333 main.checkInterval = int(main.params['OVS']['PUSH']['check_interval'])
334 main.batchSize = int(main.params['OVS']['PUSH']['batch_size'])
335 else:
336 main.minIntents = int(main.params['NULL']['PUSH']['min_intents'])
337 main.maxIntents = int(main.params['NULL']['PUSH']['max_intents'])
338 main.checkInterval = int(main.params['NULL']['PUSH']['check_interval'])
339 main.batchSize = int(main.params['NULL']['PUSH']['batch_size'])
340
341 # check if the case needs to be skipped
GlennRC4c745432015-09-17 17:09:13 -0700342 if main.setupSkipped:
343 main.setupSkipped = False
344 main.skipCase()
345
GlennRCb3202c52015-08-24 14:43:30 -0700346 # the index where the next intents will be installed
347 offset = 0
GlennRC33a42072015-09-11 11:32:44 -0700348 # keeps track of how many intents have been installed
GlennRCed771242016-01-13 17:02:47 -0800349 currIntents = 0
GlennRC33a42072015-09-11 11:32:44 -0700350 # keeps track of how many flows have been installed
GlennRCed771242016-01-13 17:02:47 -0800351 currFlows = main.defaultFlows
GlennRC9882f352015-08-27 18:03:28 -0700352 # limit for the number of intents that can be installed
353 limit = main.maxIntents / main.batchSize
GlennRCd0e5ed22015-09-03 11:54:27 -0700354
GlennRCed771242016-01-13 17:02:47 -0800355 main.step( "Pushing intents" )
GlennRCd0e5ed22015-09-03 11:54:27 -0700356 for i in range(limit):
GlennRCed771242016-01-13 17:02:47 -0800357 pushResult = main.ONOScli1.pushTestIntents( main.switchType + main.ingress,
358 main.switchType + main.egress,
359 main.batchSize,
360 offset = offset,
361 options = "-i",
362 timeout = main.timeout )
363 if pushResult == None:
364 main.log.info( "Timeout!" )
365 main.skipCase()
366 time.sleep(1)
GlennRCd0e5ed22015-09-03 11:54:27 -0700367
GlennRCed771242016-01-13 17:02:47 -0800368 # Update offset
GlennRCd0e5ed22015-09-03 11:54:27 -0700369 offset += main.batchSize
GlennRCd0e5ed22015-09-03 11:54:27 -0700370
GlennRCed771242016-01-13 17:02:47 -0800371 if offset >= main.minIntents and offset % main.checkInterval == 0:
372 intentVerify = utilities.retry( main.ONOScli1.checkIntentSummary,
373 main.FALSE,
374 [main.timeout],
375 sleep=main.verifySleep,
376 attempts=main.verifyAttempts )
GlennRC33a42072015-09-11 11:32:44 -0700377
GlennRCed771242016-01-13 17:02:47 -0800378 flowVerify = utilities.retry( main.ONOScli1.checkFlowsState,
379 main.FALSE,
380 [False,main.timeout],
381 sleep=main.verifySleep,
382 attempts=main.verifyAttempts )
GlennRCb3202c52015-08-24 14:43:30 -0700383
GlennRCed771242016-01-13 17:02:47 -0800384 if not intentVerify:
385 main.log.error( "Failed to install intents" )
GlennRCd0e5ed22015-09-03 11:54:27 -0700386 break
GlennRCb3202c52015-08-24 14:43:30 -0700387
GlennRCed771242016-01-13 17:02:47 -0800388 if main.reroute:
389 main.step( "Reroute" )
390 # tear down a link
391 main.log.info("Tearing down link")
392 if main.switchType == "of:":
393 downlink = main.Mininet1.link( END1 = "s1", END2 = "s3", OPTION = "down" )
394 else:
395 downlink = main.ONOScli1.link( main.ingress, main.egress, "down")
396
397 if downlink:
398 main.log.info( "Successfully tear down link" )
399 else:
400 main.log.warn( "Failed to tear down link" )
401
402 time.sleep(main.rerouteSleep)
403
404 # Verifying intents
405 main.step( "Checking intents and flows" )
406 intentVerify = utilities.retry( main.ONOScli1.checkIntentSummary,
407 main.FALSE,
408 [main.timeout],
409 sleep=main.verifySleep,
410 attempts=main.verifyAttempts )
411 # Verfying flows
412 flowVerify = utilities.retry( main.ONOScli1.checkFlowsState,
413 main.FALSE,
414 [False, main.timeout],
415 sleep = main.verifySleep,
416 attempts = main.verifyAttempts )
417
418 if not intentVerify:
419 main.log.error( "Failed to install intents" )
420 # Bring link back up
421 main.log.info("Bringing link back up")
422 if main.switchType == "of:":
423 uplink = main.Mininet1.link( END1 = "s1", END2 = "s3", OPTION = "up" )
424 else:
425 uplink = main.ONOScli1.link( main.ingress, main.egress, "up" )
426
427 if uplink:
428 main.log.info( "Successfully bring link back up" )
429 else:
430 main.log.warn( "Failed to bring link back up" )
431
432 time.sleep(main.rerouteSleep)
433
434 # Verifying intents
435 main.step( "Checking intents and flows" )
436 intentVerify = utilities.retry( main.ONOScli1.checkIntentSummary,
437 main.FALSE,
438 [main.timeout],
439 sleep=main.verifySleep,
440 attempts=main.verifyAttempts )
441 # Verfying flows
442 flowVerify = utilities.retry( main.ONOScli1.checkFlowsState,
443 main.FALSE,
444 [False, main.timeout],
445 sleep = main.verifySleep,
446 attempts = main.verifyAttempts )
447
448 if not intentVerify:
449 main.log.error( "Failed to install intents" )
450
451 rerouteResult = downlink and uplink
452 utilities.assert_equals( expect = main.TRUE,
453 actual = rerouteResult,
454 onpass = "Successfully reroute",
455 onfail = "Failed to reroute" )
456
457 utilities.assert_equals( expect = main.TRUE,
458 actual = intentVerify,
459 onpass = "Successfully pushed and verified intents",
460 onfail = "Failed to push and verify intents" )
YPZhangb5d3f832016-01-23 22:54:26 -0800461 currIntents = main.ONOScli1.getTotalIntentsNum()
462 currFlows = main.ONOScli1.getTotalFlowsNum()
GlennRCec6c7612015-08-31 14:52:10 -0700463
GlennRC58ea2542015-09-02 14:23:34 -0700464 main.log.info("Writing results to DB file")
GlennRC4c745432015-09-17 17:09:13 -0700465 with open(main.dbFileName, "a") as dbFile:
GlennRCed771242016-01-13 17:02:47 -0800466 temp = "," + str(currIntents)
467 temp += "," + str(currFlows)
YPZhangb5d3f832016-01-23 22:54:26 -0800468 temp += ",0"
469 temp += ",0\n"
GlennRC4c745432015-09-17 17:09:13 -0700470 dbFile.write(temp)
GlennRC14d54f72015-09-03 10:51:37 -0700471
GlennRCed771242016-01-13 17:02:47 -0800472 if main.switchType == "of:":
473 main.step( "Stopping mininet" )
474 stepResult = main.Mininet1.stopNet()
475 utilities.assert_equals( expect = main.TRUE,
476 actual = stepResult,
477 oppass = "Successfully stop Mininet",
478 opfail = "Failed stop Mininet" )
479
GlennRCb3202c52015-08-24 14:43:30 -0700480
481 def CASE100( self, main ):
482 '''
483 Report errors/warnings/exceptions
484 '''
485 main.log.info("Error report: \n")
486 main.ONOSbench.logReport( main.ONOSip[ 0 ],
487 [ "INFO",
488 "FOLLOWER",
489 "WARN",
490 "flow",
491 "ERROR",
492 "Except" ],
493 "s" )