Remove remnants of sfc project
[integration/test.git] / csit / suites / tsdr / H2 / 040_QueueMetrics.robot
1 *** Settings ***
2 Documentation       Test suite for H2 DataStore Queue 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         Run Keywords    Start Tsdr Suite    Configuration of Queue on Switch
13 Suite Teardown      Stop Tsdr Suite
14
15
16 *** Variables ***
17 @{QUEUE_METRICS}        TransmittedPackets    TransmittedBytes    TransmissionErrors
18 ${TSDR_QUEUE_STATS}     tsdr:list QueueStats
19 @{CMD_LIST}             FlowGroupStats    FlowMeterStats    FlowStats    FlowTableStats    PortStats    QueueStats
20
21
22 *** Test Cases ***
23 Verify the Queue Stats attributes exist thru Karaf console
24     [Documentation]    Verify the QueueMetrics attributes exist on Karaf Console
25     Wait Until Keyword Succeeds    60s    1s    Verify the Metric is Collected?    ${TSDR_QUEUE_STATS}    Transmitted
26     ${output}=    Issue Command On Karaf Console
27     ...    ${TSDR_QUEUE_STATS}
28     ...    ${ODL_SYSTEM_IP}
29     ...    ${KARAF_SHELL_PORT}
30     ...    30
31     FOR    ${list}    IN    @{QUEUE_METRICS}
32         Should Contain    ${output}    ${list}
33     END
34
35 Verify QueueStats-Attributes on H2 Datastore using JDBC Client
36     [Documentation]    Verify the QueueStats,attributes on H2 Datastore using JDBC Client
37     FOR    ${list}    IN    @{QUEUE_METRICS}
38         ${output}=    Query Metrics on H2 Datastore    QUEUESTATS    ${list}
39         Should Contain    ${output}    ${list}
40     END
41
42 Verify tsdr:purgeall command
43     [Documentation]    Verify the tsdr:purgeall command
44     Issue Command On Karaf Console    tsdr:purgeall    ${ODL_SYSTEM_IP}    ${KARAF_SHELL_PORT}
45     FOR    ${list}    IN    @{CMD_LIST}
46         ${out}=    Issue Command On Karaf Console    tsdr:list ${list}    ${ODL_SYSTEM_IP}    ${KARAF_SHELL_PORT}
47         Should Contain    ${out}    no data of this category
48     END
49     FOR    ${list}    IN    @{QUEUE_METRICS}
50         ${out}=    Query Metrics on H2 Datastore    QUEUESTATS    ${list}
51         Should not Contain    ${out}    ${list}
52     END
53
54
55 *** Keywords ***
56 Configuration of Queue on Switch
57     [Documentation]    Queue configuration on openvswitch
58     Configure the Queue on Switch    s2-eth2