TSDR HBase and H2 DataStore Integrations Test suites and following review comments...
[integration/test.git] / test / csit / suites / tsdr / H2 / 010_InterfaceMetrics.robot
1 *** Settings ***\r
2 Documentation     Test suite for H2 DataStore\r
3 Suite Setup       Run Keywords    Start Tsdr Suite    Initialize the REST Client Session \r
4 Suite Teardown    Run Keywords    Stop Suite    Delete All Sessions\r
5 Library           SSHLibrary\r
6 Library           Collections\r
7 Library           String\r
8 Library           ../../../libraries/RequestsLibrary.py\r
9 Library           ../../../libraries/Common.py\r
10 Resource          ../../../libraries/KarafKeywords.txt\r
11 Resource          ../../../libraries/Utils.txt\r
12 Resource          ../../../libraries/TsdrUtils.txt\r
13 Variables         ../../../variables/Variables.py\r
14 \r
15 *** Variables ***\r
16 @{INTERFACE_METRICS}    TransmittedPackets    TransmittedBytes    TransmitErrors    TransmitDrops    ReceivedPackets    ReceivedBytes    ReceiveOverRunError\r
17 ...               ReceiveFrameError    ReceiveErrors    ReceiveDrops    ReceiveCrcError    CollisionCount\r
18 @{CATEGORY}       InterfaceMetrics    FlowTableMetrics    GroupMetrics    FlowMetrics    QueueMetrics\r
19 ${INTERFACE_QUERY}    scan 'InterfaceMetrics'\r
20 \r
21 *** Test Cases ***\r
22 Verification Feature Installation\r
23     [Documentation]    Verify the H2 datastore is installed\r
24     Install a Feature    odl-tsdr-all    ${CONTROLLER}    ${KARAF_SHELL_PORT}    30\r
25     Verify Feature Is Installed    odl-tsdr-all\r
26     Verify Feature Is Installed    odl-tsdr-H2-persistence\r
27     Verify Feature Is Installed    odl-tsdr-core\r
28 \r
29 Get list of nodes from RESTAPI\r
30     [Documentation]    Get the inventory, should not contain address observations\r
31     ${resp}    RequestsLibrary.Get    session    ${OPERATIONAL_NODES_API}\r
32     Should Be Equal As Strings    ${resp.status_code}    200\r
33     Should Contain    ${resp.content}    openflow:1\r
34     Should Contain    ${resp.content}    openflow:2\r
35 \r
36 Verification TSDR Command is exist in Help\r
37     [Documentation]    Verify the TSDR List command on Help\r
38     ${output}=    Issue Command On Karaf Console    tsdr\t\r
39     Should Contain    ${output}    tsdr:list\r
40     Should Contain    ${output}    tsdr:purgeall\r
41     ${output}=    Issue Command On Karaf Console    tsdr:list\t\t\r
42     : FOR    ${list}    IN    @{CATEGORY}\r
43     \    Should Contain    ${output}    ${list}\r
44     COMMENT    Intentional Sleep time for Data Collection purpose\r
45     Sleep    15\r
46 \r
47 Verification of TSDR InterfaceMetrics\r
48     [Documentation]    Verify the TSDR InterfaceMetrics\r
49     ${output}=    Issue Command On Karaf Console    tsdr:list    ${CONTROLLER}    ${KARAF_SHELL_PORT}    30\r
50     : FOR    ${list}    IN    @{INTERFACE_METRICS}\r
51     \    Should Contain    ${output}    ${list}\r
52 \r
53 Uninstall all TSDR H2 Feature\r
54     [Documentation]    UnInstall all TSDR H2 Features\r
55     Uninstall a Feature    odl-tsdr-core\r
56     Verify Feature Is Not Installed    odl-tsdr-core\r
57     Uninstall a Feature    odl-tsdr-all\r
58     Verify Feature Is Not Installed    odl-tsdr-all\r
59     Uninstall a Feature    odl-tsdr-H2-persistence\r
60     Verify Feature Is Not Installed    odl-tsdr-H2-persistence\r
61 \r
62 Verification TSDR Command shouldnot exist in help\r
63     [Documentation]    Verify the TSDR List command on help\r
64     ${output}=    Issue Command On Karaf Console    tsdr\t    ${CONTROLLER}    ${KARAF_SHELL_PORT}\r
65     Should not Contain    ${output}    tsdr:list\r
66     Comment    Should not Contain    ${output}    tsdr:purgeall\r