2 Documentation Test suite for Connection Manager
3 Suite Setup Configure 1 OVSDB Node Suite Setup
4 Suite Teardown Configure 1 OVSDB Node Suite Teardown
5 Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
7 Library OperatingSystem
9 Library RequestsLibrary
10 Resource ../../../variables/Variables.robot
11 Resource ../../../libraries/SetupUtils.robot
12 Resource ../../../libraries/Utils.robot
13 Resource ../../../libraries/OVSDB.robot
17 ${BRIDGE} ovsdb-csit-test-bridge
20 ${SOUTHBOUND_CONFIG_API} ${CONFIG_TOPO_API}/topology/ovsdb:1/node/ovsdb:%2F%2F${TOOLS_SYSTEM_IP}:${OVSDB_PORT}
21 ${OVSDB_CONFIG_DIR} ${CURDIR}/../../../variables/ovsdb
22 @{node_list} ovsdb://${TOOLS_SYSTEM_IP}:${OVSDB_PORT} ${TOOLS_SYSTEM_IP} ${OVSDB_PORT}
25 Make the OVS instance to listen for connection
26 Run Command On Remote System ${TOOLS_SYSTEM_IP} sudo ovs-vsctl del-manager
27 Run Command On Remote System ${TOOLS_SYSTEM_IP} sudo ovs-vsctl set-manager ptcp:${OVSDB_PORT}
30 [Documentation] Initiate the connection to OVSDB node from controller
31 ${sample} OperatingSystem.Get File ${OVSDB_CONFIG_DIR}/connect.json
32 ${sample1} Replace String ${sample} 127.0.0.1 ${TOOLS_SYSTEM_IP}
33 ${body} Replace String ${sample1} 61644 ${OVSDB_PORT}
34 Log URL is ${SOUTHBOUND_CONFIG_API}
36 ${resp} RequestsLibrary.Put Request session ${SOUTHBOUND_CONFIG_API} data=${body}
38 Should Contain ${ALLOWED_STATUS_CODES} ${resp.status_code}
39 Wait Until Keyword Succeeds 5s 1s Verify OVS Reports Connected
41 Get Operational Topology
42 [Documentation] This request will fetch the operational topology from the connected OVSDB nodes
43 Wait Until Keyword Succeeds 8s 2s Check For Elements At URI ${OPERATIONAL_TOPO_API}/topology/ovsdb:1 ${node_list}
46 [Documentation] This will create bridge on the specified OVSDB node.
47 ${sample} OperatingSystem.Get File ${OVSDB_CONFIG_DIR}/create_bridge.json
48 ${sample1} Replace String ${sample} tcp:127.0.0.1:6633 tcp:${ODL_SYSTEM_IP}:6633
49 ${sample2} Replace String ${sample1} 127.0.0.1 ${TOOLS_SYSTEM_IP}
50 ${sample3} Replace String ${sample2} br01 ${BRIDGE}
51 ${body} Replace String ${sample3} 61644 ${OVSDB_PORT}
52 Log URL is ${SOUTHBOUND_CONFIG_API}%2Fbridge%2F${BRIDGE}
54 ${resp} RequestsLibrary.Put Request session ${SOUTHBOUND_CONFIG_API}%2Fbridge%2F${BRIDGE} data=${body}
56 Should Contain ${ALLOWED_STATUS_CODES} ${resp.status_code}
58 Get Config Topology with Bridge
59 [Documentation] This will fetch the configuration topology from configuration data store to verify the bridge is added to the data store
60 ${resp} RequestsLibrary.Get Request session ${CONFIG_TOPO_API}
62 Should Be Equal As Strings ${resp.status_code} 200 Response status code error
63 Should Contain ${resp.content} ${BRIDGE}
65 Get Operational Topology with Bridge
66 [Documentation] This request will fetch the operational topology from the connected OVSDB nodes to verify the bridge is added to the data store
67 @{list} Create List ${BRIDGE}
68 Wait Until Keyword Succeeds 8s 2s Check For Elements At URI ${OPERATIONAL_TOPO_API}/topology/ovsdb:1 ${list}
70 Create Port and attach to a Bridge
71 [Documentation] This request will creates port/interface and attach it to the specific bridge
72 ${body} OperatingSystem.Get File ${OVSDB_CONFIG_DIR}/create_port.json
73 Log URL is ${SOUTHBOUND_CONFIG_API}%2Fbridge%2F${BRIDGE}/termination-point/vxlanport/
75 ${resp} RequestsLibrary.Put Request session ${SOUTHBOUND_CONFIG_API}%2Fbridge%2F${BRIDGE}/termination-point/vxlanport/ data=${body}
77 Should Contain ${ALLOWED_STATUS_CODES} ${resp.status_code}
79 Get Operational Topology with Port
80 [Documentation] This request will fetch the operational topology after the Port is added to the bridge
81 @{list} Create List ${BRIDGE} vxlanport
82 Wait Until Keyword Succeeds 8s 2s Check For Elements At URI ${OPERATIONAL_TOPO_API}/topology/ovsdb:1 ${list}
85 [Documentation] This request will delete the port node from the bridge node and data store.
86 ${resp} RequestsLibrary.Delete Request session ${SOUTHBOUND_CONFIG_API}%2Fbridge%2F${BRIDGE}/termination-point/vxlanport/
87 Should Be Equal As Strings ${resp.status_code} 200 Response status code error
89 Get Operational Topology after Deletion of Port
90 [Documentation] This request will fetch the operational topology after the Port is deleted
91 @{list} Create List vxlanport
92 Wait Until Keyword Succeeds 8s 2s Check For Elements Not At URI ${OPERATIONAL_TOPO_API}/topology/ovsdb:1 ${list}
95 [Documentation] This request will delete the bridge node from the config data store.
96 ${resp} RequestsLibrary.Delete Request session ${SOUTHBOUND_CONFIG_API}%2Fbridge%2F${BRIDGE}
97 Should Be Equal As Strings ${resp.status_code} 200 Response status code error
99 Get Operational Topology after Deletion of Bridge
100 [Documentation] This request will fetch the operational topology after the Bridge is deleted
101 @{list} Create List ${BRIDGE} vxlanport
102 Wait Until Keyword Succeeds 8s 2s Check For Elements Not At URI ${OPERATIONAL_TOPO_API}/topology/ovsdb:1 ${list}
104 Verify Config Still Has OVS Info
105 [Documentation] This will fetch the configuration topology from configuration data store to verify the bridge is added to the data store
106 ${resp} RequestsLibrary.Get Request session ${CONFIG_TOPO_API}
108 Should Be Equal As Strings ${resp.status_code} 200 Response status code error
109 Wait Until Keyword Succeeds 8s 2s Check For Elements At URI ${OPERATIONAL_TOPO_API}/topology/ovsdb:1 ${node_list}
111 Delete the OVSDB Node
112 [Documentation] This request will delete the OVSDB node
113 ${resp} RequestsLibrary.Delete Request session ${SOUTHBOUND_CONFIG_API}
114 Should Be Equal As Strings ${resp.status_code} 200 Response status code error
116 Get Operational Topology to make sure the connection has been deleted
117 [Documentation] This request will fetch the operational topology from the connected OVSDB nodes
118 @{list} Create List ovsdb://${TOOLS_SYSTEM_IP}:${OVSDB_PORT}
119 Wait Until Keyword Succeeds 8s 2s Check For Elements Not At URI ${OPERATIONAL_TOPO_API}/topology/ovsdb:1 ${list}
121 Get Configuration Topology to make sure the connection has been deleted
122 [Documentation] This request will fetch the configuration topology from the connected OVSDB nodes
123 @{list} Create List ovsdb://${TOOLS_SYSTEM_IP}:${OVSDB_PORT}
124 Wait Until Keyword Succeeds 8s 2s Check For Elements Not At URI ${CONFIG_TOPO_API}/topology/ovsdb:1 ${node_list}
126 Reconnect to OVSDB Node
127 [Documentation] Initiate the connection to OVSDB node from controller
128 ${sample} OperatingSystem.Get File ${OVSDB_CONFIG_DIR}/connect.json
129 ${sample1} Replace String ${sample} 127.0.0.1 ${TOOLS_SYSTEM_IP}
130 ${body} Replace String ${sample1} 61644 ${OVSDB_PORT}
131 Log URL is ${SOUTHBOUND_CONFIG_API}
133 ${resp} RequestsLibrary.Put Request session ${SOUTHBOUND_CONFIG_API} data=${body}
135 Should Contain ${ALLOWED_STATUS_CODES} ${resp.status_code}
137 Get Operational Topology After Node Reconnect
138 [Documentation] This request will fetch the operational topology from the connected OVSDB nodes to verify the bridge is added to the data store
139 Wait Until Keyword Succeeds 8s 2s Check For Elements At URI ${OPERATIONAL_TOPO_API}/topology/ovsdb:1 ${node_list}
141 Get Config Topology After Reconnect
142 [Documentation] This will fetch the configuration topology from configuration data store after reconnect
143 ${resp} RequestsLibrary.Get Request session ${CONFIG_TOPO_API}
145 Should Be Equal As Strings ${resp.status_code} 200 Response status code error
146 Wait Until Keyword Succeeds 8s 2s Check For Elements At URI ${OPERATIONAL_TOPO_API}/topology/ovsdb:1 ${node_list}
148 Create OVSDB NODE HOST1
149 [Documentation] This request will create OVSDB NODE HOST1 and attach it to the specific bridge
150 ${sample} OperatingSystem.Get File ${OVSDB_CONFIG_DIR}/create_node.json
151 ${sample1} Replace String ${sample} 127.0.0.1 ${TOOLS_SYSTEM_IP}
152 ${body} Replace String ${sample1} 61644 ${OVSDB_PORT}
153 Log URL is ${CONFIG_TOPO_API}/topology/ovsdb:1/
155 ${resp} RequestsLibrary.Post Request session ${CONFIG_TOPO_API}/topology/ovsdb:1 data=${body}
157 Should Contain ${ALLOWED_STATUS_CODES} ${resp.status_code}
160 [Documentation] This request will create QOS entry
161 ${body} OperatingSystem.Get File ${OVSDB_CONFIG_DIR}/create_qos.json
162 Log URL is ${CONFIG_TOPO_API}/topology/ovsdb:1/node/ovsdb:HOST1/ovsdb:qos-entries/${QOS}/
164 ${resp} RequestsLibrary.Put Request session ${CONFIG_TOPO_API}/topology/ovsdb:1/node/ovsdb:HOST1/ovsdb:qos-entries/${QOS}/ data=${body}
166 Should Contain ${ALLOWED_STATUS_CODES} ${resp.status_code}
168 Create Queue entry to the queues list of a ovsdb node
169 [Documentation] This request will creates Queue entry in the queues list of a ovsdb node
170 ${body} OperatingSystem.Get File ${OVSDB_CONFIG_DIR}/create_queue.json
171 Log URL is ${CONFIG_TOPO_API}/topology/ovsdb:1/node/ovsdb:HOST1/ovsdb:queues/${QUEUE}/
173 ${resp} RequestsLibrary.Put Request session ${CONFIG_TOPO_API}/topology/ovsdb:1/node/ovsdb:HOST1/ovsdb:queues/${QUEUE}/ data=${body}
175 Should Contain ${ALLOWED_STATUS_CODES} ${resp.status_code}
177 Update existing Queue entry to a OVSDB Node
178 [Documentation] This request will update the existing queue entry to a OVSDB Node
179 ${body} OperatingSystem.Get File ${OVSDB_CONFIG_DIR}/create_qoslinkedqueue.json
180 Log URL is ${CONFIG_TOPO_API}/topology/ovsdb:1/node/ovsdb:HOST1/ovsdb:queues/${QUEUE}/
182 ${resp} RequestsLibrary.Put Request session ${CONFIG_TOPO_API}/topology/ovsdb:1/node/ovsdb:HOST1/ovsdb:queues/${QUEUE}/ data=${body}
184 Should Contain ${ALLOWED_STATUS_CODES} ${resp.status_code}
186 Update QOS with a Linked queue entry to a OVSDB Node
187 [Documentation] This request will update the QOS entry with a Linked queue entry to a OVSDB Node
188 ${body} OperatingSystem.Get File ${OVSDB_CONFIG_DIR}/update_existingqos.json
189 Log URL is ${CONFIG_TOPO_API}/topology/ovsdb:1/node/ovsdb:HOST1/ovsdb:qos-entries/${QOS}/
191 ${resp} RequestsLibrary.Put Request session ${CONFIG_TOPO_API}/topology/ovsdb:1/node/ovsdb:HOST1/ovsdb:qos-entries/${QOS}/ data=${body}
193 Should Contain ${ALLOWED_STATUS_CODES} ${resp.status_code}
195 Get QOS Config Topology with port
196 [Documentation] This will fetch the configuration topology from configuration data store to verify the QOS is added to the data store
197 ${resp} RequestsLibrary.Get Request session ${CONFIG_TOPO_API}
199 Should Contain ${ALLOWED_STATUS_CODES} ${resp.status_code}
200 Should Contain ${resp.content} ${QOS}
202 Get QOS Operational Topology with port
203 [Documentation] This request will fetch the operational topology from the connected OVSDB nodes to verify the QOS is added to the data store
204 @{list} Create List ${QOS}
205 Wait Until Keyword Succeeds 8s 2s Check For Elements At URI ${OPERATIONAL_TOPO_API}/topology/ovsdb:1 ${list}
207 Get Queue Config Topology with port
208 [Documentation] This request will fetch the configuration topology from configuration data store to verify the Queue is added to the data store
209 ${resp} RequestsLibrary.Get Request session ${CONFIG_TOPO_API}
211 Should Contain ${ALLOWED_STATUS_CODES} ${resp.status_code}
212 Should Contain ${resp.content} ${QUEUE}
214 Get Queue Operational Topology with port
215 [Documentation] This request will fetch the operational topology from the connected OVSDB nodes to verify the Queue is added to the data store
216 @{list} Create List ${QUEUE}
217 Wait Until Keyword Succeeds 8s 2s Check For Elements At URI ${OPERATIONAL_TOPO_API}/topology/ovsdb:1 ${list}
219 Delete a Queue entry from a Qos entry
220 [Documentation] This request will Delete a Queue entry from a Qos entry
221 ${resp} RequestsLibrary.Delete Request session ${CONFIG_TOPO_API}/topology/ovsdb:1/node/ovsdb:HOST1/ovsdb:qos-entries/${QOS}/queue-list/0/
222 Should Contain ${ALLOWED_STATUS_CODES} ${resp.status_code}
224 Delete a QoS entry from a node
225 [Documentation] This request will Delete a QoS entry from a node.
226 ${resp} RequestsLibrary.Delete Request session ${CONFIG_TOPO_API}/topology/ovsdb:1/node/ovsdb:HOST1/ovsdb:qos-entries/${QOS}/
227 Should Contain ${ALLOWED_STATUS_CODES} ${resp.status_code}
229 Delete a Queue entry from an ovsdb node
230 [Documentation] This request will Delete a Queue entry from an ovsdb node
231 ${resp} RequestsLibrary.Delete Request session ${CONFIG_TOPO_API}/topology/ovsdb:1/node/ovsdb:HOST1/ovsdb:queues/${QUEUE}/
232 Should Contain ${ALLOWED_STATUS_CODES} ${resp.status_code}
234 Delete the OVSDB Node HOST1
235 [Documentation] This request will delete the OVSDB node
236 ${resp} RequestsLibrary.Delete Request session ${CONFIG_TOPO_API}/topology/ovsdb:1/node/ovsdb:HOST1
237 Should Contain ${ALLOWED_STATUS_CODES} ${resp.status_code}
239 Get Config Topology to verify that deleted configurations are cleaned from config datastore
240 [Documentation] This request will fetch the configuration topology from configuration data store to verify OVSDB NODE is deleted frrom the configuration data store
241 ${resp} RequestsLibrary.Get Request session ${CONFIG_TOPO_API}
243 Should Contain ${ALLOWED_STATUS_CODES} ${resp.status_code}
244 Should not Contain ${resp.content} ovsdb:HOST1
247 [Documentation] bug 4756 has been seen in the OVSDB Southbound suites. This test case should be one of the last test
249 Check Karaf Log File Does Not Have Messages ${ODL_SYSTEM_IP} SimpleShardDataTreeCohort.*Unexpected failure in validation phase
250 [Teardown] Report_Failure_Due_To_Bug 4756
253 [Documentation] bug 4794 has been seen in the OVSDB Southbound suites. This test case should be one of the last test
255 Check Karaf Log File Does Not Have Messages ${ODL_SYSTEM_IP} Shard.*shard-topology-operational An exception occurred while preCommitting transaction
256 [Teardown] Report_Failure_Due_To_Bug 4794
259 Configure 1 OVSDB Node Suite Setup
260 SetupUtils.Setup_Utils_For_Setup_And_Teardown
261 Open Controller Karaf Console On Background
262 Create Session session http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS}
264 Configure 1 OVSDB Node Suite Teardown
265 [Documentation] Cleans up test environment, close existing sessions.
266 Clean OVSDB Test Environment ${TOOLS_SYSTEM_IP}
267 RequestsLibrary.Delete Request session ${CONFIG_TOPO_API}/topology/ovsdb:1/node/ovsdb:%2F%2F${TOOLS_SYSTEM_IP}:${OVSDB_PORT}
268 ${resp} RequestsLibrary.Get Request session ${CONFIG_TOPO_API}