2 Documentation Test suite for Switch Manager
3 Suite Setup Create Session ${ODL_CONTROLLER_SESSION} http://${CONTROLLER}:${RESTPORT} auth=${AUTH} headers=${HEADERS}
4 Suite Teardown Delete All Sessions
6 Library RequestsLibrary
7 Library ../../../libraries/Common.py
8 Library ../../../libraries/SwitchManager.py
9 Variables ../../../variables/Variables.py
10 Library ../../../libraries/Topologynew.py
13 ${REST_CONTEXT} /controller/nb/v2/switchmanager
18 [Documentation] List all nodes and their properties in the network.
20 Log ${TOPO_TREE_LEVEL}
21 ${topo_nodes} Get Nodes From Tree Topo (${TOPO_TREE_DEPTH},${TOPO_TREE_FANOUT})
22 ${resp} Get ${ODL_CONTROLLER_SESSION} ${REST_CONTEXT}/default/nodes
23 Should Be Equal As Strings ${resp.status_code} 200 Response status code error
24 ${jsondata}= To JSON ${resp.content}
25 ${nodes} Extract All Nodes ${jsondata}
26 List Should Contain Sublist ${nodes} ${topo_nodes}
28 Check root node connectors
29 [Documentation] List node connectors and verify all connectors are there
31 ${resp} Get ${ODL_CONTROLLER_SESSION} ${REST_CONTEXT}/default/node/OF/00:00:00:00:00:00:00:01
32 Should Be Equal As Strings ${resp.status_code} 200 Response status code error
33 ${TOPO_TREE_FANOUT} Convert To Integer ${TOPO_TREE_FANOUT}
34 Check conn loop ${TOPO_TREE_FANOUT} 1 ${resp.content}
36 Check node i connectors
37 [Documentation] List node connectors and verify all connectors are there
39 ${topo_nodes} Get Nodes From Tree Topo (${TOPO_TREE_DEPTH},${TOPO_TREE_FANOUT}) 1
40 :FOR ${ITEM} IN @{topo_nodes}
41 \ ${IND} Get From Dictionary ${ITEM} id
42 \ ${resp} Get ${ODL_CONTROLLER_SESSION} ${REST_CONTEXT}/default/node/OF/${IND}
43 \ Should Be Equal As Strings ${resp.status_code} 200
44 \ Check conn loop ${TOPO_TREE_FANOUT+1} ${IND} ${resp.content}
48 [Arguments] ${arg} ${outerind} ${content}
49 :FOR ${var} IN RANGE 0 ${arg+1}
50 \ Should Contain ${content} "id":"${var}"