Modified HBase scripts to run in Lithium Branch.
[integration/test.git] / csit / suites / tsdr / HSQLDB / 020_FlowMetrics.robot
1 *** Settings ***
2 Documentation     Test suite for HSQLDB DataStore Flow Metrics Verification
3 Suite Setup       Start Tsdr Suite
4 Suite Teardown    Stop Tsdr Suite
5 Library           SSHLibrary
6 Library           Collections
7 Library           String
8 Library           ../../../libraries/Common.py
9 Resource          ../../../libraries/KarafKeywords.robot
10 Resource          ../../../libraries/TsdrUtils.robot
11 Variables         ../../../variables/Variables.py
12
13 *** Variables ***
14 @{FLOW_METRICS}    PacketCount    ByteCount
15
16 *** Test Cases ***
17 Init Variables
18     [Documentation]    Initialize ODL version specific variables
19     log    ${ODL_VERSION}
20     Run Keyword If    '${ODL_VERSION}' == 'stable-lithium'    Init Variables Lithium
21     ...    ELSE    Init Variables Master
22
23
24 Verification of TSDR FlowMetrics
25     [Documentation]    Verify the TSDR FLOWSTATS
26     Wait Until Keyword Succeeds    60s    1s    Verify the Metric is Collected?    ${TSDR_FLOWSTATS}    PacketCount
27     ${output}=    Issue Command On Karaf Console    ${TSDR_FLOWSTATS}    ${ODL_SYSTEM_IP}    ${KARAF_SHELL_PORT}    30
28     : FOR    ${list}    IN    @{FLOW_METRICS}
29     \    Should Contain    ${output}    ${list}
30
31 *** Keywords ***
32 Init Variables Master
33     [Documentation]    Sets variables specific to latest(master) version
34     Set Suite Variable    ${TSDR_FLOWSTATS}    tsdr:list FLOWSTATS
35
36 Init Variables Lithium
37     [Documentation]    Sets variables specific to Lithium version
38     Set Suite Variable    ${TSDR_FLOWSTATS}    tsdr:list FlowStats