X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=csit%2Flibraries%2FSSHKeywords.robot;h=c3f1078ed4016a2361acf5945dcbee3dcf3c8019;hb=2753d6d4a6bd7a7b98318f3314d52a252629a6c1;hp=2b83a592f6a1723ee4eaab7a250827d9ce2f568f;hpb=d2a6a75d07d4f2111d0067c1c392461fa069f956;p=integration%2Ftest.git diff --git a/csit/libraries/SSHKeywords.robot b/csit/libraries/SSHKeywords.robot index 2b83a592f6..c3f1078ed4 100644 --- a/csit/libraries/SSHKeywords.robot +++ b/csit/libraries/SSHKeywords.robot @@ -251,3 +251,22 @@ Flexible_Controller_Login [Arguments] ${user}=${ODL_SYSTEM_USER} ${password}=${ODL_SYSTEM_PASSWORD} ${delay}=0.5s [Documentation] Call Flexible SSH Login, but with default values suitable for Controller machine. BuiltIn.Run Keyword And Return Flexible SSH Login user=${user} password=${password} delay=${delay} + +Move_File_To_Remote_System + [Arguments] ${system} ${source} ${destination}=./ ${user}=${DEFAULT_USER} ${password}=${DEFAULT_PASSWORD} ${prompt}=${DEFAULT_LINUX_PROMPT} + ... ${prompt_timeout}=5s + [Documentation] Moves the ${source} file to the ${destination} file on the remote ${system}. Any pre-existing active + ... ssh connection will be retained. + SSHKeywords.Run_Keyword_Preserve_Connection Unsafe_Move_File_To_Remote_System ${system} ${source} ${destination} ${user} ${password} + ... ${prompt} ${prompt_timeout} + +Unsafe_Move_File_To_Remote_System + [Arguments] ${system} ${source} ${destination}=./ ${user}=${DEFAULT_USER} ${password}=${DEFAULT_PASSWORD} ${prompt}=${DEFAULT_LINUX_PROMPT} + ... ${prompt_timeout}=5s + [Documentation] Moves the ${source} file to the ${destination} file on the remote ${system}. The keyword opens and closes a single + ... ssh connection and does not rely on any existing ssh connection that may be open. + SSHLibrary.Open_Connection ${system} prompt=${prompt} timeout=${prompt_timeout} + Flexible_SSH_Login ${user} ${password} + SSHLibrary.Put File ${source} ${destination} + OperatingSystem.Remove File ${source} + SSHLibrary.Close Connection