2 Documentation Test suite for Connection Manager
3 Suite Setup Create Session session http://${CONTROLLER}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS}
4 Suite Teardown Delete All Sessions
5 Library OperatingSystem
7 Library RequestsLibrary
8 Variables ../../../variables/Variables.py
9 Resource ../../../libraries/Utils.txt
13 ${SOUTHBOUND_CONFIG_API} ${CONFIG_TOPO_API}/topology/ovsdb:1/node/ovsdb:%2F%2F${MININET}:${OVSDB_PORT}
14 ${OVSDB_CONFIG_DIR} ${CURDIR}/../../../variables/ovsdb
15 @{node_list} ovsdb://${MININET}:${OVSDB_PORT} ${MININET} ${OVSDB_PORT}
18 Make the OVS instacne to listen for connection
20 Run Command On Remote System ${MININET} sudo ovs-vsctl del-manager
21 Run Command On Remote System ${MININET} sudo ovs-vsctl set-manager ptcp:6644
24 [Documentation] Initiate the connection to OVSDB node from controller
26 ${sample} OperatingSystem.Get File ${OVSDB_CONFIG_DIR}/connect.json
27 ${sample1} Replace String ${sample} 127.0.0.1 ${MININET}
28 ${body} Replace String ${sample1} 61644 ${OVSDB_PORT}
29 Log URL is ${SOUTHBOUND_CONFIG_API}
30 ${resp} RequestsLibrary.Put session ${SOUTHBOUND_CONFIG_API} data=${body}
32 Should Be Equal As Strings ${resp.status_code} 200
35 [Documentation] This will fetch the configuration topology from configuration data store
37 ${resp} RequestsLibrary.Get session ${CONFIG_TOPO_API}
39 Should Be Equal As Strings ${resp.status_code} 200 Response status code error
40 Should Contain ${resp.content} ${MININET}:${OVSDB_PORT}
42 Get Operational Topology
43 [Documentation] This request will fetch the operational topology from the connected OVSDB nodes
45 Wait Until Keyword Succeeds 8s 2s Check For Elements At URI ${OPERATIONAL_TOPO_API} ${node_list}
48 [Documentation] This request will delete the OVSDB node
50 ${resp} RequestsLibrary.Delete session ${SOUTHBOUND_CONFIG_API}
51 Should Be Equal As Strings ${resp.status_code} 200 Response status code error
53 Get Operational Topology after Deletion
54 [Documentation] This request will fetch the operational topology after the OVSDB node is deleted
56 Wait Until Keyword Succeeds 8s 2s Check For Elements Not At URI ${OPERATIONAL_TOPO_API} ${node_list}