Modified HBase scripts to run in Lithium Branch.
[integration/test.git] / csit / suites / tsdr / HSQLDB / 030_FlowTableMetrics.robot
1 *** Settings ***
2 Documentation     Test suite for HSQLDB DataStore Flow Table 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 @{FLOWTABLE_METRICS}    ActiveFlows    PacketLookup    PacketMatch
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 Verification of TSDR FLOWTABLESTATS
24     [Documentation]    Verify the TSDR FlowiTableStats
25     Wait Until Keyword Succeeds    60s    1s    Verify the Metric is Collected?    ${TSDR_FLOWTABLE_STATS}| grep ActiveFlow | grep openflow:1    FLOWTABLESTATS
26     ${output}=    Issue Command On Karaf Console    ${TSDR_FLOWTABLE_STATS}| grep openflow:1 | head    ${ODL_SYSTEM_IP}    ${KARAF_SHELL_PORT}    180
27     : FOR    ${list}    IN    @{FLOWTABLE_METRICS}
28     \    Should Contain    ${output}    ${list}
29
30 *** Keywords ***
31 Init Variables Master
32     [Documentation]    Sets variables specific to latest(master) version
33     Set Suite Variable    ${TSDR_FLOWTABLE_STATS}    tsdr:list FLOWTABLESTATS
34
35 Init Variables Lithium
36     [Documentation]    Sets variables specific to Lithium version
37     Set Suite Variable    ${TSDR_FLOWTABLE_STATS}    tsdr:list FlowTableStats
38