Step 1: Move vm scripts to the right place
[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 Verification of TSDR FlowTableMetrics
18     [Documentation]    Verify the TSDR FlowTableMetrics
19     Wait Until Keyword Succeeds    120s    1s    Verify the Metric is Collected?    ${TSDR_FLOWTABLE_STATS}    MetricName
20     ${output}=    Issue Command On Karaf Console    ${TSDR_FLOWTABLE_STATS}    ${CONTROLLER}    ${KARAF_SHELL_PORT}    30
21     Should Contain    ${output}    MetricName
22
23 Verification of FlowTableMetrics on Karaf Console
24     [Documentation]    Verify the FlowTableMetrics has been updated thru tsdr:list command on karaf console
25     ${tsdr_cmd}=    Concatenate the String    ${TSDR_FLOWTABLE_STATS}    | grep ActiveFlows | head
26     ${output}=    Issue Command On Karaf Console    ${tsdr_cmd}    ${CONTROLLER}    ${KARAF_SHELL_PORT}    90
27     Should Contain    ${output}    ActiveFlows
28
29 Verification of FlowTableMetrics-ActiveFlows on HBase Client
30     [Documentation]    Verify the FlowTableMetrics has been updated on HBase Datastore
31     ${query}=    Generate HBase Query    FlowTableMetrics    ActiveFlows_openflow:1_0
32     ${out}=    Query the Data from HBaseClient    ${query}
33     Should Match Regexp    ${out}    (?mui)ActiveFlows_openflow
34
35 Verification of FlowTableMetrics-PacketMatch on HBase Client
36     [Documentation]    Verify the FlowTableMetrics has been updated on HBase Datastore
37     ${query}=    Generate HBase Query    FlowTableMetrics    PacketMatch_openflow:1_0_
38     ${out}=    Query the Data from HBaseClient    ${query}
39     Should Match Regexp    ${out}    (?mui)PacketMatch_openflow
40
41 Verification of FlowTableMetrics-PacketLookup on HBase Client
42     [Documentation]    Verify the FlowTableMetrics has been updated on HBase Datastore
43     ${query}=    Generate HBase Query    FlowTableMetrics    PacketLookup_openflow:1_0_
44     ${out}=    Query the Data from HBaseClient    ${query}
45     Should Match Regexp    ${out}    (?mui)PacketLookup_openfl