Update Robot Framework format - step 15
[integration/test.git] / csit / suites / tsdr / HBase / 030_FlowTableMetrics.robot
1 *** Settings ***
2 Documentation       Test suite for Hbase DataStore Flow Table Stats Verification
3
4 Library             SSHLibrary
5 Library             Collections
6 Library             String
7 Library             ../../../libraries/Common.py
8 Resource            ../../../libraries/CompareStream.robot
9 Resource            ../../../libraries/KarafKeywords.robot
10 Resource            ../../../libraries/TsdrUtils.robot
11 Variables           ../../../variables/Variables.py
12
13 Suite Setup         Start Tsdr Suite
14 Suite Teardown      Stop Tsdr Suite
15
16
17 *** Variables ***
18 ${TSDR_FLOWTABLE_STATS}     tsdr:list FLOWTABLESTATS
19
20
21 *** Test Cases ***
22 Init Variables
23     [Documentation]    Initialize ODL version specific variables using resource CompareStream.
24     Init Variables Master
25
26 Verification of TSDR FlowTableMetrics
27     [Documentation]    Verify the TSDR FlowTableMetrics
28     Wait Until Keyword Succeeds    120s    1s    Verify the Metric is Collected?    ${TSDR_FLOWTABLE_STATS}    openflow
29     ${output}=    Issue Command On Karaf Console
30     ...    ${TSDR_FLOWTABLE_STATS}
31     ...    ${ODL_SYSTEM_IP}
32     ...    ${KARAF_SHELL_PORT}
33     ...    30
34     Should Contain    ${output}    openflow
35
36 Verification of FlowTableMetrics on Karaf Console
37     [Documentation]    Verify the FlowTableMetrics has been updated thru tsdr:list command on karaf console
38     ${tsdr_cmd}=    Concatenate the String    ${TSDR_FLOWTABLE_STATS}    | grep ActiveFlows | head
39     ${output}=    Issue Command On Karaf Console    ${tsdr_cmd}    ${ODL_SYSTEM_IP}    ${KARAF_SHELL_PORT}    90
40     Should Contain    ${output}    ActiveFlows
41
42 Verification of FlowTableMetrics-ActiveFlows on HBase Client
43     [Documentation]    Verify the FlowTableMetrics has been updated on HBase Datastore
44     Verify the Metrics Attributes on Hbase Client    ActiveFlows    ${node_connector}    ${flowtablestats}
45
46 Verification of FlowTableMetrics-PacketMatch on HBase Client
47     [Documentation]    Verify the FlowTableMetrics has been updated on HBase Datastore
48     Verify the Metrics Attributes on Hbase Client    PacketMatch    ${node_connector}    ${flowtablestats}
49
50 Verification of FlowTableMetrics-PacketLookup on HBase Client
51     [Documentation]    Verify the FlowTableMetrics has been updated on HBase Datastore
52     Verify the Metrics Attributes on Hbase Client    PacketLookup    ${node_connector}    ${flowtablestats}
53
54
55 *** Keywords ***
56 Init Variables Master
57     [Documentation]    Sets variables specific to latest(master) version
58     Set Suite Variable    ${TSDR_FLOWSTATS}    tsdr:list FLOWTABLESTATS
59     set Suite Variable    ${node_connector}    Node:openflow:1,Table:0
60     set suite Variable    ${flowtablestats}    FLOWTABLESTATS