Added Perf Test Plan and droptest config from robot
[integration/test.git] / test / csit / libraries / KarafKeywords.txt
1 *** Settings ***
2 Library           OperatingSystem
3
4 *** Variables ***
5 ${karaf_shell_port}     8101
6
7 *** Keywords ***
8 Verify Feature Is Installed
9     [Documentation]     Will Succeed if the given ${feature_name} is found in the output of "feature:list -i"
10     [Arguments]     ${feature_name}     ${controller}=${CONTROLLER}     ${karaf_port}=${karaf_shell_port}
11     ${output}=  Issue Command On Karaf Console  feature:list -i     ${controller}   ${karaf_port}
12     Should Contain  ${output}   ${feature_name}
13
14 Verify Feature Is Not Installed
15     [Documentation]     Will Succeed if the given ${feature_name} is NOT found in the output of "feature:list -i"
16     [Arguments]     ${feature_name}     ${controller}=${CONTROLLER}     ${karaf_port}=${karaf_shell_port}
17     ${output}=  Issue Command On Karaf Console  feature:list -i     ${controller}   ${karaf_port}
18     Should Not Contain  ${output}   ${feature_name}
19
20 Issue Command On Karaf Console
21     [Documentation]     Will execute the given ${cmd} by ssh'ing to the karaf console running on ${CONTROLLER}
22     [Arguments]     ${cmd}     ${controller}=${CONTROLLER}     ${karaf_port}=${karaf_shell_port}
23     ${output}=  Run     sshpass -p karaf ssh -p ${karaf_port} -o StrictHostKeyChecking=no karaf@${controller} ${cmd}
24     Log     ${output}
25     [Return]    ${output}