X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;ds=sidebyside;f=csit%2Flibraries%2FSSHKeywords.robot;h=62e7c727b7b2d4d46ebb8f703269b1f492e15f5b;hb=2794ebf3d533fff33b0c79e7eae7b1954b6c393f;hp=179933daaf3c8bb8afd66ae20b8a08ee40b482cd;hpb=967f534f762ce38f7cf2f1bb1139a8d9ab4205c0;p=integration%2Ftest.git diff --git a/csit/libraries/SSHKeywords.robot b/csit/libraries/SSHKeywords.robot index 179933daaf..62e7c727b7 100644 --- a/csit/libraries/SSHKeywords.robot +++ b/csit/libraries/SSHKeywords.robot @@ -1,13 +1,13 @@ *** Settings *** Documentation Resource enhancing SSHLibrary with Keywords used in multiple suites. -... +... ... Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved. -... +... ... This program and the accompanying materials are made available under the ... terms of the Eclipse Public License v1.0 which accompanies this distribution, ... and is available at http://www.eclipse.org/legal/epl-v10.html -... -... +... +... ... Some suites evolved utility Keywords re-usable with other suites. ... When the Keywords assume a SSH session is active, ... and if the Keywords do not fit into a more specific Resource, @@ -143,7 +143,7 @@ Assure_Library_Ipaddr [Documentation] Tests whether ipaddr module is present on ssh-connected machine, Puts ipaddr.py to target_dir if not. ${passed} = Execute_Command_Passes bash -c 'cd "${target_dir}" && python -c "import ipaddr"' BuiltIn.Return_From_Keyword_If ${passed} - SSHLibrary.Put_File ${CURDIR}/ipaddr.py ${target_dir}/ + SSHLibrary.Put_File ${CURDIR}/BGPCEP/ipaddr.py ${target_dir}/ Assure_Library_Counter [Arguments] ${target_dir}=. @@ -165,9 +165,10 @@ Virtual_Env_Set_Path BuiltIn.Set_Global_Variable \${SSHKeywords__current_venv_path} ${venv_path} Virtual_Env_Create + [Arguments] ${upgrade_pip}=True [Documentation] Creates virtual env. If not to use the default name, use Virtual_Env_Set_Path kw. Returns stdout. Execute_Command_At_Cwd_Should_Pass virtualenv ${SSHKeywords__current_venv_path} - BuiltIn.Run_Keyword_And_Return Virtual_Env_Run_Cmd_At_Cwd pip install --upgrade pip + BuiltIn.Run_Keyword_And_Return_If ${upgrade_pip} Virtual_Env_Run_Cmd_At_Cwd pip install --upgrade pip stderr_must_be_empty=False Virtual_Env_Delete [Documentation] Deletes a directory with virtual env. @@ -186,11 +187,11 @@ Virtual_Env_Install_Package Virtual_Env_Uninstall_Package [Arguments] ${package} [Documentation] Uninstalls python package from virtual env and returns stdout. - BuiltIn.Run_Keyword_And_Return Virtual_Env_Run_Cmd_At_Cwd pip uninstall -y ${package} + BuiltIn.Run_Keyword_And_Return Virtual_Env_Run_Cmd_At_Cwd pip uninstall -y ${package} stderr_must_be_empty=False Virtual_Env_Freeze [Documentation] Shows installed packages within the returned stdout. - BuiltIn.Run_Keyword_And_Return Virtual_Env_Run_Cmd_At_Cwd pip freeze --all + BuiltIn.Run_Keyword_And_Return Virtual_Env_Run_Cmd_At_Cwd pip freeze --all stderr_must_be_empty=False Virtual_Env_Activate_On_Current_Session [Arguments] ${log_output}=${False}