Make karaf logout more stable
[integration/test.git] / csit / libraries / SSHKeywords.robot
index 62e7c727b7b2d4d46ebb8f703269b1f492e15f5b..adfefcc5211f1c0cd2d6ffcc2abca39581f6b1cf 100644 (file)
@@ -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,
@@ -170,6 +170,12 @@ Virtual_Env_Create
     Execute_Command_At_Cwd_Should_Pass    virtualenv ${SSHKeywords__current_venv_path}
     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_Create_Python3
+    [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    python3 -m venv ${SSHKeywords__current_venv_path}
+    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.
     Execute_Command_At_Cwd_Should_Pass    rm -rf ${SSHKeywords__current_venv_path}