2 Documentation Test suite for Topology Manager
3 Suite Setup Create Session session http://${CONTROLLER}:${PORT} 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:
13 ${REST_CONTEXT} /controller/nb/v2/topology
17 [Documentation] Get Topology and validate the result.
19 ${resp} Get session ${REST_CONTEXT}/${CONTAINER}
20 Should Be Equal As Strings ${resp.status_code} 200
22 ${TOPO_TREE_DEPTH} Convert To Integer ${TOPO_TREE_DEPTH}
23 ${TOPO_TREE_FANOUT} Convert To Integer ${TOPO_TREE_FANOUT}
24 Should Contain X Times ${resp.content} "00:00:00:00:00:00:00:01" ${TOPO_TREE_FANOUT*2}
25 ${leaflist} Get Ids Of Leaf Nodes ${TOPO_TREE_FANOUT} ${TOPO_TREE_DEPTH}
26 ${topo_nodes} Get Nodes From Tree Topo (${TOPO_TREE_DEPTH},${TOPO_TREE_FANOUT}) 1
27 :FOR ${ITEM} IN @{topo_nodes}
28 \ ${IND} Get From Dictionary ${ITEM} id
29 \ ${linkcnt} Num Of Links For Node ${IND} ${leaflist} ${TOPO_TREE_FANOUT}
30 \ Should Contain X Times ${resp.content} "${IND}" ${linkcnt*2}