Fixing mininet reads so that we always clear mininet
[integration/test.git] / test / csit / suites / base-of13 / 080__Inventory_Performance / 030__statistics_manager.txt
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           ../../../libraries/RequestsLibrary.py
7 Library           ../../../libraries/Common.py
8 Library           ../../../libraries/Topologynew.py
9 Variables         ../../../variables/Variables.py
10
11 *** Variables ***
12 ${nodeprefix}   openflow:
13 ${key}             portStatistics
14 ${REST_CONTEXT}    /controller/nb/v2/statistics
15
16 *** Test Cases ***
17 get port stats
18     [Documentation]    Show port stats and validate result
19     [Tags]    get
20     ${resp}    Get    session    ${REST_CONTEXT}/${CONTAINER}/port
21     Should Be Equal As Strings    ${resp.status_code}    200 
22         ${topo_nodes}    Get Nodes From Tree Topo    (${TOPO_TREE_DEPTH},${TOPO_TREE_FANOUT})   1
23     Should Contain X Times   ${resp.content}    "00:00:00:00:00:00:00:01"      ${TOPO_TREE_FANOUT+2}    
24     :FOR    ${ITEM}  IN         @{topo_nodes}
25     \   ${IND}  Get From Dictionary    ${ITEM}    id
26     \   Should Contain X Times   ${resp.content}    "${IND}"    ${TOPO_TREE_FANOUT+3}
27
28 get flow stats
29     [Documentation]    Show flow stats and validate result
30     [Tags]    get
31     ${resp}    Get    session    ${REST_CONTEXT}/${CONTAINER}/flow
32     Should Be Equal As Strings    ${resp.status_code}    200 
33         ${topo_nodes}    Get Nodes From Tree Topo    (${TOPO_TREE_DEPTH},${TOPO_TREE_FANOUT})
34     :FOR    ${ITEM}  IN     @{topo_nodes}
35     \   ${IND}  Get From Dictionary    ${ITEM}    id
36     \   Should Contain    ${resp.content}    "${IND}"
37
38 get table stats
39     [Documentation]    Show flow stats and validate result
40     [Tags]    get
41     ${resp}    Get    session    ${REST_CONTEXT}/${CONTAINER}/table
42     Should Be Equal As Strings    ${resp.status_code}    200 
43     ${topo_nodes}    Get Nodes From Tree Topo    (${TOPO_TREE_DEPTH},${TOPO_TREE_FANOUT})
44     :FOR    ${ITEM}  IN     @{topo_nodes}
45     \   ${IND}  Get From Dictionary    ${ITEM}    id
46     \   Should Contain    ${resp.content}    "${IND}"
47
48