2 Documentation Test suite for Connection Manager
4 Library RequestsLibrary
5 Resource ../../../libraries/OVSDB.robot
6 Resource ../../../libraries/SetupUtils.robot
7 Resource ../../../libraries/Utils.robot
8 Resource ../../../variables/Variables.robot
9 Resource ../../../variables/ovsdb/Variables.robot
11 Suite Setup OVSDB.Suite Setup
12 Suite Teardown Suite Teardown
13 Test Setup SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
19 ${BRIDGE} ovsconf_exit_br
22 @{NODE_LIST} ${BRIDGE} ${PORT1}
26 Create a Topology in OVSDB node
27 [Documentation] Create topology in OVSDB and ready it for further tests
28 Utils.Run Command On Mininet ${TOOLS_SYSTEM_IP} sudo ovs-vsctl del-manager
29 Utils.Run Command On Mininet ${TOOLS_SYSTEM_IP} sudo ovs-vsctl add-br ${BRIDGE}
30 Utils.Run Command On Mininet
31 ... ${TOOLS_SYSTEM_IP}
32 ... sudo ovs-vsctl add-port ${BRIDGE} ${PORT1} -- set Interface ${PORT1} type=vxlan options:remote_ip=192.168.1.11
33 Utils.Run Command On Mininet ${TOOLS_SYSTEM_IP} sudo ovs-vsctl set-manager ptcp:6634
36 [Documentation] Initiate the connection to OVSDB node from controller
37 OVSDB.Connect To Ovsdb Node ${TOOLS_SYSTEM_IP}
39 Get Operational Topology
40 [Documentation] This request will fetch the operational topology from the connected OVSDB nodes
41 BuiltIn.Wait Until Keyword Succeeds
44 ... Utils.Check For Elements At URI
45 ... ${RFC8040_OPERATIONAL_TOPO_API}
47 ... pretty_print_json=True
48 [Teardown] Utils.Report_Failure_Due_To_Bug 5221
50 Verify Bridge Port Not In Config DS
51 [Documentation] This will fetch the configuration topology from configuration data store to verify the bridge is added to the data store
52 @{list} = BuiltIn.Create List ${PORT1}
53 BuiltIn.Wait Until Keyword Succeeds
56 ... Utils.Check For Elements Not At URI
57 ... ${RFC8040_CONFIG_TOPO_API}
59 ... pretty_print_json=True
61 Create bridge of already added bridge
62 [Documentation] This will add bridge to the config datastore
63 OVSDB.Add Bridge To Ovsdb Node
64 ... ${TOOLS_SYSTEM_IP}:${OVSDB_NODE_PORT}
65 ... ${TOOLS_SYSTEM_IP}
69 Get Config Topology with Bridge
70 [Documentation] This will fetch the configuration topology from configuration data store to verify the bridge is added to the data store
71 @{list} = BuiltIn.Create List ${BRIDGE}
72 BuiltIn.Wait Until Keyword Succeeds
75 ... Utils.Check For Elements At URI
76 ... ${RFC8040_CONFIG_TOPO_API}
78 ... pretty_print_json=True
80 Create Port of already added port in OVSDB
81 [Documentation] This will add port/interface to the config datastore
82 OVSDB.Add Termination Point ${TOOLS_SYSTEM_IP}:${OVSDB_NODE_PORT} ${BRIDGE} ${PORT1} 10.0.0.10
84 Get Config Topology with Bridge and Port
85 [Documentation] This will fetch the configuration topology from configuration data store to verify the bridge is added to the data store
86 BuiltIn.Wait Until Keyword Succeeds
89 ... Utils.Check For Elements At URI
90 ... ${RFC8040_CONFIG_TOPO_API}
92 ... pretty_print_json=True
94 Modify the destination IP of Port
95 [Documentation] This will modify the dst ip of existing port
96 OVSDB.Add Termination Point ${TOOLS_SYSTEM_IP}:${OVSDB_NODE_PORT} ${BRIDGE} ${PORT1} 10.0.0.19
98 Get Operational Topology with modified Port
99 [Documentation] This request will fetch the operational topology after the Port is added to the bridge
100 @{list} = BuiltIn.Create List ${BRIDGE} ${PORT1} 10.0.0.19
101 BuiltIn.Wait Until Keyword Succeeds
104 ... Utils.Check For Elements At URI
105 ... ${RFC8040_OPERATIONAL_TOPO_API}
107 ... pretty_print_json=True
108 [Teardown] Utils.Report_Failure_Due_To_Bug 5221
110 Create Port and attach to a Bridge
111 [Documentation] This request will creates port/interface and attach it to the specific bridge
112 OVSDB.Add Termination Point ${TOOLS_SYSTEM_IP}:${OVSDB_NODE_PORT} ${BRIDGE} ${PORT2} 10.0.0.121
114 Get Operational Topology with Port
115 [Documentation] This request will fetch the operational topology after the Port is added to the bridge
116 @{list} = BuiltIn.Create List ${BRIDGE} ${PORT2}
117 BuiltIn.Wait Until Keyword Succeeds
120 ... Utils.Check For Elements At URI
121 ... ${RFC8040_OPERATIONAL_TOPO_API}
123 ... pretty_print_json=True
124 [Teardown] Utils.Report_Failure_Due_To_Bug 5221
127 [Documentation] This request will delete the port node from the bridge node and data store.
128 RequestsLibrary.DELETE On Session
130 ... url=${RFC8040_SOUTHBOUND_NODE_TOOLS_API}%2Fbridge%2F${BRIDGE}/termination-point=${PORT1}
131 ... expected_status=204
133 Get Operational Topology after deletion of Port1
134 [Documentation] This request will fetch the operational topology after the Port is added to the bridge
135 @{list} = BuiltIn.Create List ${PORT1}
136 BuiltIn.Wait Until Keyword Succeeds
139 ... Utils.Check For Elements Not At URI
140 ... ${RFC8040_OPERATIONAL_TOPO_API}
142 ... pretty_print_json=True
145 [Documentation] This request will delete the port node from the bridge node and data store.
146 RequestsLibrary.DELETE On Session
148 ... url=${RFC8040_SOUTHBOUND_NODE_TOOLS_API}%2Fbridge%2F${BRIDGE}/termination-point=${PORT2}
149 ... expected_status=204
151 Get Operational Topology after Deletion of Port2
152 [Documentation] This request will fetch the operational topology after the Port is deleted
153 @{list} = BuiltIn.Create List ${PORT2}
154 BuiltIn.Wait Until Keyword Succeeds
157 ... Utils.Check For Elements Not At URI
158 ... ${RFC8040_OPERATIONAL_TOPO_API}
160 ... pretty_print_json=True
163 [Documentation] This request will delete the bridge node from the config data store.
164 RequestsLibrary.DELETE On Session
166 ... url=${RFC8040_SOUTHBOUND_NODE_TOOLS_API}%2Fbridge%2F${BRIDGE}
167 ... expected_status=204
169 Get Operational Topology after Deletion of Bridge
170 [Documentation] This request will fetch the operational topology after the Bridge is deleted
171 @{list} = BuiltIn.Create List ${BRIDGE} ${PORT1} ${PORT2}
172 BuiltIn.Wait Until Keyword Succeeds
175 ... Utils.Check For Elements Not At URI
176 ... ${RFC8040_OPERATIONAL_TOPO_API}
178 ... pretty_print_json=True
180 Delete the OVSDB Node
181 [Documentation] This request will delete the OVSDB node
182 RequestsLibrary.DELETE On Session
184 ... url=${RFC8040_SOUTHBOUND_NODE_TOOLS_API}
185 ... expected_status=204
187 Get Operational Topology after Deletion of OVSDB Node
188 [Documentation] This request will fetch the operational topology after the OVSDB node is deleted
189 @{list} = BuiltIn.Create List
190 ... ovsdb://${TOOLS_SYSTEM_IP}:${OVSDB_NODE_PORT}
194 BuiltIn.Wait Until Keyword Succeeds
197 ... Utils.Check For Elements Not At URI
198 ... ${RFC8040_OPERATIONAL_TOPO_API}
200 ... pretty_print_json=True
203 [Documentation] bug 4756 has been seen in the OVSDB Southbound suites. This test case should be one of the last test
205 Utils.Check Karaf Log File Does Not Have Messages
207 ... SimpleShardDataTreeCohort.*Unexpected failure in validation phase
208 [Teardown] Utils.Report_Failure_Due_To_Bug 4756
211 [Documentation] bug 4794 has been seen in the OVSDB Southbound suites. This test case should be one of the last test
213 Utils.Check Karaf Log File Does Not Have Messages
215 ... Shard.*shard-topology-operational An exception occurred while preCommitting transaction
216 [Teardown] Utils.Report_Failure_Due_To_Bug 4794
221 [Documentation] Cleans up test environment, close existing sessions.
222 @{uris} = Builtin.Create List ${RFC8040_SOUTHBOUND_NODE_TOOLS_API}
223 OVSDB.Suite Teardown ${uris}