Update Robot Framework format - step 15
[integration/test.git] / csit / suites / tsdr / HBase / 040_QueueMetrics.robot
1 *** Settings ***
2 Documentation       Test suite for Hbase DataStore Queue 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         Run Keywords    Start Tsdr Suite    Configuration of Queue on Switch
14 Suite Teardown      Stop Tsdr Suite
15
16
17 *** Variables ***
18 @{QUEUE_METRICS}    TransmittedPackets    TransmittedBytes    TransmissionErrors
19
20
21 *** Test Cases ***
22 Init Variables
23     [Documentation]    Initialize ODL version specific variables using resource CompareStream.
24     Init Variables Master
25
26 Verify the Queue Metrics attributes exist thru Karaf console
27     [Documentation]    Verify the QueueMetrics attributes exist on Karaf Console
28     Wait Until Keyword Succeeds    180s    1s    Verify the Metric is Collected?    ${TSDR_QUEUESTATS}    Transmitted
29     ${output}=    Issue Command On Karaf Console    ${TSDR_QUEUESTATS}    ${ODL_SYSTEM_IP}    ${KARAF_SHELL_PORT}    90
30     FOR    ${list}    IN    @{QUEUE_METRICS}
31         Should Contain    ${output}    ${list}
32     END
33
34 Verification of QueueMetrics-TransmittedPackets on Karaf Console
35     [Documentation]    Verify the QueueMetrics has been updated thru tsdr:list command on karaf console
36     ${tsdr_cmd}=    Concatenate the String    ${TSDR_QUEUESTATS}    | grep TransmittedPackets | head
37     ${output}=    Issue Command On Karaf Console    ${tsdr_cmd}    ${ODL_SYSTEM_IP}    ${KARAF_SHELL_PORT}    90
38     Should Contain    ${output}    TransmittedPackets
39
40 Verification of QueueMetrics-TransmittedPackets on HBase Client
41     [Documentation]    Verify the QueueMetrics has been updated on HBase Datastore
42     Verify the Metrics Attributes on Hbase Client    TransmittedPackets    ${node_connector}    ${queuestats}
43
44 Verification of QueueMetrics-TransmittedBytes on HBase Client
45     [Documentation]    Verify the QueueMetrics has been updated on HBase Datastore
46     Verify the Metrics Attributes on Hbase Client    TransmittedBytes    ${node_connector}    ${queuestats}
47
48 Verification of QueueMetrics-TransmissionErrors on HBase Client
49     [Documentation]    Verify the QueueMetrics has been updated on HBase Datastore
50     Verify the Metrics Attributes on Hbase Client    TransmissionErrors    ${node_connector}    ${queuestats}
51
52
53 *** Keywords ***
54 Configuration of Queue on Switch
55     [Documentation]    Queue configuration on openvswitch
56     Configure the Queue on Switch    s2-eth2
57
58 Init Variables Master
59     [Documentation]    Sets variables specific to latest(master) version
60     Set Suite Variable    ${TSDR_QUEUESTATS}    tsdr:list QUEUESTATS
61     set Suite Variable    ${node_connector}    Node:openflow:2
62     set suite Variable    ${queuestats}    QUEUESTATS