Updating test for TOST QA Pod
Add more robust topology check to Segment routing tests
Fix Typos
Include minimum flow count # in the comparision (>= vs > )
Add option for username and password in onos-app function
Don't add app prefix if it looks like it is already the full name
Change-Id: Ib4af0f72df8e7dcc5c179fafea1fd9c61d931246
(cherry picked from commit cda0902ee85041b22da8ad7638a8518914d07322)
diff --git a/TestON/drivers/common/clidriver.py b/TestON/drivers/common/clidriver.py
index 928db71..3083f44 100644
--- a/TestON/drivers/common/clidriver.py
+++ b/TestON/drivers/common/clidriver.py
@@ -274,7 +274,7 @@
timeout=120 )
def secureCopy( self, userName, ipAddress, filePath, dstPath, pwd="",
- direction="from" ):
+ direction="from", options="" ):
"""
Definition:
Execute scp command in linux to copy to/from a remote host
@@ -294,12 +294,13 @@
ssh_newkey = 'Are you sure you want to continue connecting'
refused = "ssh: connect to host " + \
ipAddress + " port 22: Connection refused"
+ cmd = "scp %s " % options
if direction == "from":
- cmd = 'scp ' + str( userName ) + '@' + str( ipAddress ) + ':' + \
+ cmd = cmd + str( userName ) + '@' + str( ipAddress ) + ':' + \
str( filePath ) + ' ' + str( dstPath )
elif direction == "to":
- cmd = 'scp ' + str( filePath ) + ' ' + str( userName ) + \
+ cmd = cmd + str( filePath ) + ' ' + str( userName ) + \
'@' + str( ipAddress ) + ':' + str( dstPath )
else:
main.log.debug( "Wrong direction using secure copy command!" )
@@ -337,9 +338,11 @@
returnVal = main.FALSE
elif i == 4: # File Not found
main.log.error( self.name + ": No such file found" )
+ main.log.debug( self.handle.before + self.handle.after )
returnVal = main.FALSE
elif i == 5: # Permission denied
main.log.error( self.name + ": Permission denied. Check folder permissions" )
+ main.log.debug( self.handle.before + self.handle.after )
returnVal = main.FALSE
elif i == 6: # prompt returned
return returnVal
@@ -356,7 +359,7 @@
self.handle.expect( self.prompt )
return returnVal
- def scp( self, remoteHost, filePath, dstPath, direction="from" ):
+ def scp( self, remoteHost, filePath, dstPath, direction="from", options="" ):
"""
Definition:
Execute scp command in linux to copy to/from a remote host
@@ -375,7 +378,8 @@
filePath,
dstPath,
pwd=remoteHost.pwd,
- direction=direction )
+ direction=direction,
+ options=options )
def sshToNode( self, ipAddress, uName="sdn", pwd="rocks" ):
ssh_newkey = 'Are you sure you want to continue connecting'