2 Documentation Test suite for Statistics Manager
3 Suite Setup Create Session session http://${CONTROLLER}:8080 auth=${AUTH} headers=${HEADERS}
4 Suite Teardown Delete All Sessions
6 Library ../../../libraries/RequestsLibrary.py
7 Library ../../../libraries/Common.py
8 Variables ../../../variables/Variables.py
11 ${node1} "00:00:00:00:00:00:00:01"
12 ${node2} "00:00:00:00:00:00:00:02"
13 ${node3} "00:00:00:00:00:00:00:03"
15 ${REST_CONTEXT} /controller/nb/v2/statistics
19 [Documentation] Show port stats and validate result
21 ${resp} Get session ${REST_CONTEXT}/${CONTAINER}/port
22 Should Be Equal As Strings ${resp.status_code} 200
23 Should Contain X Times ${resp.content} ${node1} 4
24 Should Contain X Times ${resp.content} ${node2} 5
25 Should Contain X Times ${resp.content} ${node3} 5
27 [Documentation] Show flow stats and validate result
29 ${resp} Get session ${REST_CONTEXT}/${CONTAINER}/flow
30 Should Be Equal As Strings ${resp.status_code} 200
31 Should Contain ${resp.content} ${node1}
32 Should Contain ${resp.content} ${node2}
33 Should Contain ${resp.content} ${node3}
35 [Documentation] Show flow stats and validate result
37 ${resp} Get session ${REST_CONTEXT}/${CONTAINER}/table
38 Should Be Equal As Strings ${resp.status_code} 200
39 Should Contain ${resp.content} ${node1}
40 Should Contain ${resp.content} ${node2}
41 Should Contain ${resp.content} ${node3}