- BuiltIn.Log ${password}
- BuiltIn.Run Keyword And Return Run Command On Remote System ${system} ${cmd} ${user} ${password} prompt=${prompt}
+ [Arguments] ${system}=${ODL_SYSTEM_IP} ${cmd}=echo ${user}=${ODL_SYSTEM_USER} ${password}=${ODL_SYSTEM_PASSWORD} ${prompt}=${ODL_SYSTEM_PROMPT}
+ BuiltIn.Run Keyword And Return
+ ... Run Command On Remote System
+ ... ${system}
+ ... ${cmd}
+ ... ${user}
+ ... ${password}
+ ... prompt=${prompt}
+
+Run Command On Existing Connection
+ [Documentation] Switch to and run command on an already existing SSH connection and switch back
+ [Arguments] ${conn_id}=${EMPTY} ${cmd}=echo ${return_stdout}=True ${return_stderr}=False
+ IF "${return_stdout}"!="True" and "${return_stderr}"!="True"
+ Fail At least one of {return_stdout} or {return_stderr} args should be set to True
+ END
+ ${current_ssh_connection}= SSHLibrary.Get Connection
+ BuiltIn.Log Attempting to execute command "${cmd}" on existing connection "${conn_id}
+ SSHLibrary.Switch Connection ${conn_id}
+ ${stdout} ${stderr}= SSHLibrary.Execute Command ${cmd} return_stderr=True
+ Log ${stderr}
+ IF "${return_stdout}"!="True" RETURN ${stderr}
+ IF "${return_stderr}"!="True" RETURN ${stdout}
+ RETURN ${stdout} ${stderr}
+ [Teardown] SSHKeywords.Restore_Current_SSH_Connection_From_Index ${current_ssh_connection.index}