Added an option in the sendline wrapper function to print out the response from onos. This option is set to true by default.
Change-Id: Ibaab89c0786792e4ddd52c40a42c0e8972b71c4a
diff --git a/TestON/drivers/common/cli/onosclidriver.py b/TestON/drivers/common/cli/onosclidriver.py
index 22b966b..f29656e 100644
--- a/TestON/drivers/common/cli/onosclidriver.py
+++ b/TestON/drivers/common/cli/onosclidriver.py
@@ -331,7 +331,7 @@
main.cleanup()
main.exit()
- def sendline( self, cmdStr, debug=False ):
+ def sendline( self, cmdStr, showResponse=True, debug=False ):
"""
Send a completely user specified string to
the onos> prompt. Use this function if you have
@@ -388,7 +388,10 @@
main.log.debug( self.name + ": split output" )
for r in output:
main.log.debug( self.name + ": " + repr( r ) )
- return output[1].strip()
+ output = output[1].strip()
+ if showResponse:
+ main.log.info( "Resonse from ONOS: {}".format( output ) )
+ return output
except IndexError:
main.log.exception( self.name + ": Object not as expected" )
return None
@@ -4117,7 +4120,6 @@
main.log.error( response )
return main.FALSE
- main.log.info( response )
return main.TRUE
except TypeError: