2 Documentation Test suite for Topology 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:
13 ${REST_CONTEXT} /controller/nb/v2/topology
17 [Documentation] Get Topology and validate the result.
19 ${TOPO_TREE_DEPTH} Convert To Integer ${TOPO_TREE_DEPTH}
20 ${TOPO_TREE_FANOUT} Convert To Integer ${TOPO_TREE_FANOUT}
21 ${leaflist} Get Ids Of Leaf Nodes ${TOPO_TREE_FANOUT} ${TOPO_TREE_DEPTH}
22 ${topo_nodes} Get Nodes From Tree Topo (${TOPO_TREE_DEPTH},${TOPO_TREE_FANOUT}) 1
23 Wait Until Keyword Succeeds 30s 2s Check Link Counts For Each Node ${topo_nodes} ${leaflist}
26 Check Link Counts For Each Node
27 [Arguments] ${topo_nodes} ${leaflist}
28 ${resp} RequestsLibrary.Get session ${REST_CONTEXT}/${CONTAINER}
30 Should Be Equal As Strings ${resp.status_code} 200
31 Should Contain X Times ${resp.content} "00:00:00:00:00:00:00:01" ${TOPO_TREE_FANOUT*2}
32 : FOR ${ITEM} IN @{topo_nodes}
33 \ ${IND} Get From Dictionary ${ITEM} id
34 \ ${linkcnt} Num Of Links For Node ${IND} ${leaflist} ${TOPO_TREE_FANOUT}
35 \ Should Contain X Times ${resp.content} "${IND}" ${linkcnt*2}