7924c1778c05c0c8523c9274faeea59d3f4ca08d
[integration/test.git] / csit / suites / tsdr / H2 / 030_FlowTableMetrics.robot
1 *** Settings ***
2 Documentation       Test suite for H2 DataStore Flow Table Metrics Verification
3
4 Library             SSHLibrary
5 Library             Collections
6 Library             String
7 Library             ../../../libraries/Common.py
8 Resource            ../../../libraries/KarafKeywords.robot
9 Resource            ../../../libraries/TsdrUtils.robot
10 Variables           ../../../variables/Variables.py
11
12 Suite Setup         Start Tsdr Suite
13 Suite Teardown      Stop Tsdr Suite
14
15
16 *** Variables ***
17 @{FLOWTABLE_METRICS}        ActiveFlows    PacketLookup    PacketMatch
18 ${TSDR_FLOWTABLE_STATS}     tsdr:list FlowTableStats
19
20
21 *** Test Cases ***
22 Verification of TSDR FlowTableStats
23     [Documentation]    Verify the TSDR FlowiTableStats
24     Wait Until Keyword Succeeds
25     ...    60s
26     ...    1s
27     ...    Verify the Metric is Collected?
28     ...    ${TSDR_FLOWTABLE_STATS}| grep ActiveFlow
29     ...    FLOWTABLESTATS
30     ${output}=    Issue Command On Karaf Console
31     ...    ${TSDR_FLOWTABLE_STATS}| grep openflow:1 | head
32     ...    ${ODL_SYSTEM_IP}
33     ...    ${KARAF_SHELL_PORT}
34     ...    180
35     FOR    ${list}    IN    @{FLOWTABLE_METRICS}
36         Should Contain    ${output}    ${list}
37     END
38
39 Verify FlowTableStats-Attributes on H2 Datastore using JDBC Client
40     [Documentation]    Verify the PortStats,attributes on H2 Datastore using JDBC Client
41     FOR    ${list}    IN    @{FLOWTABLE_METRICS}
42         ${output}=    Query Metrics on H2 Datastore    FLOWTABLESTATS    ${list}
43         Should Contain    ${output}    ${list}
44     END