2 Documentation Test suite for RESTCONF topology
6 Library RequestsLibrary
7 Library ../../../libraries/Common.py
8 Variables ../../../variables/Variables.py
9 Resource ../../../variables/openflowplugin/Variables.robot
11 Suite Setup Create Session session http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS_XML}
12 Suite Teardown Delete All Sessions
17 [Documentation] Checks the number of switches
18 ${TOPO_TREE_DEPTH} Convert To Integer ${TOPO_TREE_DEPTH}
19 ${TOPO_TREE_FANOUT} Convert To Integer ${TOPO_TREE_FANOUT}
20 ${numnodes} Num Of Nodes ${TOPO_TREE_DEPTH} ${TOPO_TREE_FANOUT}
21 Wait Until Keyword Succeeds
24 ... Verify Element Count
25 ... ${RFC8040_OPERATIONAL_TOPO_FLOW1_API}
30 [Documentation] Checks the number of links
31 ${TOPO_TREE_DEPTH} Convert To Integer ${TOPO_TREE_DEPTH}
32 ${TOPO_TREE_FANOUT} Convert To Integer ${TOPO_TREE_FANOUT}
33 ${numnodes} Num Of Nodes ${TOPO_TREE_DEPTH} ${TOPO_TREE_FANOUT}
34 ${numlinks} Evaluate (${numnodes}-1)*2
35 Wait Until Keyword Succeeds
38 ... Verify Element Count
39 ... ${RFC8040_OPERATIONAL_TOPO_FLOW1_API}
46 [Arguments] ${URI} ${xpath_location} ${expected_count}
47 ${resp} RequestsLibrary.GET On Session
49 ... url=${RFC8040_OPERATIONAL_TOPO_FLOW1_API}
50 ... headers=${ACCEPT_XML}
51 ... expected_status=200
53 ${count} Get Element Count ${resp.text} xpath=${xpath_location}
54 Should Be Equal As Numbers ${count} ${expected_count}