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
6 Library ../../../libraries/RequestsLibrary.py
7 Library ../../../libraries/Common.py
8 Library ../../../libraries/Topologynew.py
9 Variables ../../../variables/Variables.py
12 ${nodeprefix} openflow:
14 ${REST_CONTEXT} /controller/nb/v2/statistics
18 [Documentation] Show port stats and validate result
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}
29 [Documentation] Show flow stats and validate result
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}"
39 [Documentation] Show flow stats and validate result
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}"