2 Documentation Test suite for the statistics manager module
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} "node":{"type":"OF","id":"00:00:00:00:00:00:00:01"}
12 ${node2} "node":{"type":"OF","id":"00:00:00:00:00:00:00:02"}
13 ${node3} "node":{"type":"OF","id":"00:00:00:00:00:00:00:03"}
14 ${nodeconn1} "nodeConnector":{"type":"OF","node":{"type":"OF","id":"00:00:00:00:00:00:00:01"},"id":"1"}
15 ${nodeconn2} "nodeConnector":{"type":"OF","node":{"type":"OF","id":"00:00:00:00:00:00:00:01"},"id":"2"}
16 ${nodeconn3} "nodeConnector":{"type":"OF","node":{"type":"OF","id":"00:00:00:00:00:00:00:02"},"id":"1"}
17 ${nodeconn4} "nodeConnector":{"type":"OF","node":{"type":"OF","id":"00:00:00:00:00:00:00:02"},"id":"2"}
18 ${nodeconn5} "nodeConnector":{"type":"OF","node":{"type":"OF","id":"00:00:00:00:00:00:00:02"},"id":"3"}
19 ${nodeconn6} "nodeConnector":{"type":"OF","node":{"type":"OF","id":"00:00:00:00:00:00:00:03"},"id":"1"}
20 ${nodeconn7} "nodeConnector":{"type":"OF","node":{"type":"OF","id":"00:00:00:00:00:00:00:03"},"id":"2"}
21 ${nodeconn8} "nodeConnector":{"type":"OF","node":{"type":"OF","id":"00:00:00:00:00:00:00:03"},"id":"3"}
24 ${REST_CONTEXT} /controller/nb/v2/statistics
28 [Documentation] Show port stats and validate result
30 ${resp} Get session ${REST_CONTEXT}/${CONTAINER}/port
31 Should Be Equal As Strings ${resp.status_code} 200
32 Should Contain ${resp.content} ${nodeconn1}
33 Should Contain ${resp.content} ${nodeconn2}
34 Should Contain ${resp.content} ${nodeconn3}
35 Should Contain ${resp.content} ${nodeconn4}
36 Should Contain ${resp.content} ${nodeconn5}
37 Should Contain ${resp.content} ${nodeconn6}
38 Should Contain ${resp.content} ${nodeconn7}
39 Should Contain ${resp.content} ${nodeconn8}
41 [Documentation] Show flow stats and validate result
43 ${resp} Get session ${REST_CONTEXT}/${CONTAINER}/flow
44 Should Be Equal As Strings ${resp.status_code} 200
45 Should Contain ${resp.content} ${node1}
46 Should Contain ${resp.content} ${node2}
47 Should Contain ${resp.content} ${node3}
49 [Documentation] Show flow stats and validate result
51 ${resp} Get session ${REST_CONTEXT}/${CONTAINER}/table
52 Should Be Equal As Strings ${resp.status_code} 200
53 Should Contain ${resp.content} ${node1}
54 Should Contain ${resp.content} ${node2}
55 Should Contain ${resp.content} ${node3}