Update Robot Framework format - step 15
[integration/test.git] / csit / suites / tsdr / HBase / 020_FlowMetrics.robot
1 *** Settings ***
2 Documentation       Test suite for Hbase DataStore Flow 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 @{FLOW_METRICS}     PacketCount    ByteCount
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 FlowMetrics
27     [Documentation]    Verify the TSDR FlowStats
28     Wait Until Keyword Succeeds    120s    1s    Verify the Metric is Collected?    ${TSDR_FLOWSTATS}    PacketCount
29     ${output}=    Issue Command On Karaf Console    ${TSDR_FLOWSTATS}    ${ODL_SYSTEM_IP}    ${KARAF_SHELL_PORT}    30
30     FOR    ${list}    IN    @{FLOW_METRICS}
31         Should Contain    ${output}    ${list}
32     END
33
34 Verification of FlowMetrics-PacketCount on HBase Client
35     [Documentation]    Verify the FlowStats-Packetcount on both Karaf console and Hbase client
36     ${tsdr_cmd}=    Concatenate the String    ${TSDR_FLOWSTATS}    | grep PacketCount | head
37     ${output}=    Issue Command On Karaf Console    ${tsdr_cmd}    ${ODL_SYSTEM_IP}    ${KARAF_SHELL_PORT}    90
38     ${Line1}=    Get Line    ${output}    0
39     Should Contain    ${Line1}    PacketCount
40     Verify the Metrics Attributes on Hbase Client    PacketCount    ${node_connector}    ${flowstats}
41
42 Verification of FlowMetrics-BytesCount on HBase Client
43     [Documentation]    Verify the FlowStats-ByteCount on both Karaf Console and Hbase Client
44     ${tsdr_cmd}=    Concatenate the String    ${TSDR_FLOWSTATS}    | grep ByteCount | head
45     ${output}=    Issue Command On Karaf Console    ${tsdr_cmd}    ${ODL_SYSTEM_IP}    ${KARAF_SHELL_PORT}    90
46     ${Line1}=    Get Line    ${output}    0
47     Should Contain    ${Line1}    ByteCount
48     Verify the Metrics Attributes on Hbase Client    ByteCount    ${node_connector}    ${flowstats}
49
50
51 *** Keywords ***
52 Init Variables Master
53     [Documentation]    Sets variables specific to latest(master) version
54     Set Suite Variable    ${TSDR_FLOWSTATS}    tsdr:list FLOWSTATS
55     set Suite Variable    ${node_connector}    Node:openflow:1,Table:0
56     set suite Variable    ${flowstats}    FLOWSTATS