X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=csit%2Flibraries%2FUtils.robot;h=13b1dd1b29db890d5f4c5de847c1a6e231ef6446;hb=54103bf3035e1dd427431592e75332e39b117ed5;hp=4d57d466f90a3c4c43c4c78adba50f7a8419e135;hpb=ca0dbbfe82022e20c8ed448e35e050f8ee843313;p=integration%2Ftest.git diff --git a/csit/libraries/Utils.robot b/csit/libraries/Utils.robot index 4d57d466f9..13b1dd1b29 100644 --- a/csit/libraries/Utils.robot +++ b/csit/libraries/Utils.robot @@ -232,12 +232,14 @@ Run Command On Remote System [Documentation] Reduces the common work of running a command on a remote system to a single higher level ... robot keyword, taking care to log in with a public key and. The command given is written ... and the output returned. No test conditions are checked. - Log Attempting to execute ${cmd} on ${system} by ${user} with ${keyfile_pass} and ${prompt} + ${current_ssh_connection}= SSHLibrary.Get Connection + Log Attempting to execute command "${cmd}" on remote system "${system}" by user "${user}" with keyfile pass "${keyfile_pass}" and prompt "${prompt}" ${conn_id}= SSHLibrary.Open Connection ${system} prompt=${prompt} timeout=${prompt_timeout} Flexible SSH Login ${user} ${password} ${stdout} ${stderr} SSHLibrary.Execute Command ${cmd} return_stderr=True SSHLibrary.Close Connection Log ${stderr} + [Teardown] KarafKeywords.Restore_Current_SSH_Connection_From_Index ${current_ssh_connection.index} [Return] ${stdout} Write_Bare_Ctrl_C @@ -482,7 +484,7 @@ Convert_To_Minutes [Return] ${minutes} Write Commands Until Expected Prompt - [Arguments] ${cmd} ${prompt} ${timeout}=${DEFAULT_TIMEOUT} + [Arguments] ${cmd} ${prompt} ${timeout}=30s [Documentation] quick wrapper for Write and Read Until Prompt Keywords to make test cases more readable SSHLibrary.Set Client Configuration timeout=${timeout} SSHLibrary.Write ${cmd} @@ -490,11 +492,10 @@ Write Commands Until Expected Prompt [Return] ${output} Install Package On Ubuntu System - [Arguments] ${package_name} ${system}=${TOOLS_SYSTEM_IP} ${user}=${TOOLS_SYSTEM_USER} ${password}=${TOOLS_SYSTEM_PASSWORD} ${prompt}=${DEFAULT_LINUX_PROMPT} - ... ${prompt_timeout}=30s + [Arguments] ${package_name} ${system}=${TOOLS_SYSTEM_IP} ${user}=${TOOLS_SYSTEM_USER} ${password}=${TOOLS_SYSTEM_PASSWORD} ${prompt}=${DEFAULT_LINUX_PROMPT} ${prompt_timeout}=30s [Documentation] Keyword to install packages for testing to Ubuntu Mininet VM Log Keyword to install package to Mininet Ubuntu VM Open Connection ${system} prompt=${prompt} timeout=${prompt_timeout} Flexible Mininet Login user=${user} password=${password} Write sudo apt-get install -y ${package_name} - Read Until ${prompt} + Read Until ${prompt}