Modified HBase scripts to run in Lithium Branch.
[integration/test.git] / csit / suites / tsdr / HBase / 030_FlowTableMetrics.robot
1 *** Settings ***
2 Documentation     Test suite for Hbase DataStore Flow Table Stats 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 ${TSDR_FLOWTABLE_STATS}    tsdr:list FLOWTABLESTATS
15
16 *** Test Cases ***
17
18 Init Variables
19     [Documentation]    Initialize ODL version specific variables
20     log    ${ODL_VERSION}
21     Run Keyword If    '${ODL_VERSION}' == 'stable-lithium'    Init Variables Lithium
22     ...    ELSE    Init Variables Master
23
24 Verification of TSDR FlowTableMetrics
25     [Documentation]    Verify the TSDR FlowTableMetrics
26     Wait Until Keyword Succeeds    120s    1s    Verify the Metric is Collected?    ${TSDR_FLOWTABLE_STATS}    openflow
27     ${output}=    Issue Command On Karaf Console    ${TSDR_FLOWTABLE_STATS}    ${ODL_SYSTEM_IP}    ${KARAF_SHELL_PORT}    30
28     Should Contain    ${output}    openflow
29
30 Verification of FlowTableMetrics on Karaf Console
31     [Documentation]    Verify the FlowTableMetrics has been updated thru tsdr:list command on karaf console
32     ${tsdr_cmd}=    Concatenate the String    ${TSDR_FLOWTABLE_STATS}    | grep ActiveFlows | head
33     ${output}=    Issue Command On Karaf Console    ${tsdr_cmd}    ${ODL_SYSTEM_IP}    ${KARAF_SHELL_PORT}    90
34     Should Contain    ${output}    ActiveFlows
35
36 Verification of FlowTableMetrics-ActiveFlows on HBase Client
37     [Documentation]    Verify the FlowTableMetrics has been updated on HBase Datastore
38     Verify the Metrics Attributes on Hbase Client    ActiveFlows    ${node_connector}    ${flowtablestats}
39
40 Verification of FlowTableMetrics-PacketMatch on HBase Client
41     [Documentation]    Verify the FlowTableMetrics has been updated on HBase Datastore
42     Verify the Metrics Attributes on Hbase Client    PacketMatch    ${node_connector}    ${flowtablestats}
43
44 Verification of FlowTableMetrics-PacketLookup on HBase Client
45     [Documentation]    Verify the FlowTableMetrics has been updated on HBase Datastore
46     Verify the Metrics Attributes on Hbase Client    PacketLookup    ${node_connector}    ${flowtablestats}
47
48 *** Keywords ***
49
50 Init Variables Master
51     [Documentation]    Sets variables specific to latest(master) version
52     Set Suite Variable    ${TSDR_FLOWSTATS}    tsdr:list FLOWTABLESTATS
53     set Suite Variable    ${node_connector}    Node:openflow:1,Table:0
54     set suite Variable    ${flowtablestats}    FLOWTABLESTATS
55
56 Init Variables Lithium
57     [Documentation]    Sets variables specific to Lithium version
58     Set Suite Variable    ${TSDR_FLOWSTATS}    tsdr:list FlowTableStats
59     set Suite Variable    ${node_connector}    openflow:1_0
60     set suite Variable    ${flowtablestats}    FlowTableMetrics
61