b7a14fc270420edc78a7bdb0c3cc762077ada99f
[integration/test.git] / csit / suites / openflowplugin / AD_SAL_NSF_OF13 / 030__statistics_manager.robot
1 *** Settings ***
2 Documentation     Test suite for Statistics Manager
3 Suite Setup       Create Session    session    http://${CONTROLLER}:${RESTPORT}    auth=${AUTH}    headers=${HEADERS}
4 Suite Teardown    Delete All Sessions
5 Library           Collections
6 Library           RequestsLibrary
7 Library           ../../../libraries/Common.py
8 Variables         ../../../variables/Variables.py
9 Resource          ../../../libraries/Utils.robot
10
11 *** Variables ***
12 ${node1}          "00:00:00:00:00:00:00:01"
13 ${node2}          "00:00:00:00:00:00:00:02"
14 ${node3}          "00:00:00:00:00:00:00:03"
15 @{macaddr_list}    ${node1}    ${node2}    ${node3}
16 @{node_list}      openflow:1    openflow:2    openflow:3
17 ${key}            portStatistics
18 ${REST_CONTEXT}    /controller/nb/v2/statistics
19
20 *** Test Cases ***
21 get port stats
22     [Documentation]    Show port stats and validate result
23     [Tags]    adsal
24     Wait Until Keyword Succeeds    10s    2s    Check For Elements At URI    ${REST_CONTEXT}/${CONTAINER}/port    ${macaddr_list}
25     Wait Until Keyword Succeeds    60s    2s    Check That Port Count Is Ok    ${node1}    4
26     Wait Until Keyword Succeeds    60s    1s    Check That Port Count Is Ok    ${node2}    5
27     Wait Until Keyword Succeeds    60s    1s    Check That Port Count Is Ok    ${node3}    5
28
29 get flow stats
30     [Documentation]    Show flow stats and validate result
31     [Tags]    adsal
32     Wait Until Keyword Succeeds    10s    2s    Check For Elements At URI    ${REST_CONTEXT}/${CONTAINER}/flow    ${macaddr_list}
33
34 get table stats
35     [Documentation]    Show flow stats and validate result
36     [Tags]    adsal
37     Wait Until Keyword Succeeds    10s    2s    Check For Elements At URI    ${REST_CONTEXT}/${CONTAINER}/table    ${macaddr_list}