BUG 8280: CSIT reproduction
[integration/test.git] / csit / suites / ovsdb / Southbound_Domain / Bug_Validation.robot
1 *** Settings ***
2 Documentation     Collection of test cases to validate OVSDB projects bugs.
3 ...
4 ...               TODO: there seems to be some thoughts around never having one-off bug reproduction
5 ...               test cases, but rather they should exist as another test case in some appropriate
6 ...               suite. Also it was suggested that using bug ids for test case names was not ideal
7 ...               this to-do is written in case it's decided to refactor all of these test cases out
8 ...               of this suite and/or to rename the test cases at a later time.
9 Suite Setup       OVSDB Connection Manager Suite Setup
10 Suite Teardown    OVSDB Connection Manager Suite Teardown
11 Test Setup        SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
12 Force Tags        Southbound
13 Library           OperatingSystem
14 Library           String
15 Library           RequestsLibrary
16 Variables         ../../../variables/Variables.py
17 Resource          ../../../libraries/Utils.robot
18 Resource          ../../../libraries/SetupUtils.robot
19 Resource          ../../../libraries/WaitForFailure.robot
20 Resource          ../../../libraries/OVSDB.robot
21
22 *** Variables ***
23 ${OVSDB_PORT}     6634
24 ${BRIDGE}         ovsdb-csit-bug-validation
25 ${SOUTHBOUND_CONFIG_API}    ${CONFIG_TOPO_API}/topology/ovsdb:1/node/ovsdb:%2F%2F${TOOLS_SYSTEM_IP}:${OVSDB_PORT}
26 ${OVSDB_CONFIG_DIR}    ${CURDIR}/../../../variables/ovsdb
27
28 *** Test Cases ***
29 Bug 7414 Same Endpoint Name
30     [Documentation]    To help validate bug 7414, this test case will send a single rest request to create two
31     ...    ports (one for each of two OVS instances connected). The port names will be the same.
32     ...    If the bug happens, the request would be accepted, but internally the two creations are seen as the
33     ...    same and there is a conflict such that neither ovs will receive the port create.
34     [Tags]    7414
35     [Setup]    Run Keywords    Clean OVSDB Test Environment    ${TOOLS_SYSTEM_IP}
36     ...    AND    Clean OVSDB Test Environment    ${TOOLS_SYSTEM_2_IP}
37     # connect two ovs
38     Run Command On Remote System    ${TOOLS_SYSTEM_IP}    sudo ovs-vsctl set-manager tcp:${ODL_SYSTEM_IP}:6640
39     Run Command On Remote System    ${TOOLS_SYSTEM_2_IP}    sudo ovs-vsctl set-manager tcp:${ODL_SYSTEM_IP}:6640
40     Wait Until Keyword Succeeds    5s    1s    Verify OVS Reports Connected    ${TOOLS_SYSTEM_IP}
41     Wait Until Keyword Succeeds    5s    1s    Verify OVS Reports Connected    ${TOOLS_SYSTEM_2_IP}
42     # add brtest to both
43     Run Command On Remote System    ${TOOLS_SYSTEM_IP}    sudo ovs-vsctl add-br ${BRIDGE}
44     Run Command On Remote System    ${TOOLS_SYSTEM_2_IP}    sudo ovs-vsctl add-br ${BRIDGE}
45     # send one rest request to create a TP endpoint on each ovs (same name)
46     ${body}=    Modify Multi Port Body    vtep1    vtep1
47     ${resp}    RequestsLibrary.Put Request    session    ${CONFIG_TOPO_API}    data=${body}
48     Log    ${resp.content}
49     # check that each ovs has the correct endpoint
50     ${ovs_1_output}=    Run Command On Remote System    ${TOOLS_SYSTEM_IP}    sudo ovs-vsctl show
51     Log    ${ovs_1_output}
52     ${ovs_2_output}=    Run Command On Remote System    ${TOOLS_SYSTEM_2_IP}    sudo ovs-vsctl show
53     Log    ${ovs_2_output}
54     Should Contain    ${ovs_1_output}    local_ip="${TOOLS_SYSTEM_IP}", remote_ip="${TOOLS_SYSTEM_2_IP}"
55     Should Not Contain    ${ovs_1_output}    local_ip="${TOOLS_SYSTEM_2_IP}", remote_ip="${TOOLS_SYSTEM_IP}"
56     Should Contain    ${ovs_2_output}    local_ip="${TOOLS_SYSTEM_2_IP}", remote_ip="${TOOLS_SYSTEM_IP}"
57     Should Not Contain    ${ovs_2_output}    local_ip="${TOOLS_SYSTEM_IP}", remote_ip="${TOOLS_SYSTEM_2_IP}"
58     [Teardown]    Run Keywords    RequestsLibrary.Delete Request    session    ${CONFIG_TOPO_API}    data=${body}
59     ...    AND    Clean OVSDB Test Environment    ${TOOLS_SYSTEM_IP}
60     ...    AND    Clean OVSDB Test Environment    ${TOOLS_SYSTEM_2_IP}
61
62 Bug 7414 Different Endpoint Name
63     [Documentation]    This test case is supplemental to the other test case for bug 7414. Even when the other
64     ...    test case would fail and no ovs would receive a port create because the port names are the same, this
65     ...    case should still be able to create ports on the ovs since the port names are different. However,
66     ...    another symptom of this bug is that multiple creations in the same request would end up creating
67     ...    all the ports on all of the ovs, which is incorrect. Both test cases check for this, but in the
68     ...    case where the other test case were to fail this would also help understand if this symptom is still
69     ...    happening
70     [Tags]    7414
71     [Setup]    Clean OVSDB Test Environment
72     # connect two ovs
73     Run Command On Remote System    ${TOOLS_SYSTEM_IP}    sudo ovs-vsctl set-manager tcp:${ODL_SYSTEM_IP}:6640
74     Run Command On Remote System    ${TOOLS_SYSTEM_2_IP}    sudo ovs-vsctl set-manager tcp:${ODL_SYSTEM_IP}:6640
75     Wait Until Keyword Succeeds    5s    1s    Verify OVS Reports Connected    ${TOOLS_SYSTEM_IP}
76     Wait Until Keyword Succeeds    5s    1s    Verify OVS Reports Connected    ${TOOLS_SYSTEM_2_IP}
77     # add brtest to both
78     Run Command On Remote System    ${TOOLS_SYSTEM_IP}    sudo ovs-vsctl add-br ${BRIDGE}
79     Run Command On Remote System    ${TOOLS_SYSTEM_2_IP}    sudo ovs-vsctl add-br ${BRIDGE}
80     # send one rest request to create a TP endpoint on each ovs (different name)
81     ${body}=    Modify Multi Port Body    vtep1    vtep2
82     ${resp}    RequestsLibrary.Put Request    session    ${CONFIG_TOPO_API}    data=${body}
83     Log    ${resp.content}
84     # check that each ovs has the correct endpoint
85     ${ovs_1_output}=    Run Command On Remote System    ${TOOLS_SYSTEM_IP}    sudo ovs-vsctl show
86     Log    ${ovs_1_output}
87     ${ovs_2_output}=    Run Command On Remote System    ${TOOLS_SYSTEM_2_IP}    sudo ovs-vsctl show
88     Log    ${ovs_2_output}
89     Should Contain    ${ovs_1_output}    local_ip="${TOOLS_SYSTEM_IP}", remote_ip="${TOOLS_SYSTEM_2_IP}"
90     Should Not Contain    ${ovs_1_output}    local_ip="${TOOLS_SYSTEM_2_IP}", remote_ip="${TOOLS_SYSTEM_IP}"
91     Should Contain    ${ovs_2_output}    local_ip="${TOOLS_SYSTEM_2_IP}", remote_ip="${TOOLS_SYSTEM_IP}"
92     Should Not Contain    ${ovs_2_output}    local_ip="${TOOLS_SYSTEM_IP}", remote_ip="${TOOLS_SYSTEM_2_IP}"
93     [Teardown]    Run Keywords    RequestsLibrary.Delete Request    session    ${CONFIG_TOPO_API}    data=${body}
94     ...    AND    Clean OVSDB Test Environment    ${TOOLS_SYSTEM_IP}
95     ...    AND    Clean OVSDB Test Environment    ${TOOLS_SYSTEM_2_IP}
96
97 Bug 5221
98     [Documentation]    In the case that an ovs node is rebooted, or the ovs service is
99     ...    otherwise restarted, a controller initiated connection should reconnect when
100     ...    the ovs is ready and available.
101     [Setup]    Clean OVSDB Test Environment
102     Run Command On Remote System    ${TOOLS_SYSTEM_IP}    sudo ovs-vsctl set-manager ptcp:${OVSDB_PORT}
103     Connect Controller To OVSDB Node
104     @{list}    Create List    ovsdb://${TOOLS_SYSTEM_IP}:${OVSDB_PORT}
105     Wait Until Keyword Succeeds    8s    2s    Check For Elements At URI    ${OPERATIONAL_TOPO_API}/topology/ovsdb:1    ${list}
106     Create Bridge    ${TOOLS_SYSTEM_IP}:6634    ${BRIDGE}
107     @{list}    Create List    ovsdb://${TOOLS_SYSTEM_IP}:${OVSDB_PORT}/bridge/${BRIDGE}
108     Wait Until Keyword Succeeds    8s    2s    Check For Elements At URI    ${OPERATIONAL_TOPO_API}/topology/ovsdb:1    ${list}
109     Run Command On Remote System    ${TOOLS_SYSTEM_IP}    sudo /usr/share/openvswitch/scripts/ovs-ctl stop
110     Wait Until Keyword Succeeds    8s    2s    Check For Elements Not At URI    ${OPERATIONAL_TOPO_API}/topology/ovsdb:1    ${list}
111     Run Command On Remote System    ${TOOLS_SYSTEM_IP}    sudo /usr/share/openvswitch/scripts/ovs-ctl start
112     # Depending on when the retry timers are firing, it may take some 10s of seconds to reconnect, so setting to 30 to cover that.
113     Wait Until Keyword Succeeds    30s    2s    Check For Elements At URI    ${OPERATIONAL_TOPO_API}/topology/ovsdb:1    ${list}
114     [Teardown]    Run Keywords    Clean OVSDB Test Environment
115     ...    AND    RequestsLibrary.Delete Request    session    ${CONFIG_TOPO_API}/topology/ovsdb:1/node/ovsdb:%2F%2F${TOOLS_SYSTEM_IP}:6634%2Fbridge%2F${BRIDGE}
116     ...    AND    RequestsLibrary.Delete Request    session    ${CONFIG_TOPO_API}/topology/ovsdb:1/node/ovsdb:%2F%2F${TOOLS_SYSTEM_IP}:6634
117     ...    AND    Report_Failure_Due_To_Bug    5221
118
119 Bug 5177
120     [Documentation]    This test case will recreate the bug using the same basic steps as
121     ...    provided in the bug, and noted here:
122     ...    1) create bridge in config using the UUID determined in Suite Setup
123     ...    2) connect ovs (vsctl set-manager)
124     ...    3) Fail if node is not discovered in Operational Store
125     Run Command On Remote System    ${TOOLS_SYSTEM_IP}    sudo ovs-vsctl set-manager tcp:${ODL_SYSTEM_IP}:6640
126     Wait Until Keyword Succeeds    5s    1s    Verify OVS Reports Connected
127     ${ovsdb_uuid}=    Get OVSDB UUID    ${TOOLS_SYSTEM_IP}
128     Run Command On Remote System    ${TOOLS_SYSTEM_IP}    sudo ovs-vsctl del-manager
129     # Suite teardown wants this ${ovsdb_uuid} variable for it's best effort cleanup, so making it visible at suite level.
130     Set Suite Variable    ${ovsdb_uuid}
131     ${node}    Set Variable    uuid/${ovsdb_uuid}
132     Create Bridge    ${node}    ${BRIDGE}
133     ${resp}    RequestsLibrary.Get Request    session    ${CONFIG_TOPO_API}
134     Log    ${resp.content}
135     Should Be Equal As Strings    ${resp.status_code}    200    Response    status code error
136     Should Contain    ${resp.content}    ${node}/bridge/${BRIDGE}
137     Run Command On Remote System    ${TOOLS_SYSTEM_IP}    sudo ovs-vsctl set-manager tcp:${ODL_SYSTEM_IP}:6640
138     @{list}    Create List    ${BRIDGE}
139     Wait Until Keyword Succeeds    8s    2s    Check For Elements At URI    ${OPERATIONAL_TOPO_API}/topology/ovsdb:1    ${list}
140     [Teardown]    Run Keywords    Clean OVSDB Test Environment
141     ...    AND    Report_Failure_Due_To_Bug    5177
142
143 Bug 4794
144     [Documentation]    This test is dependent on the work done in the Bug 5177 test case so should
145     ...    always be executed immediately after.
146     ...    1) delete bridge in config
147     ...    2) Poll and Fail if exception is seen in karaf.log
148     ${node}    Set Variable    ovsdb:%2F%2Fuuid%2F${ovsdb_uuid}
149     ${resp}    RequestsLibrary.Delete Request    session    ${CONFIG_TOPO_API}/topology/ovsdb:1/node/${node}%2Fbridge%2F${BRIDGE}
150     Should Be Equal As Strings    ${resp.status_code}    200    Response    status code error
151     Run Command On Remote System    ${TOOLS_SYSTEM_IP}    sudo ovs-vsctl del-manager
152     # If the exception is seen in karaf.log within 10s, the following line will FAIL, which is the point.
153     Verify_Keyword_Does_Not_Fail_Within_Timeout    10s    1s    Check Karaf Log File Does Not Have Messages    ${ODL_SYSTEM_IP}    Shard.*shard-topology-operational An exception occurred while preCommitting transaction
154     # TODO: Bug 5178
155     [Teardown]    Run Keywords    Clean OVSDB Test Environment
156     ...    AND    Report_Failure_Due_To_Bug    4794
157
158 Bug 8280
159     [Documentation]    Any config created for a bridge (e.g. added ports) should be reconciled when a bridge is
160     ...    reconnected. This test case will create two ports via REST and validate that the bridge has those
161     ...    ports. At that point, the bridge will be disconnected from the controller and the 2nd created port
162     ...    will be manually removed. The bridge will be reconnected and the 2nd port should be re-added to the
163     ...    bridge. If not, then bug 8280 will be found and the test case will fail
164     [Tags]    8280
165     [Setup]    Run Keywords    SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
166     ...    AND    Clean OVSDB Test Environment
167     Run Command On Remote System    ${TOOLS_SYSTEM_IP}    sudo ovs-vsctl set-manager tcp:${ODL_SYSTEM_IP}:6640
168     Wait Until Keyword Succeeds    5s    1s    Verify OVS Reports Connected    ${TOOLS_SYSTEM_IP}
169     ${ovs_uuid}=    Get OVSDB UUID    ${TOOLS_SYSTEM_IP}
170     Create Bridge    uuid/${ovs_uuid}    ${BRIDGE}
171     Add Termination Point    uuid%2F${ovs_uuid}    ${BRIDGE}    port1
172     Add Termination Point    uuid%2F${ovs_uuid}    ${BRIDGE}    port2
173     ${config_store_elements}    Create List    ${BRIDGE}    port1    port2
174     Check For Elements At URI    ${CONFIG_TOPO_API}    ${config_store_elements}
175     ${ovs_output}=    Run Command On Remote System    ${TOOLS_SYSTEM_IP}    sudo ovs-vsctl show
176     Log    ${ovs_output}
177     ${ovs_output}=    Run Command On Remote System    ${TOOLS_SYSTEM_IP}    sudo ovs-vsctl del-manager
178     ${ovs_output}=    Run Command On Remote System    ${TOOLS_SYSTEM_IP}    sudo ovs-vsctl del-port ${BRIDGE} port2
179     Verify Ovs-vsctl Output    show    Port "port2"    ${TOOLS_SYSTEM_IP}    False
180     Run Command On Remote System    ${TOOLS_SYSTEM_IP}    sudo ovs-vsctl set-manager tcp:${ODL_SYSTEM_IP}:6640
181     Wait Until Keyword Succeeds    5s    1s    Verify OVS Reports Connected    ${TOOLS_SYSTEM_IP}
182     Check For Elements At URI    ${CONFIG_TOPO_API}    ${config_store_elements}
183     Wait Until Keyword Succeeds    5s    1s    Verify Ovs-vsctl Output    show    Port "port2"
184     [Teardown]    RequestsLibrary.Delete Request    session    ${CONFIG_TOPO_API}/topology/ovsdb:1/node/ovsdb:%2F%2Fuuid%2F${ovs_uuid}%2Fbridge%2F${BRIDGE}
185
186 Bug 7160
187     [Documentation]    If this bug is reproduced, it's possible that the operational store will be
188     ...    stuck with leftover nodes and further system tests could fail. It's advised to run this
189     ...    test last if possible. See the bug description for high level steps to reproduce
190     ...    https://bugs.opendaylight.org/show_bug.cgi?id=7160#c0
191     [Setup]    Run Keywords    SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
192     ...    AND    Clean OVSDB Test Environment
193     Run Command On Remote System    ${TOOLS_SYSTEM_IP}    sudo ovs-vsctl set-manager ptcp:${OVSDB_PORT}
194     Connect Controller To OVSDB Node
195     ${QOS}=    Set Variable    QOS-1
196     ${QUEUE}=    Set Variable    QUEUE-1
197     ${sample}    OperatingSystem.Get File    ${OVSDB_CONFIG_DIR}/create_node.json
198     ${sample1}    Replace String    ${sample}    127.0.0.1    ${TOOLS_SYSTEM_IP}
199     ${body}    Replace String    ${sample1}    61644    ${OVSDB_PORT}
200     ${resp}    RequestsLibrary.Post Request    session    ${CONFIG_TOPO_API}/topology/ovsdb:1    data=${body}
201     Log Config And Operational Topology
202     ${body}    OperatingSystem.Get File    ${OVSDB_CONFIG_DIR}/create_qos.json
203     ${resp}    RequestsLibrary.Put Request    session    ${CONFIG_TOPO_API}/topology/ovsdb:1/node/ovsdb:HOST1/ovsdb:qos-entries/${QOS}/    data=${body}
204     Log Config And Operational Topology
205     ${body}    OperatingSystem.Get File    ${OVSDB_CONFIG_DIR}/create_queue.json
206     ${resp}    RequestsLibrary.Put Request    session    ${CONFIG_TOPO_API}/topology/ovsdb:1/node/ovsdb:HOST1/ovsdb:queues/${QUEUE}/    data=${body}
207     Log Config And Operational Topology
208     ${body}    OperatingSystem.Get File    ${OVSDB_CONFIG_DIR}/bug_7160/create_qoslinkedqueue.json
209     ${resp}    RequestsLibrary.Put Request    session    ${CONFIG_TOPO_API}/topology/ovsdb:1/node/ovsdb:HOST1    data=${body}
210     Log Config And Operational Topology
211     ${resp}    RequestsLibrary.Delete Request    session    ${CONFIG_TOPO_API}/topology/ovsdb:1/node/ovsdb:HOST1/ovsdb:qos-entries/${QOS}/queue-list/0/
212     Log Config And Operational Topology
213     ${resp}    RequestsLibrary.Delete Request    session    ${CONFIG_TOPO_API}/topology/ovsdb:1/node/ovsdb:HOST1/ovsdb:qos-entries/${QOS}/
214     Log Config And Operational Topology
215     ${resp}    RequestsLibrary.Delete Request    session    ${CONFIG_TOPO_API}/topology/ovsdb:1/node/ovsdb:HOST1/ovsdb:queues/${QUEUE}/
216     Log Config And Operational Topology
217     ${resp}    RequestsLibrary.Delete Request    session    ${CONFIG_TOPO_API}/topology/ovsdb:1/node/ovsdb:HOST1
218     Log Config And Operational Topology
219     Run Command On Remote System    ${TOOLS_SYSTEM_IP}    sudo ovs-vsctl del-manager
220     ${node}    Set Variable    ovsdb:%2F%2F${TOOLS_SYSTEM_IP}:${OVSDB_PORT}
221     RequestsLibrary.Delete Request    session    ${CONFIG_TOPO_API}/topology/ovsdb:1/node/${node}
222     Log Config And Operational Topology
223     Wait Until Keyword Succeeds    5s    1s    Config and Operational Topology Should Be Empty
224     [Teardown]    Run Keywords    Clean OVSDB Test Environment
225     ...    AND    Report_Failure_Due_To_Bug    7160
226
227 *** Keywords ***
228 OVSDB Connection Manager Suite Setup
229     SetupUtils.Setup_Utils_For_Setup_And_Teardown
230     Open Controller Karaf Console On Background
231     Create Session    session    http://${ODL_SYSTEM_IP}:${RESTCONFPORT}    auth=${AUTH}    headers=${HEADERS}
232     Clean OVSDB Test Environment    ${TOOLS_SYSTEM_IP}
233     Run Command On Remote System    ${TOOLS_SYSTEM_IP}    sudo ovs-vsctl set-manager tcp:${ODL_SYSTEM_IP}:6640
234     Wait Until Keyword Succeeds    5s    1s    Verify OVS Reports Connected
235     Run Command On Remote System    ${TOOLS_SYSTEM_IP}    sudo ovs-vsctl del-manager
236
237 OVSDB Connection Manager Suite Teardown
238     [Documentation]    Cleans up test environment, close existing sessions.
239     Clean OVSDB Test Environment    ${TOOLS_SYSTEM_IP}
240     # Best effort to clean config store, by deleting all the types of nodes that are used in this suite
241     ${node}    Set Variable    ovsdb:%2F%2Fuuid%2F${ovsdb_uuid}
242     RequestsLibrary.Delete Request    session    ${CONFIG_TOPO_API}/topology/ovsdb:1/node/${node}
243     RequestsLibrary.Delete Request    session    ${CONFIG_TOPO_API}/topology/ovsdb:1/node/${node}%2Fbridge%2F${BRIDGE}
244     ${node}    Set Variable    ovsdb:%2F%2F${TOOLS_SYSTEM_IP}:${OVSDB_PORT}
245     RequestsLibrary.Delete Request    session    ${CONFIG_TOPO_API}/topology/ovsdb:1/node/${node}
246     RequestsLibrary.Delete Request    session    ${CONFIG_TOPO_API}/topology/ovsdb:1/node/${node}%2Fbridge%2F${BRIDGE}
247     ${resp}    RequestsLibrary.Get Request    session    ${CONFIG_TOPO_API}
248     Log    ${resp.content}
249     Delete All Sessions
250     # TODO: both Create Bridge and Connect Controller To OVSDB Node keywords below should be moved to a library
251     #    and all the suites using this kind of work can move to using the library instead of
252     #    doing all this work each time.
253
254 Create Bridge
255     [Arguments]    ${node_string}    ${bridge}
256     [Documentation]    This will create bridge on the specified OVSDB node.
257     ${body}    OperatingSystem.Get File    ${OVSDB_CONFIG_DIR}/create_bridge.json
258     ${body}    Replace String    ${body}    ovsdb://127.0.0.1:61644    ovsdb://${node_string}
259     ${body}    Replace String    ${body}    tcp:127.0.0.1:6633    tcp:${ODL_SYSTEM_IP}:6633
260     ${body}    Replace String    ${body}    127.0.0.1    ${TOOLS_SYSTEM_IP}
261     ${body}    Replace String    ${body}    br01    ${bridge}
262     ${body}    Replace String    ${body}    61644    ${OVSDB_PORT}
263     ${node_string}    Replace String    ${node_string}    /    %2F
264     ${uri}=    Set Variable    ${CONFIG_TOPO_API}/topology/ovsdb:1/node/ovsdb:%2F%2F${node_string}%2Fbridge%2F${bridge}
265     Log    URL is ${uri}
266     Log    data: ${body}
267     ${resp}    RequestsLibrary.Put Request    session    ${uri}    data=${body}
268     Should Contain    ${ALLOWED_STATUS_CODES}    ${resp.status_code}
269
270 Connect Controller To OVSDB Node
271     [Documentation]    Initiate the connection to OVSDB node from controller
272     ${sample}    OperatingSystem.Get File    ${OVSDB_CONFIG_DIR}/connect.json
273     ${sample1}    Replace String    ${sample}    127.0.0.1    ${TOOLS_SYSTEM_IP}
274     ${body}    Replace String    ${sample1}    61644    ${OVSDB_PORT}
275     Log    data: ${body}
276     ${resp}    RequestsLibrary.Put Request    session    ${CONFIG_TOPO_API}/topology/ovsdb:1/node/ovsdb:%2F%2F${TOOLS_SYSTEM_IP}:${OVSDB_PORT}    data=${body}
277     Log    ${resp.content}
278     Should Contain    ${ALLOWED_STATUS_CODES}    ${resp.status_code}
279     Wait Until Keyword Succeeds    5s    1s    Verify OVS Reports Connected
280
281 Log Config And Operational Topology
282     [Documentation]    For debugging purposes, this will log both config and operational topo data stores
283     ${resp}    RequestsLibrary.Get Request    session    ${CONFIG_TOPO_API}
284     Log    ${resp.content}
285     ${resp}    RequestsLibrary.Get Request    session    ${OPERATIONAL_TOPO_API}
286     Log    ${resp.content}
287
288 Config and Operational Topology Should Be Empty
289     [Documentation]    This will check that only the expected output is there for both operational and config
290     ...    topology data stores. Empty probably means that only ovsdb:1 is there.
291     ${config_resp}    RequestsLibrary.Get Request    session    ${CONFIG_TOPO_API}
292     ${operational_resp}    RequestsLibrary.Get Request    session    ${OPERATIONAL_TOPO_API}
293     Should Contain    ${config_resp.content}    {"topology-id":"ovsdb:1"}
294     Should Contain    ${operational_resp.content}    {"topology-id":"ovsdb:1"}
295
296 Modify Multi Port Body
297     [Arguments]    ${ovs_1_port_name}    ${ovs_2_port_name}
298     [Documentation]    these steps are needed multiple times in bug reproductions above.
299     ${body}    OperatingSystem.Get File    ${OVSDB_CONFIG_DIR}/bug_7414/create_multiple_ports.json
300     ${ovs_1_ovsdb_uuid}=    Get OVSDB UUID    ${TOOLS_SYSTEM_IP}
301     ${ovs_2_ovsdb_uuid}=    Get OVSDB UUID    ${TOOLS_SYSTEM_2_IP}
302     ${body}    Replace String    ${body}    OVS_1_UUID    ${ovs_1_ovsdb_uuid}
303     ${body}    Replace String    ${body}    OVS_2_UUID    ${ovs_2_ovsdb_uuid}
304     ${body}    Replace String    ${body}    OVS_1_BRIDGE_NAME    ${BRIDGE}
305     ${body}    Replace String    ${body}    OVS_2_BRIDGE_NAME    ${BRIDGE}
306     ${body}    Replace String    ${body}    OVS_1_IP    ${TOOLS_SYSTEM_IP}
307     ${body}    Replace String    ${body}    OVS_2_IP    ${TOOLS_SYSTEM_2_IP}
308     ${body}    Replace String    ${body}    OVS_1_PORT_NAME    ${ovs_1_port_name}
309     ${body}    Replace String    ${body}    OVS_2_PORT_NAME    ${ovs_2_port_name}
310     Log    ${body}
311     [Return]    ${body}