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 Variables ../../../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 Create a QOS and a Linked queue entry to a OVSDB Node
178 [Documentation] This request will create a QOS and a Linked 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
182 ${resp} RequestsLibrary.Put Request session ${CONFIG_TOPO_API}/topology/ovsdb:1/node/ovsdb:HOST1 data=${body}
184 Should Contain ${ALLOWED_STATUS_CODES} ${resp.status_code}
186 Get QOS Config Topology with port
187 [Documentation] This will fetch the configuration topology from configuration data store to verify the QOS is added to the data store
188 ${resp} RequestsLibrary.Get Request session ${CONFIG_TOPO_API}
190 Should Contain ${ALLOWED_STATUS_CODES} ${resp.status_code}
191 Should Contain ${resp.content} ${QOS}
193 Get QOS Operational Topology with port
194 [Documentation] This request will fetch the operational topology from the connected OVSDB nodes to verify the QOS is added to the data store
195 @{list} Create List ${QOS}
196 Wait Until Keyword Succeeds 8s 2s Check For Elements At URI ${OPERATIONAL_TOPO_API}/topology/ovsdb:1 ${list}
198 Get Queue Config Topology with port
199 [Documentation] This request will fetch the configuration topology from configuration data store to verify the Queue is added to the data store
200 ${resp} RequestsLibrary.Get Request session ${CONFIG_TOPO_API}
202 Should Contain ${ALLOWED_STATUS_CODES} ${resp.status_code}
203 Should Contain ${resp.content} ${QUEUE}
205 Get Queue Operational Topology with port
206 [Documentation] This request will fetch the operational topology from the connected OVSDB nodes to verify the Queue is added to the data store
207 @{list} Create List ${QUEUE}
208 Wait Until Keyword Succeeds 8s 2s Check For Elements At URI ${OPERATIONAL_TOPO_API}/topology/ovsdb:1 ${list}
210 Delete a Queue entry from a Qos entry
211 [Documentation] This request will Delete a Queue entry from a Qos entry
212 ${resp} RequestsLibrary.Delete Request session ${CONFIG_TOPO_API}/topology/ovsdb:1/node/ovsdb:HOST1/ovsdb:qos-entries/${QOS}/queue-list/0/
213 Should Contain ${ALLOWED_STATUS_CODES} ${resp.status_code}
215 Delete a QoS entry from a node
216 [Documentation] This request will Delete a QoS entry from a node.
217 ${resp} RequestsLibrary.Delete Request session ${CONFIG_TOPO_API}/topology/ovsdb:1/node/ovsdb:HOST1/ovsdb:qos-entries/${QOS}/
218 Should Contain ${ALLOWED_STATUS_CODES} ${resp.status_code}
220 Delete a Queue entry from an ovsdb node
221 [Documentation] This request will Delete a Queue entry from an ovsdb node
222 ${resp} RequestsLibrary.Delete Request session ${CONFIG_TOPO_API}/topology/ovsdb:1/node/ovsdb:HOST1/ovsdb:queues/${QUEUE}/
223 Should Contain ${ALLOWED_STATUS_CODES} ${resp.status_code}
225 Delete the OVSDB Node HOST1
226 [Documentation] This request will delete the OVSDB node
227 ${resp} RequestsLibrary.Delete Request session ${CONFIG_TOPO_API}/topology/ovsdb:1/node/ovsdb:HOST1
228 Should Contain ${ALLOWED_STATUS_CODES} ${resp.status_code}
230 Get Config Topology to verify that deleted configurations are cleaned from config datastore
231 [Documentation] This request will fetch the configuration topology from configuration data store to verify OVSDB NODE is deleted frrom the configuration data store
232 ${resp} RequestsLibrary.Get Request session ${CONFIG_TOPO_API}
234 Should Contain ${ALLOWED_STATUS_CODES} ${resp.status_code}
235 Should not Contain ${resp.content} ovsdb:HOST1
238 [Documentation] bug 4756 has been seen in the OVSDB Southbound suites. This test case should be one of the last test
240 Check Karaf Log File Does Not Have Messages ${ODL_SYSTEM_IP} SimpleShardDataTreeCohort.*Unexpected failure in validation phase
241 [Teardown] Report_Failure_Due_To_Bug 4756
244 [Documentation] bug 4794 has been seen in the OVSDB Southbound suites. This test case should be one of the last test
246 Check Karaf Log File Does Not Have Messages ${ODL_SYSTEM_IP} Shard.*shard-topology-operational An exception occurred while preCommitting transaction
247 [Teardown] Report_Failure_Due_To_Bug 4794
250 Configure 1 OVSDB Node Suite Setup
251 SetupUtils.Setup_Utils_For_Setup_And_Teardown
252 Open Controller Karaf Console On Background
253 Create Session session http://${ODL_SYSTEM_IP}:${RESTCONFPORT} auth=${AUTH} headers=${HEADERS}
255 Configure 1 OVSDB Node Suite Teardown
256 [Documentation] Cleans up test environment, close existing sessions.
257 Clean OVSDB Test Environment ${TOOLS_SYSTEM_IP}
258 RequestsLibrary.Delete Request session ${CONFIG_TOPO_API}/topology/ovsdb:1/node/ovsdb:%2F%2F${TOOLS_SYSTEM_IP}:${OVSDB_PORT}
259 ${resp} RequestsLibrary.Get Request session ${CONFIG_TOPO_API}