blob: a64ad3a38deb46b95a50b09d7b9fdaf14574b421 [file] [log] [blame]
Jeremy Ronquillob27ce4c2017-07-17 12:41:28 -07001"""
2Copyright 2015 Open Networking Foundation (ONF)
3
4Please refer questions to either the onos test mailing list at <onos-test@onosproject.org>,
5the System Testing Plans and Results wiki page at <https://wiki.onosproject.org/x/voMg>,
6or the System Testing Guide page at <https://wiki.onosproject.org/x/WYQg>
7
8 TestON is free software: you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation, either version 2 of the License, or
11 (at your option) any later version.
12
13 TestON is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with TestON. If not, see <http://www.gnu.org/licenses/>.
20"""
suibin zhangfd266fd2015-10-27 17:06:33 -070021
suibin zhangc7635702015-11-03 21:30:20 -080022# This is a basic platform test suite.
23# Additional platform test cases can be added on this test suite where appropriate.
suibin zhangfd266fd2015-10-27 17:06:33 -070024
25class PLATdockertest:
26 """
27 This testsuite performs the following tests:
28 1) checkout onos docker image;
29 2) test image start up in single and clustered mode;
30 3) test onos app activation and deactivation;
31
32 Prerequisites:
33 1) docker-engine installed on test station (localhost);
34 2) python docker client (docker-py) installed on test station
35 """
36
37 def __init__( self ):
38 self.default = ''
39 global DOCKERREPO, DOCKERTAG
40 global IPlist
41 global CTIDlist
42 global NODElist
43
44 DOCKERREPO = "onosproject/onos"
45 DOCKERTAG = "latest"
46
Pratik Parabcc406452017-02-28 15:15:25 -080047 def CASE0( self, main ):
48 """
49 Pull all docker images and get a list of image tags
50 """
51 main.case( "Pull all docker images and get a list of image tags" )
Pratik Parabcc406452017-02-28 15:15:25 -080052 import os
53 DOCKERREPO = main.params[ 'DOCKER' ][ 'repo' ]
54 os.system( "docker pull -a " + DOCKERREPO )
55 imageTagList = list()
56 imageTagCounter = 0
Pratik Parab50d53d42017-03-24 14:28:22 -070057 duplicateTagDetected = 0
58 imageTagList, duplicateTagDetected = main.ONOSbenchDocker.getListOfImages( DOCKERREPO )
59 stepResult = main.FALSE
60 main.step( "Check for duplicate Tags for a given image" )
61 if not duplicateTagDetected:
62 stepResult = main.TRUE
63 utilities.assert_equals( expect = main.TRUE, actual = stepResult,
64 onpass = "no duplicate image tags",
65 onfail = "duplicate image tags detected!!" )
Pratik Parabcc406452017-02-28 15:15:25 -080066 main.step( "Get a list of image tags" )
67 stepResult = main.FALSE
Pratik Parabcc406452017-02-28 15:15:25 -080068 if imageTagList is not []:
69 main.log.info( "The Image tag list is: " + str(imageTagList) )
70 stepResult = main.TRUE
71 utilities.assert_equals( expect = main.TRUE, actual = stepResult,
72 onpass = "image tag list pulled successfully",
73 onfail = "image tag list not pulled" )
74
suibin zhangfd266fd2015-10-27 17:06:33 -070075 def CASE1( self, main ):
76 """
77 1) set up test params;
78 """
79 import re
suibin zhang3b067ea2015-11-05 13:55:21 -080080 import time
81 import subprocess
suibin zhangfd266fd2015-10-27 17:06:33 -070082
Pratik Parabcc406452017-02-28 15:15:25 -080083 if imageTagCounter < len( imageTagList ):
84 DOCKERTAG = imageTagList[imageTagCounter]
85 imageTagCounter += 1
86
87 main.case("Set case test params for onos image {}".format( DOCKERTAG ))
suibin zhangfd266fd2015-10-27 17:06:33 -070088 main.step("Initialize test params")
89 NODElist = main.params["SCALE"]["nodelist"].split(',')
90 main.log.info("onos container names are: " + ",".join(NODElist) )
91 IPlist = list()
92 main.testOnDirectory = re.sub( "(/tests)$", "", main.testDir )
suibin zhangfd266fd2015-10-27 17:06:33 -070093 CTIDlist = list()
suibin zhang3b067ea2015-11-05 13:55:21 -080094
95 main.log.info("Check docker status, it not running, try restart it")
96 iter = 0
97 stepResult = main.TRUE
98 while subprocess.call("sudo service docker status", shell=True) and iter <= 3:
99 subprocess.call("sudo service docker restart", shell=True)
100 time.sleep(5)
101 iter += 1
102 if iter == 3: stepResult = main.FALSE
103
104 utilities.assert_equals( expect = main.TRUE, actual = stepResult,
105 onpass = "docker is running",
106 onfail = "docker is not running")
107 if stepResult == main.FALSE:
108 main.log.warn("docker is not running - exiting test")
Devin Lim44075962017-08-11 10:56:37 -0700109 main.cleanAndExit()
Pratik Parabcc406452017-02-28 15:15:25 -0800110 if imageTagCounter > len( imageTagList ):
Pratik Parab50d53d42017-03-24 14:28:22 -0700111 main.log.info("All images have been tested")
Devin Lim44075962017-08-11 10:56:37 -0700112 main.cleanAndExit()
suibin zhangfd266fd2015-10-27 17:06:33 -0700113
114 def CASE5(self, main):
115 """
Pratik Parabcc406452017-02-28 15:15:25 -0800116 Pull the specified image
suibin zhangfd266fd2015-10-27 17:06:33 -0700117 """
118
Pratik Parabcc406452017-02-28 15:15:25 -0800119 main.case( "Pull onos docker image {} from {} - \
120 it may take sometime if this is a first time pulling.".format( DOCKERTAG, DOCKERREPO ) )
suibin zhangfd266fd2015-10-27 17:06:33 -0700121 stepResult = main.FALSE
Pratik Parabcc406452017-02-28 15:15:25 -0800122 main.step( "pull image {} from {}".format( DOCKERTAG, DOCKERREPO ) )
suibin zhangfd266fd2015-10-27 17:06:33 -0700123 stepResult = main.ONOSbenchDocker.dockerPull( onosRepo = DOCKERREPO, onosTag = DOCKERTAG )
124 utilities.assert_equals( expect = main.TRUE, actual = stepResult,
125 onpass = "Succeeded in pulling " + DOCKERREPO + ":" + DOCKERTAG,
126 onfail = "Failed to pull " + DOCKERREPO + ":" + DOCKERTAG )
suibin zhang3b067ea2015-11-05 13:55:21 -0800127 if stepResult == main.FALSE: main.skipCase()
suibin zhangfd266fd2015-10-27 17:06:33 -0700128
129 def CASE10( self, main ):
130 """
131 Start docker containers for list of onos nodes, only if not already existed
132 """
133 import re
suibin zhang3b067ea2015-11-05 13:55:21 -0800134 createResult = main.TRUE
135 startResult = main.TRUE
Pratik Parabcc406452017-02-28 15:15:25 -0800136 main.case( "Start onos container(s) for onos image {}".format( DOCKERTAG ))
suibin zhangfd266fd2015-10-27 17:06:33 -0700137 image = DOCKERREPO + ":" + DOCKERTAG
138
Pratik Parabcc406452017-02-28 15:15:25 -0800139 main.step( "Create and (re)start docker container(s) for onos image {} if not already exist".format( DOCKERTAG ))
suibin zhangfd266fd2015-10-27 17:06:33 -0700140 #stepResult = main.FALSE
141
142 for ct in xrange(0, len(NODElist)):
143 if not main.ONOSbenchDocker.dockerCheckCTName( ctName = NODElist[ct] ):
144 main.log.info( "Create new container for onos" + str(ct + 1) )
145 createResult, ctid = main.ONOSbenchDocker.dockerCreateCT( onosImage = image, onosNode = NODElist[ct])
146 CTIDlist.append(ctid)
147 startResult = main.ONOSbenchDocker.dockerStartCT( ctID = ctid )
148 else:
Pratik Parabcc406452017-02-28 15:15:25 -0800149 main.log.info("Container exists for node onos" + str(ct + 1) + "; restart container with {} image".format( DOCKERTAG ) )
suibin zhangfd266fd2015-10-27 17:06:33 -0700150 startResult = main.ONOSbenchDocker.dockerRestartCT( ctName = NODElist[ct ] )
151
152 utilities.assert_equals( expect = main.TRUE, actual = createResult and startResult,
153 onpass = "Container successfully created",
154 onfail = "Failed to create the container" )
155
156 main.step( "Get IP address on onos containers" )
157 stepResult = main.FALSE
158
159 for ct in xrange(0,len(NODElist)):
160 IPlist.append(main.ONOSbenchDocker.dockerIP( ctName = NODElist[ct] ))
161 main.log.info("Container IPs are: " + ', '.join( IPlist ))
162
163 if IPlist is not []:stepResult = main.TRUE
164 utilities.assert_equals( expect = main.TRUE, actual = stepResult,
165 onpass = "Container successfully started",
166 onfail = "Failed to start the container" )
167
168 def CASE110(self,main):
169 """
170 Steps:
171 1) check default startup standalone onos applications status;
172 2) form onos cluster with all nodes;
173 3) check onos applications status;
174 4) activate apps per params and check app status;
175 5) deactivate apps and check app status
176
177 """
178 import time
179 import json
180
Pratik Parabcc406452017-02-28 15:15:25 -0800181 main.case( "Form onos cluster and check status of onos apps for onos image {}".format( DOCKERTAG ) )
182
suibin zhangfd266fd2015-10-27 17:06:33 -0700183 startupSleep = int(main.params["SLEEP"]["startup"])
184
185 appToAct = main.params["CASE110"]["apps"]
186 stepResult = main.FALSE
187
188 main.log.info( "Wait for startup, sleep (sec): " + str(startupSleep))
189 time.sleep(startupSleep)
190
Pratik Parabcc406452017-02-28 15:15:25 -0800191 main.step( "Check initial app states from onos1 for onos image {}".format( DOCKERTAG ))
suibin zhangfd266fd2015-10-27 17:06:33 -0700192 stepResult = main.TRUE
193 response = main.ONOSbenchRest.apps( ip=IPlist[0], port = 8181 )
194 main.log.debug("Rest call response is: " + response)
195 if response is not main.FALSE:
196 for item in json.loads(response):
197 if item["state"] not in ["ACTIVE", "INSTALLED"]:
198 main.log.info("Some bundles are not in correct state. ")
199 main.log.info("App states are: " + response)
200 stepResult = main.FALSE
201 break;
202 if (item["description"] == "Builtin device drivers") and (item["state"] != "ACTIVE"):
203 main.log.info("Driver app is not in 'ACTIVE' state, but in: " + item["state"])
204 stepResult = main.FALSE
205 break;
206 utilities.assert_equals( expect = main.TRUE, actual = stepResult,
207 onpass = "ONOS successfully started",
208 onfail = "Failed to start ONOS correctly" )
suibin zhang3b067ea2015-11-05 13:55:21 -0800209 if stepResult is main.FALSE: main.skipCase()
suibin zhangfd266fd2015-10-27 17:06:33 -0700210
Jon Hall53c5e662016-04-13 16:06:56 -0700211 main.step( "Form onos cluster using 'dependencies/onos-form-cluster' util")
suibin zhangfd266fd2015-10-27 17:06:33 -0700212 stepResult = main.FALSE
213 clcmdpath = main.params["CASE110"]["clustercmdpath"]
214 main.log.info("onos-form-cluster cmd path is: " + clcmdpath)
215 dkruser = main.params["DOCKER"]["user"]
216 dkrpasswd = main.params["DOCKER"]["password"]
217 main.ONOSbenchDocker.onosFormCluster(cmdPath = clcmdpath, onosIPs=IPlist, user=dkruser, passwd = dkrpasswd)
218 main.log.info("Wait for cluster to form with sleep time of " + str(startupSleep))
219 time.sleep(startupSleep)
suibin zhang1ab833b2016-05-12 12:10:11 -0700220 status, response = main.ONOSbenchRest.send(ip=IPlist[0], port=8181, url="/cluster")
suibin zhangfd266fd2015-10-27 17:06:33 -0700221 main.log.debug("Rest call response: " + str(status) + " - " + response)
222 if status == 200:
223 jrsp = json.loads(response)
Pratik Parabcc406452017-02-28 15:15:25 -0800224 if DOCKERTAG == "1.2" or DOCKERTAG == "1.3" or DOCKERTAG == "1.4" or DOCKERTAG == "1.5":
225 clusterIP = [item["ip"]for item in jrsp["nodes"] if item["status"]== "ACTIVE"]
226 else:
227 clusterIP = [item["ip"]for item in jrsp["nodes"] if item["status"]== "READY"]
suibin zhang3b067ea2015-11-05 13:55:21 -0800228 main.log.debug(" IPlist is:" + ",".join(IPlist))
Pratik Parabcc406452017-02-28 15:15:25 -0800229 main.log.debug(" cluster IP is" + ",".join(clusterIP))
suibin zhangfd266fd2015-10-27 17:06:33 -0700230 if set(IPlist) == set(clusterIP): stepResult = main.TRUE
231
232 utilities.assert_equals( expect = main.TRUE, actual = stepResult,
233 onpass = "ONOS successfully started",
234 onfail = "Failed to start ONOS correctly" )
suibin zhang3b067ea2015-11-05 13:55:21 -0800235 if stepResult is main.FALSE: main.skipCase()
suibin zhangfd266fd2015-10-27 17:06:33 -0700236
237 main.step( "Check cluster app status")
238 stepResult = main.TRUE
239 response = main.ONOSbenchRest.apps( ip=IPlist[0], port = 8181 )
240 if response is not main.FALSE:
241 for item in json.loads(response):
242 if item["state"] not in ["ACTIVE", "INSTALLED"]:
243 main.log.info("Some bundles are not in correct state. ")
244 main.log.info("App states are: " + response)
245 stepResult = main.FALSE
suibin zhang3b067ea2015-11-05 13:55:21 -0800246 break
suibin zhangfd266fd2015-10-27 17:06:33 -0700247 if (item["description"] == "Builtin device drivers") and (item["state"] != "ACTIVE"):
248 main.log.info("Driver app is not in 'ACTIVE' state, but in: " + item["state"])
249 stepResult = main.FALSE
suibin zhang3b067ea2015-11-05 13:55:21 -0800250 break
suibin zhangfd266fd2015-10-27 17:06:33 -0700251 utilities.assert_equals( expect = main.TRUE, actual = stepResult,
252 onpass = "ONOS successfully started",
253 onfail = "Failed to start ONOS correctly" )
suibin zhang3b067ea2015-11-05 13:55:21 -0800254 if stepResult is main.FALSE: main.skipCase()
suibin zhangfd266fd2015-10-27 17:06:33 -0700255
256 main.step(" Activate an APP from REST and check APP status")
257 appResults = list()
258 stepResult = main.TRUE
259 applist = main.params["CASE110"]["apps"].split(",")
260 main.log.info("List of apps to activate: " + str(applist) )
261 for app in applist:
suibin zhangfd266fd2015-10-27 17:06:33 -0700262 appRslt = main.ONOSbenchRest.activateApp(appName=app, ip=IPlist[0], port=8181, check=True)
suibin zhang5ae25332015-11-04 13:56:28 -0800263 time.sleep(5)
suibin zhangfd266fd2015-10-27 17:06:33 -0700264 appResults.append(appRslt)
265 stepResult = stepResult and appRslt
Pratik Parabcc406452017-02-28 15:15:25 -0800266 main.log.debug("Apps activation result for " + ",".join(applist) + ": " + str(appResults) )
suibin zhangfd266fd2015-10-27 17:06:33 -0700267 utilities.assert_equals( expect = main.TRUE, actual = stepResult,
suibin zhang1a291692015-11-04 12:14:31 -0800268 onpass = "Successfully activated apps",
269 onfail = "Failed to activated apps correctly" )
suibin zhang3b067ea2015-11-05 13:55:21 -0800270 if stepResult is main.FALSE: main.skipCase()
suibin zhangfd266fd2015-10-27 17:06:33 -0700271
272 main.step(" Deactivate an APP from REST and check APP status")
273 appResults = list()
274 stepResult = main.TRUE
275 applist = main.params["CASE110"]["apps"].split(",")
suibin zhang5ae25332015-11-04 13:56:28 -0800276 main.log.info("Apps to deactivate: " + str(applist) )
suibin zhangfd266fd2015-10-27 17:06:33 -0700277 for app in applist:
278 time.sleep(5)
279 appRslt = main.ONOSbenchRest.deactivateApp(appName=app, ip=IPlist[0], port=8181, check=True)
280 appResults.append(appRslt)
281 stepResult = stepResult and appRslt
282 main.log.debug("Apps deactivation result for " + ",".join(applist) + ": " + str(appResults) )
283 utilities.assert_equals( expect = main.TRUE, actual = stepResult,
suibin zhang1a291692015-11-04 12:14:31 -0800284 onpass = "Successfully deactivated apps",
285 onfail = "Failed to deactivated apps correctly" )
suibin zhang3b067ea2015-11-05 13:55:21 -0800286 if stepResult is main.FALSE: main.skipCase()
287
288 def CASE900(self,main):
289 """
290 Check onos logs for exceptions after tests
291 """
292 import pexpect
293 import time
294 import re
295
296 logResult = main.TRUE
297
298 user = main.params["DOCKER"]["user"]
299 pwd = main.params["DOCKER"]["password"]
300
Pratik Parabcc406452017-02-28 15:15:25 -0800301 main.case("onos Exceptions check with onos image {}".format( DOCKERTAG ))
suibin zhang3b067ea2015-11-05 13:55:21 -0800302 main.step("check onos for any exceptions")
303
304 for ip in IPlist:
suibin zhang559218e2015-12-08 14:57:12 -0800305 spawncmd = "ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no -p 8101 " + user + "@" + ip
suibin zhang3b067ea2015-11-05 13:55:21 -0800306 main.log.info("log on node using cmd: " + spawncmd)
307 try:
308 handle = pexpect.spawn(spawncmd)
suibin zhang559218e2015-12-08 14:57:12 -0800309 #handle.expect("yes/no")
310 #handle.sendline("yes")
311 #print("yes is sent")
suibin zhang126282c2015-11-30 14:21:35 -0800312 #this extra statement is sent to get around some
313 #pexpect issue of not seeing the next expected string
suibin zhang3b067ea2015-11-05 13:55:21 -0800314 handle.expect("Password:")
315 handle.sendline(pwd)
316 time.sleep(5)
317 handle.expect("onos>")
318 handle.sendline("log:exception-display")
319 handle.expect("onos>")
320 result = handle.before
321 if re.search("Exception", result):
322 main.log.info("onos: " + ip + " Exceptions:" + result)
323 logResult = logResult and main.FALSE
324 else:
325 main.log.info("onos: " + ip + " Exceptions: None")
326 logResult = logResult and main.TRUE
327 except Exception:
328 main.log.exception("Uncaught exception when getting log from onos:" + ip)
329 logResult = logResult and main.FALSE
330
331 utilities.assert_equals( expect = main.TRUE, actual = logResult,
332 onpass = "onos exception check passed",
333 onfail = "onos exeption check failed" )
suibin zhangfd266fd2015-10-27 17:06:33 -0700334
335 def CASE1000( self, main ):
336
337 """
Pratik Parabcc406452017-02-28 15:15:25 -0800338 Cleanup after tests - stop and delete the containers created; delete the image
suibin zhangfd266fd2015-10-27 17:06:33 -0700339 """
340 import time
341
suibin zhang3b067ea2015-11-05 13:55:21 -0800342 main.case("Clean up images (ex. none:none tagged) and containers")
suibin zhangfd266fd2015-10-27 17:06:33 -0700343 main.step("Stop onos containers")
344 stepResult = main.TRUE
345 for ctname in NODElist:
Pratik Parabcc406452017-02-28 15:15:25 -0800346 if main.ONOSbenchDocker.dockerCheckCTName( ctName="/" + ctname ):
347 main.log.info( "stopping docker container: /" + ctname )
348 stopResult = main.ONOSbenchDocker.dockerStopCT( ctName="/" + ctname )
suibin zhangfd266fd2015-10-27 17:06:33 -0700349 time.sleep(10)
Pratik Parabcc406452017-02-28 15:15:25 -0800350 rmResult = main.ONOSbenchDocker.dockerRemoveCT( ctName="/" + ctname )
suibin zhangfd266fd2015-10-27 17:06:33 -0700351 stepResult = stepResult and stopResult and rmResult
352 utilities.assert_equals( expect = main.TRUE, actual = stepResult,
353 onpass = "Container successfully stopped",
354 onfail = "Failed to stopped the container" )
355
356 #main.step( "remove exiting onosproject/onos images")
357 #stepResult = main.ONOSbenchDocker.dockerRemoveImage( image = DOCKERREPO + ":" + DOCKERTAG )
suibin zhang3b067ea2015-11-05 13:55:21 -0800358 main.step( "remove dangling 'none:none' images")
Pratik Parabcc406452017-02-28 15:15:25 -0800359 stepResult = main.ONOSbenchDocker.dockerRemoveImage()
suibin zhangfd266fd2015-10-27 17:06:33 -0700360 utilities.assert_equals( expect = main.TRUE, actual = stepResult,
suibin zhang3b067ea2015-11-05 13:55:21 -0800361 onpass = "Succeeded in cleaning up images",
362 onfail = "Failed in cleaning up images" )
suibin zhangfd266fd2015-10-27 17:06:33 -0700363
Pratik Parab8d884d12017-03-16 12:14:32 -0700364 def CASE1001( self, main ):
365
366 """
367 Create a file for publishing results on wiki in tabular form
368 """
369
370 main.case( "Create a file for publishing on wiki in tabular form" )
371 import re
372 imageTagCounter = 0
373 testCaseCounter = 0
374 resultCounter = 0
375 resultDictionary = {}
376 testCaseList = []
377 totalNumOfTestCases = 6
378 try:
379 main.tableFileName = main.logdir + "/" + main.TEST + "TableWiki.txt"
380 main.wikiTableFile = open(main.tableFileName, "a+")
381 main.wikiFileHandle = open(main.WikiFileName, "r")
382 for imageTag in imageTagList:
383 resultDictionary[ imageTag ] = []
384 for line in main.wikiFileHandle:
385 matchObj = re.search("(?!.*Case 0).*<h3>(.+?)<\/h3>", line)
386 if testCaseCounter < totalNumOfTestCases:
387 if matchObj:
388 wordsToRemove = re.compile("latest|- PASS|- FAIL|- No Result")
389 testCaseName = wordsToRemove.sub("", matchObj.group(1))
390 testCaseList.append(testCaseName)
391 testCaseCounter += 1
392 if matchObj:
393 if "- PASS" in line:
394 resultDictionary[ imageTagList[ imageTagCounter ] ].append("PASS")
395 if "- FAIL" in line:
396 resultDictionary[ imageTagList[ imageTagCounter ] ].append("FAIL")
397 if "- No Result" in line:
398 resultDictionary[ imageTagList[ imageTagCounter ] ].append("No Result")
399 resultCounter += 1
400 if resultCounter == totalNumOfTestCases:
401 imageTagCounter += 1
402 resultCounter = 0
403 main.wikiTableFile.write( "<table style=\"width:100%\">\n" )
404 main.wikiTableFile.write( "<tr>\n" )
405 main.wikiTableFile.write( "<th>ONOS Version</th>\n" )
406 for testCaseName in testCaseList:
407 main.wikiTableFile.write( "<th>" + testCaseName + "</th>\n" )
408 main.wikiTableFile.write( "</tr>\n" )
409 for imageTag in imageTagList:
410 main.wikiTableFile.write( "<tr>\n" )
411 main.wikiTableFile.write( "<td>" + imageTag + "</td>\n" )
412 for resultValue in resultDictionary[ imageTag ]:
413 if resultValue == "PASS":
414 emoticonValue = "\"tick\""
415 if resultValue == "FAIL":
416 emoticonValue = "\"cross\""
417 if resultValue == "No Result":
418 emoticonValue = "\"warning\""
419 main.wikiTableFile.write( "<td>" + resultValue + " <ac:emoticon ac:name=" + emoticonValue + " /></td>\n" )
420 main.wikiTableFile.write( "</tr>\n" )
421 main.wikiTableFile.write( "</table>\n" )
422 main.wikiTableFile.close()
423 main.wikiFileHandle.close()
424 logResult = main.TRUE
425 except Exception:
426 main.log.exception( "Exception while writing to the table file" )
427 logResult = main.FALSE
428 utilities.assert_equals( expect = main.TRUE, actual = logResult,
429 onpass = "onos exception check passed",
430 onfail = "onos exception check failed" )