Add potassium stream keywords
[integration/test.git] / csit / libraries / ToolsSystem.robot
1 *** Settings ***
2 Documentation       Library for the tools system nodes.
3
4 Library             Collections
5 Library             SSHLibrary
6 Resource            Utils.robot
7 Resource            ../variables/Variables.robot
8
9
10 *** Variables ***
11 @{TOOLS_SYSTEM_ALL_IPS}         @{EMPTY}
12 @{TOOLS_SYSTEM_ALL_CONN_IDS}    @{EMPTY}
13
14
15 *** Keywords ***
16 Get Tools System Nodes Data
17     FOR    ${i}    IN RANGE    1    ${NUM_TOOLS_SYSTEM} + 1
18         ${ip} =    BuiltIn.Set Variable    ${TOOLS_SYSTEM_${i}_IP}
19         Collections.Append To List    ${TOOLS_SYSTEM_ALL_IPS}    ${ip}
20         ${conn_id} =    SSHLibrary.Open Connection    ${ip}    prompt=${DEFAULT_LINUX_PROMPT}    timeout=30s
21         Collections.Append To List    ${TOOLS_SYSTEM_ALL_CONN_IDS}    ${conn_id}
22     END
23
24 Run Command On All Tools Systems
25     [Documentation]    Run command on all tools systems
26     [Arguments]    ${cmd}
27     FOR    ${ip}    IN    @{TOOLS_SYSTEM_ALL_IPS}
28         Utils.Run Command On Remote System    ${ip}    ${cmd}
29     END