Tidy new and updated test suites
[integration/test.git] / csit / suites / tsdr / HBase / 040_QueueMetrics.robot
1 *** Settings ***
2 Documentation     Test suite for Hbase DataStore Queue Stats Verification
3 Suite Setup       Run Keywords    Start Tsdr Suite    Configuration of Queue on Switch
4 Suite Teardown    Stop Tsdr Suite
5 Library           SSHLibrary
6 Library           Collections
7 Library           String
8 Library           ../../../libraries/Common.py
9 Resource          ../../../libraries/KarafKeywords.robot
10 Resource          ../../../libraries/TsdrUtils.robot
11 Variables         ../../../variables/Variables.py
12
13 *** Variables ***
14 @{QUEUE_METRICS}    TransmittedPackets    TransmittedBytes    TransmissionErrors
15
16 *** Test Cases ***
17 Init Variables
18     [Documentation]    Initialize ODL version specific variables
19     log    ${ODL_VERSION}
20     Run Keyword If    '${ODL_VERSION}' == 'stable-lithium'    Init Variables Lithium
21     ...    ELSE    Init Variables Master
22
23 Verify the Queue Metrics attributes exist thru Karaf console
24     [Documentation]    Verify the QueueMetrics attributes exist on Karaf Console
25     Wait Until Keyword Succeeds    180s    1s    Verify the Metric is Collected?    ${TSDR_QUEUESTATS}    Transmitted
26     ${output}=    Issue Command On Karaf Console    ${TSDR_QUEUESTATS}    ${ODL_SYSTEM_IP}    ${KARAF_SHELL_PORT}    90
27     : FOR    ${list}    IN    @{QUEUE_METRICS}
28     \    Should Contain    ${output}    ${list}
29
30 Verification of QueueMetrics-TransmittedPackets on Karaf Console
31     [Documentation]    Verify the QueueMetrics has been updated thru tsdr:list command on karaf console
32     ${tsdr_cmd}=    Concatenate the String    ${TSDR_QUEUESTATS}    | grep TransmittedPackets | head
33     ${output}=    Issue Command On Karaf Console    ${tsdr_cmd}    ${ODL_SYSTEM_IP}    ${KARAF_SHELL_PORT}    90
34     Should Contain    ${output}    TransmittedPackets
35
36 Verification of QueueMetrics-TransmittedPackets on HBase Client
37     [Documentation]    Verify the QueueMetrics has been updated on HBase Datastore
38     Verify the Metrics Attributes on Hbase Client    TransmittedPackets    ${node_connector}    ${queuestats}
39
40 Verification of QueueMetrics-TransmittedBytes on HBase Client
41     [Documentation]    Verify the QueueMetrics has been updated on HBase Datastore
42     Verify the Metrics Attributes on Hbase Client    TransmittedBytes    ${node_connector}    ${queuestats}
43
44 Verification of QueueMetrics-TransmissionErrors on HBase Client
45     [Documentation]    Verify the QueueMetrics has been updated on HBase Datastore
46     Verify the Metrics Attributes on Hbase Client    TransmissionErrors    ${node_connector}    ${queuestats}
47
48 *** Keywords ***
49 Configuration of Queue on Switch
50     [Documentation]    Queue configuration on openvswitch
51     Configure the Queue on Switch    s2-eth2
52
53 Init Variables Master
54     [Documentation]    Sets variables specific to latest(master) version
55     Set Suite Variable    ${TSDR_QUEUESTATS}    tsdr:list QUEUESTATS
56     set Suite Variable    ${node_connector}    Node:openflow:2
57     set suite Variable    ${queuestats}    QUEUESTATS
58
59 Init Variables Lithium
60     [Documentation]    Sets variables specific to Lithium version
61     Set Suite Variable    ${TSDR_QUEUESTATS}    tsdr:list QueueStats
62     set Suite Variable    ${node_connector}    openflow:2
63     set suite Variable    ${queuestats}    QueueMetrics