Integration tests for GBP
[integration/test.git] / csit / suites / groupbasedpolicy / GBP / 3-node / GBP_3node.robot
1 *** Settings ***
2 Library           SSHLibrary
3 Resource          Variables.robot
4 Resource          ../../../../libraries/Utils.robot
5 Resource          ../../../../libraries/GBP/ConnUtils.robot
6 Variables         ../../../../variables/Variables.py
7
8
9 *** Keywords ***
10
11 Setup Node
12     [Arguments]    ${GBP}    ${suite_dir}    ${sw_index}    ${timeout}=10s
13     ConnUtils.Connect and Login    ${GBP}    timeout=${timeout}
14     SSHLibrary.Put File    ${suite_dir}/init_scripts/*    ${VM_HOME_FOLDER}${/}${VM_SCRIPTS_FOLDER}/    mode=0755
15     ${stdout}    ${stderr}    ${rc}    Execute in VE    python ${VM_HOME_FOLDER}${/}${VM_SCRIPTS_FOLDER}/infrastructure_launch.py ${CONTROLLER} ${sw_index}
16     ...    timeout=${timeout}
17     Should Be Equal As Numbers    ${rc}    0
18     SSHLibrary.Close Connection
19
20 Teardown Node
21     [Arguments]    ${GBP}    ${suite_dir}    ${timeout}=3s
22     ConnUtils.Connect and Login    ${GBP}    timeout=${timeout}
23     ${stderr}    SSHLibrary.Execute Command    rm ${VM_HOME_FOLDER}${/}${VM_SCRIPTS_FOLDER}/infrastructure_config.py
24     ...    return_stderr=True    return_stdout=False
25     Should Be Empty    ${stderr}
26     ${stderr}    SSHLibrary.Execute Command    ${VM_HOME_FOLDER}${/}${VM_SCRIPTS_FOLDER}/clean-demo.sh
27     ...    return_stderr=True    return_stdout=False
28     Should Be Empty    ${stderr}
29     SSHLibrary.Close Connection
30