9c10b66ae96e235efd26a77a47cd48ab083b28a9
[integration/test.git] / csit / suites / tsdr / HSQLDB / 010_InterfaceMetrics.robot
1 *** Settings ***
2 Documentation       Test suite for HSQLDB DataStore InterfaceMetrics 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         Start Tsdr Suite
14 Suite Teardown      Stop Tsdr Suite
15
16
17 *** Variables ***
18 @{INTERFACE_METRICS}
19 ...                     TransmittedPackets
20 ...                     TransmittedBytes
21 ...                     TransmitErrors
22 ...                     TransmitDrops
23 ...                     ReceivedPackets
24 ...                     ReceivedBytes
25 ...                     ReceiveOverRunError
26 ...                     ReceiveFrameError
27 ...                     ReceiveErrors
28 ...                     ReceiveDrops
29 ...                     ReceiveCrcError
30 ...                     CollisionCount
31
32
33 *** Test Cases ***
34 Init Variables
35     [Documentation]    Initialize ODL version specific variables
36     Init Variables Master
37
38 Verification of TSDR HSQLDB Feature Installation
39     [Documentation]    Install and Verify the TSDR HSQLDB Datastore and JDBC
40     COMMENT    Install a Feature    odl-tsdr-hsqldb    ${ODL_SYSTEM_IP}    ${KARAF_SHELL_PORT}    60
41     COMMENT
42     ...    Install a Feature
43     ...    odl-tsdr-openflow-statistics-collector
44     ...    ${ODL_SYSTEM_IP}
45     ...    ${KARAF_SHELL_PORT}
46     ...    60
47     Verify Feature Is Installed    ${HSQLDB_INSTALL}
48     Verify Feature Is Installed    odl-tsdr-core
49
50 Verification TSDR Command exists in Help
51     [Documentation]    Verify the TSDR List command on Help
52     ${output}=    Issue Command On Karaf Console    tsdr\t
53     Should Contain    ${output}    tsdr:list
54     ${output}=    Issue Command On Karaf Console    tsdr:list\t\t
55     FOR    ${list}    IN    @{CATEGORY}
56         Should Contain    ${output}    ${list}
57     END
58     Wait Until Keyword Succeeds    60s    1s    Verify the Metric is Collected?    ${TSDR_PORTSTATS}    openflow
59
60 Verify PortStats On Karaf console
61     [Documentation]    Verify the InterfaceMetrics(PortStats),attributes using ${TSDR_PORTSTATS}
62     FOR    ${list}    IN    @{INTERFACE_METRICS}
63         ${tsdr_cmd}=    Concatenate the String    ${TSDR_PORTSTATS}    | grep ${list} | head
64         ${output}=    Issue Command On Karaf Console    ${tsdr_cmd}    ${ODL_SYSTEM_IP}    ${KARAF_SHELL_PORT}    30
65         Should Contain    ${output}    ${list}
66     END
67
68
69 *** Keywords ***
70 Init Variables Master
71     [Documentation]    Sets variables specific to latest(master) version
72     Set Suite Variable    @{CATEGORY}    FLOWGROUPSTATS    FLOWMETERSTATS    FLOWSTATS    FLOWTABLESTATS    PORTSTATS
73     ...    QUEUESTATS
74     Set Suite Variable    ${TSDR_PORTSTATS}    tsdr:list PORTSTATS
75     Set Suite Variable    ${HSQLDB_INSTALL}    odl-tsdr-hsqldb