*** Settings *** Documentation Test suite for RESTCONF topology Suite Setup Create Session session http://${CONTROLLER}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_XML} Suite Teardown Delete All Sessions Library Collections Library XML Library ../../../libraries/RequestsLibrary.py Library ../../../libraries/Common.py Variables ../../../variables/Variables.py *** Variables *** ${REST_CONTEXT} /restconf/operational/network-topology:network-topology/topology/flow:1 *** Test Cases *** Get Nodes Count [Documentation] Checks the number of switches ${resp} Get session ${REST_CONTEXT} headers=${ACCEPT_XML} Should Be Equal As Strings ${resp.status_code} 200 ${TOPO_TREE_DEPTH} Convert To Integer ${TOPO_TREE_DEPTH} ${TOPO_TREE_FANOUT} Convert To Integer ${TOPO_TREE_FANOUT} ${numnodes} Num Of Nodes ${TOPO_TREE_DEPTH} ${TOPO_TREE_FANOUT} ${count}= Get Element Count ${resp.content} xpath=node Should Be Equal As Numbers ${count} ${numnodes} Get Links Count [Documentation] Checks the number of links ${resp} Get session ${REST_CONTEXT} headers=${ACCEPT_XML} Should Be Equal As Strings ${resp.status_code} 200 ${TOPO_TREE_DEPTH} Convert To Integer ${TOPO_TREE_DEPTH} ${TOPO_TREE_FANOUT} Convert To Integer ${TOPO_TREE_FANOUT} ${numnodes} Num Of Nodes ${TOPO_TREE_DEPTH} ${TOPO_TREE_FANOUT} ${numlinks} Evaluate (${numnodes}-1)*2 ${count}= Get Element Count ${resp.content} xpath=link Should Be Equal As Numbers ${count} ${numlinks}