Redefinition of checkOnosLog method and modified .topo to use correct driver
diff --git a/TestON/tests/FuncPlatform/Dependency/Logger.py b/TestON/tests/FuncPlatform/Dependency/Logger.py
index b4558b5..22d3f61 100644
--- a/TestON/tests/FuncPlatform/Dependency/Logger.py
+++ b/TestON/tests/FuncPlatform/Dependency/Logger.py
@@ -2,27 +2,33 @@
def __init__( self ):
self.ip = '127.0.0.1'
-def getOnosLog( nodeIp, option='grep \'ERROR\' \| \'WARN\'',
+def checkOnosLog( nodeIp, option='',
outputType=0):
"""
- Specify grep command to listen for in onos log
+ Listens to the log for any Errors and Exceptions.
Runs 'onos-check-logs <option>'
-
+ This script only returns if there are any errors
+ or exceptions
+
outputType
0: Return output of log
1: Return (#Errors, #Exceptions, #Warn)
"""
- main.log.info( 'Starting Onos-log listening for '+str(option) )
if not isinstance( option, basestring ):
main.log.error( 'Incorrect grep format specified' )
return main.FALSE
try:
- cmd = 'onos-check-logs ' + str(nodeIp) + ' | ' + option
+ main.log.info( 'Starting Onos-log listening for '+
+ str(option) )
+ cmd = 'onos-check-logs ' + str(nodeIp) + ' old'
if outputType == 0:
- logResult = main.ONOSnode[0].handle.sendline( cmd )
+ main.ONOSbench.handle.sendline( cmd )
+ main.ONOSbench.handle.expect( cmd )
+ main.ONOSbench.handle.expect('\$')
+ logResult = main.ONOSbench.handle.before
return logResult
elif outputType == 1:
# Important in assertion criteria
@@ -44,4 +50,8 @@
"""
main.log.info( 'setLogLevel implement me' )
-
+def getLogReport( nodeIp, searchTerms ):
+ """
+ Refer to CLI driver for 'logReport'
+ """
+ main.log.info( 'getLogReport - implement me!' )