Tidy new and updated test suites
[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 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 FlowTableMetrics
24     [Documentation]    Verify the TSDR FlowTableMetrics
25     Wait Until Keyword Succeeds    120s    1s    Verify the Metric is Collected?    ${TSDR_FLOWTABLE_STATS}    openflow
26     ${output}=    Issue Command On Karaf Console    ${TSDR_FLOWTABLE_STATS}    ${ODL_SYSTEM_IP}    ${KARAF_SHELL_PORT}    30
27     Should Contain    ${output}    openflow
28
29 Verification of FlowTableMetrics on Karaf Console
30     [Documentation]    Verify the FlowTableMetrics has been updated thru tsdr:list command on karaf console
31     ${tsdr_cmd}=    Concatenate the String    ${TSDR_FLOWTABLE_STATS}    | grep ActiveFlows | head
32     ${output}=    Issue Command On Karaf Console    ${tsdr_cmd}    ${ODL_SYSTEM_IP}    ${KARAF_SHELL_PORT}    90
33     Should Contain    ${output}    ActiveFlows
34
35 Verification of FlowTableMetrics-ActiveFlows on HBase Client
36     [Documentation]    Verify the FlowTableMetrics has been updated on HBase Datastore
37     Verify the Metrics Attributes on Hbase Client    ActiveFlows    ${node_connector}    ${flowtablestats}
38
39 Verification of FlowTableMetrics-PacketMatch on HBase Client
40     [Documentation]    Verify the FlowTableMetrics has been updated on HBase Datastore
41     Verify the Metrics Attributes on Hbase Client    PacketMatch    ${node_connector}    ${flowtablestats}
42
43 Verification of FlowTableMetrics-PacketLookup on HBase Client
44     [Documentation]    Verify the FlowTableMetrics has been updated on HBase Datastore
45     Verify the Metrics Attributes on Hbase Client    PacketLookup    ${node_connector}    ${flowtablestats}
46
47 *** Keywords ***
48 Init Variables Master
49     [Documentation]    Sets variables specific to latest(master) version
50     Set Suite Variable    ${TSDR_FLOWSTATS}    tsdr:list FLOWTABLESTATS
51     set Suite Variable    ${node_connector}    Node:openflow:1,Table:0
52     set suite Variable    ${flowtablestats}    FLOWTABLESTATS
53
54 Init Variables Lithium
55     [Documentation]    Sets variables specific to Lithium version
56     Set Suite Variable    ${TSDR_FLOWSTATS}    tsdr:list FlowTableStats
57     set Suite Variable    ${node_connector}    openflow:1_0
58     set suite Variable    ${flowtablestats}    FlowTableMetrics