df30cb6ea2337855eed2b6e215c6707f703bc9c2
[integration/test.git] / csit / suites / netconf / MDSAL / northbound.robot
1 *** Settings ***
2 Documentation     Metconf MDSAL Northbound test suite.
3 ...
4 ...               Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved.
5 ...
6 ...               This program and the accompanying materials are made available under the
7 ...               terms of the Eclipse Public License v1.0 which accompanies this distribution,
8 ...               and is available at http://www.eclipse.org/legal/epl-v10.html
9 ...
10 ...
11 ...               The request produced by test cases "Get Config Running", "Get Config Running
12 ...               To Confirm No_Edit Before Commit", "Get Config Running To Confirm Delete
13 ...               After Commit" and "Get Config Candidate To Confirm Discard" all use the same
14 ...               message id ("empty") for their requests. This is possible because the
15 ...               requests produced by this suite are strictly serialized. The RFC 6241 does
16 ...               not state that these IDs are unique, it only requires that each ID used is
17 ...               "XML attribute normalized" if the client wants it to be returned unmodified.
18 ...               The RFC specifically says that "the content of this attribute is not
19 ...               interpreted in any way, it only is stored to be returned with the reply to
20 ...               the request. The reuse of the "empty" string for the 4 test cases was chosen
21 ...               for simplicity.
22 ...
23 ...               TODO: Change the 4 testcases to use unique message IDs.
24 ...
25 ...               TODO: There are many sections with too many "Should_[Not_]Contain" keyword
26 ...               invocations (see Check_Multiple_Modules_Merge_Replace for a particularly bad
27 ...               example). Create a resource that will be able to extract the data from the
28 ...               requests and search for them in the response, then convert to usage of this
29 ...               resource (think "Thou shall not repeat yourself"). The following resource was
30 ...               found when doing research on this:
31 ...               http://robotframework.org/robotframework/latest/libraries/XML.html
32 Suite Setup       Setup_Everything
33 Suite Teardown    Teardown_Everything
34 Test Setup        SetupUtils.Setup_Test_With_Logging_And_Without_Fast_Failing
35 Library           RequestsLibrary
36 Library           SSHLibrary
37 Resource          ${CURDIR}/../../../libraries/FailFast.robot
38 Resource          ${CURDIR}/../../../libraries/SetupUtils.robot
39 Resource          ${CURDIR}/../../../libraries/SSHKeywords.robot
40 Resource          ${CURDIR}/../../../libraries/Utils.robot
41 Variables         ${CURDIR}/../../../variables/Variables.py
42
43 *** Variables ***
44 ${datadir}        ${CURDIR}/../../../variables/netconf/MDSAL
45 ${dataext}        msg
46 ${ssh_netconf_pid}    -1
47
48 *** Test Cases ***
49 Connect_To_ODL_Netconf
50     [Documentation]    Connect to ODL Netconf and fail if that is not possible.
51     Create_ODL_Netconf_Connection
52     Open_ODL_Netconf_Connection
53
54 Get_Config_Running
55     [Documentation]    Make sure the configuration has only the default elements in it.
56     Check_Test_Objects_Not_Present_In_Config    get-config
57
58 Missing_Message_ID_Attribute
59     [Documentation]    Check that messages with missing "message-ID" attribute are rejected with the correct error (RFC 6241, section 4.1).
60     Perform_Test    missing-attr
61
62 Additional_Attributes_In_Message
63     [Documentation]    Check that additional attributes in messages are returned properly (RFC 6241, sections 4.1 and 4.2).
64     ${reply}=    Load_And_Send_Message    additional-attr
65     BuiltIn.Should_Contain    ${reply}    xmlns="urn:ietf:params:xml:ns:netconf:base:1.0"
66     BuiltIn.Should_Contain    ${reply}    message-id="1"
67     BuiltIn.Should_Contain    ${reply}    attribute="something"
68     BuiltIn.Should_Contain    ${reply}    additional="otherthing"
69     BuiltIn.Should_Contain    ${reply}    xmlns:prefix="http://www.example.com/my-schema-example.html"
70
71 Send_Stuff_In_Undefined_Namespace
72     [Documentation]    Try to send something within an undefined namespace and check the reply complains about the nonexistent namespace and element.
73     ${reply}=    Load_And_Send_Message    merge-nonexistent-namespace
74     BuiltIn.Set_Test_Variable    ${bugno}    5125
75     BuiltIn.Should_Not_Contain    ${reply}    java.lang.NullPointerException
76     BuiltIn.Set_Test_Variable    ${bugno}    ${EMPTY}
77     BuiltIn.Should_Contain    ${reply}    urn:this:is:in:a:nonexistent:namespace
78     BuiltIn.Should_Contain    ${reply}    <rpc-error>
79     [Teardown]    BuiltIn.Run_Keyword_If    '${bugno}' != '${EMPTY}'    Utils.Report_Failure_Due_To_Bug    5125
80
81 Edit_Config_First_Batch_Merge
82     [Documentation]    Request a "merge" operation adding an element in candidate configuration and check the reply.
83     Perform_Test    merge-1
84
85 Get_Config_Running_To_Confirm_No_Edit_Before_Commit
86     [Documentation]    Make sure the running configuration is still unchanged as the change was not commited yet.
87     Check_Test_Objects_Not_Present_In_Config    get-config-no-edit-before-commit
88
89 Commit_Edit
90     [Documentation]    Commit the change and check the reply.
91     Perform_Test    commit-edit
92
93 First_Batch_In_Config_Running_To_Confirm_Edit_After_Commit
94     [Documentation]    Check that the change is now in the configuration.
95     ${reply}=    Load_And_Send_Message    get-config-edit-after-commit
96     Check_First_Batch_Data_Present    ${reply}
97
98 Terminate_Connection_Gracefully
99     [Documentation]    Close the session and disconnect.
100     Close_ODL_Netconf_Connection_Gracefully
101
102 Reconnect_To_ODL_Netconf_After_Graceful_Session_End
103     [Documentation]    Reconnect to ODL Netconf and fail if that is not possible.
104     Open_ODL_Netconf_Connection
105
106 First_Batch_In_Config_Running_After_Reconnect
107     [Documentation]    Check that the change is now in the configuration.
108     ${reply}=    Load_And_Send_Message    get-config-edit-after-commit
109     Check_First_Batch_Data_Present    ${reply}
110
111 Edit_Config_Create_Shall_Fail_Now
112     [Documentation]    Request a "create" operation of an element that already exists and check that it fails with the correct error (RFC 6241, section 7.2, operation "create").
113     Perform_Test    create
114
115 Delete_First_Batch
116     [Documentation]    Delete the created element from the candidate configuration and check the reply.
117     Perform_Test    delete
118
119 Get_Config_Running_To_Confirm_No_Delete_Before_Commit
120     [Documentation]    Make sure the element is still present in the running configuration as the delete command was not committed yet.
121     ${reply}=    Load_And_Send_Message    get-config-no-delete-before-commit
122     Check_First_Batch_Data_Present    ${reply}
123
124 Commit_Delete
125     [Documentation]    Commit the deletion of the element and check the reply.
126     Perform_Test    commit-delete
127
128 Get_Config_Running_To_Confirm_Delete_After_Commit
129     [Documentation]    Check that the element is gone.
130     Check_Test_Objects_Not_Present_In_Config    get-config-delete-after-commit
131
132 Commit_No_Transaction
133     [Documentation]    Attempt to perform "commit" when there are no changes in the candidate configuration and check that it returns OK status.
134     Perform_Test    commit-no-transaction
135     [Teardown]    Utils.Report_Failure_Due_To_Bug    4455
136
137 Edit_Config_Second_Batch_Merge
138     [Documentation]    Create an element to be discarded and check the reply.
139     Perform_Test    merge-2
140
141 Get_And_Check_Config_Candidate_For_Discard
142     [Documentation]    Check that the element to be discarded is present in the candidate configuration.
143     ${reply}=    Load_And_Send_Message    get-config-candidate
144     Check_First_Batch_Data_Not_Present    ${reply}
145     Check_Second_Batch_Data_Present    ${reply}
146
147 Discard_Changes_Using_Discard_Request
148     [Documentation]    Ask the server to discard the candidate and check the reply.
149     Perform_Test    commit-discard
150
151 Get_And_Check_Config_Candidate_To_Confirm_Discard
152     [Documentation]    Check that the element was really discarded.
153     Check_Test_Objects_Not_Present_In_Config    get-config-candidate-discard
154
155 Edit_Config_Multiple_Batch_Merge_Create
156     [Documentation]    Use a create request with the third batch to create the infrastructure.
157     Perform_Test    merge-multiple-create
158
159 Edit_Config_Multiple_Batch_Merge_Third
160     [Documentation]    Use a create request with the third batch to create the infrastructure.
161     Perform_Test    merge-multiple-1
162
163 Edit_Config_Multiple_Batch_Merge_Fourth
164     [Documentation]    Use a merge request with the third batch to create the infrastructure.
165     Perform_Test    merge-multiple-2
166
167 Edit_Config_Multiple_Batch_Merge_Fifth
168     [Documentation]    Add a "name4" subelement to the element and check the reply.
169     Perform_Test    merge-multiple-3
170
171 Commit_Multiple_Merge
172     [Documentation]    Commit the changes and check the reply.
173     Perform_Test    merge-multiple-commit
174
175 Multiple_Batch_Data_In_Running_Config
176     [Documentation]    Check that the 3 subelements are now present in the running configuration.
177     ${reply}=    Load_And_Send_Message    merge-multiple-check
178     Check_Multiple_Batch_Data_Present    ${reply}
179
180 Abort_Connection_To_Simulate_Session_Failure
181     [Documentation]    Simulate session failure by disconnecting without terminating the session.
182     Abort_ODL_Netconf_Connection
183
184 Reconnect_To_ODL_Netconf_After_Session_Failure
185     [Documentation]    Reconnect to ODL Netconf and fail if that is not possible.
186     Open_ODL_Netconf_Connection
187
188 Multiple_Batch_Data_In_Running_Config_After_Session_Failure
189     [Documentation]    Check that the 3 subelements are now present in the running configuration.
190     ${reply}=    Load_And_Send_Message    merge-multiple-check
191     Check_Multiple_Batch_Data_Present    ${reply}
192
193 Edit_Multiple_Merge_Data
194     [Documentation]    Add another subelement named "test" to the element and check the reply.
195     Perform_Test    merge-multiple-edit
196
197 Commit_Multiple_Modules_Merge_Edit
198     [Documentation]    Commit the addition of the "test" subelement and check the reply.
199     Perform_Test    merge-multiple-edit-commit
200
201 Check_Multiple_Modules_Merge_Edit
202     [Documentation]    Check that the "test" subelement exists and has correct value for "port" subelement.
203     ${reply}=    Load_And_Send_Message    merge-multiple-edit-check
204     BuiltIn.Should_Contain    ${reply}    <id>test</id>
205     BuiltIn.Should_Contain    ${reply}    <model>Dixi</model>
206     BuiltIn.Should_Contain    ${reply}    <manufacturer>BMW</manufacturer>
207     BuiltIn.Should_Contain    ${reply}    <year>1928</year>
208
209 Update_Multiple_Modules_Merge
210     [Documentation]    Update the value of the "port" subelement of the "test" subelement and check the reply.
211     Perform_Test    merge-multiple-update
212
213 Commit_Multiple_Modules_Merge_Update
214     [Documentation]    Commit the update and check the reply.
215     Perform_Test    merge-multiple-update-commit
216
217 Check_Multiple_Modules_Merge_Update
218     [Documentation]    Check that the value of the "port" was really updated.
219     ${reply}=    Load_And_Send_Message    merge-multiple-update-check
220     BuiltIn.Should_Contain    ${reply}    <id>test</id>
221     BuiltIn.Should_Contain    ${reply}    <model>Bentley Speed Six</model>
222     BuiltIn.Should_Contain    ${reply}    <manufacturer>Bentley</manufacturer>
223     BuiltIn.Should_Contain    ${reply}    <year>1930</year>
224     BuiltIn.Should_Not_Contain    ${reply}    <model>Dixi</model>
225     BuiltIn.Should_Not_Contain    ${reply}    <manufacturer>BMW</manufacturer>
226     BuiltIn.Should_Not_Contain    ${reply}    <year>1928</year>
227
228 Replace_Multiple_Modules_Merge
229     [Documentation]    Replace the content of the "test" with another completely different and check the reply.
230     Perform_Test    merge-multiple-replace
231
232 Commit_Multiple_Modules_Merge_Replace
233     [Documentation]    Commit the replace and check the reply.
234     Perform_Test    merge-multiple-replace-commit
235
236 Check_Multiple_Modules_Merge_Replace
237     [Documentation]    Check that the new content is there and the old content is gone.
238     ${reply}=    Load_And_Send_Message    merge-multiple-replace-check
239     BuiltIn.Should_Contain    ${reply}    <id>REPLACE</id>
240     BuiltIn.Should_Contain    ${reply}    <manufacturer>FIAT</manufacturer>
241     BuiltIn.Should_Contain    ${reply}    <model>Panda</model>
242     BuiltIn.Should_Contain    ${reply}    <year>2003</year>
243     BuiltIn.Should_Contain    ${reply}    <car-id>REPLACE</car-id>
244     BuiltIn.Should_Not_Contain    ${reply}    <id>TOY001</id>
245     BuiltIn.Should_Not_Contain    ${reply}    <id>CUST001</id>
246     BuiltIn.Should_Not_Contain    ${reply}    <car-id>TOY001</car-id>
247     BuiltIn.Should_Not_Contain    ${reply}    <person-id>CUST001</person-id>
248     BuiltIn.Should_Not_Contain    ${reply}    <id>OLD001</id>
249     BuiltIn.Should_Not_Contain    ${reply}    <id>CUST002</id>
250     BuiltIn.Should_Not_Contain    ${reply}    <car-id>OLD001</car-id>
251     BuiltIn.Should_Not_Contain    ${reply}    <person-id>CUST002</person-id>
252     BuiltIn.Should_Not_Contain    ${reply}    <id>CAROLD</id>
253     BuiltIn.Should_Contain    ${reply}    <id>CUSTOLD</id>
254     BuiltIn.Should_Not_Contain    ${reply}    <car-id>CAROLD</car-id>
255     BuiltIn.Should_Not_Contain    ${reply}    <person-id>CUSTOLD</person-id>
256     BuiltIn.Should_Not_Contain    ${reply}    <id>CARYOUNG</id>
257     BuiltIn.Should_Contain    ${reply}    <id>CUSTYOUNG</id>
258     BuiltIn.Should_Not_Contain    ${reply}    <car-id>CARYOUNG</car-id>
259     BuiltIn.Should_Contain    ${reply}    <person-id>CUSTYOUNG</person-id>
260     BuiltIn.Should_Not_Contain    ${reply}    <id>CARMID</id>
261     BuiltIn.Should_Contain    ${reply}    <id>CUSTMID</id>
262     BuiltIn.Should_Not_Contain    ${reply}    <car-id>CARMID</car-id>
263     BuiltIn.Should_Not_Contain    ${reply}    <person-id>CUSTMID</person-id>
264     BuiltIn.Should_Not_Contain    ${reply}    <id>CAROLD2</id>
265     BuiltIn.Should_Contain    ${reply}    <id>CUSTOLD2</id>
266     BuiltIn.Should_Not_Contain    ${reply}    <car-id>CAROLD2</car-id>
267     BuiltIn.Should_Not_Contain    ${reply}    <person-id>CUSTOLD2</person-id>
268     BuiltIn.Should_Not_Contain    ${reply}    <id>CUSTBAD</id>
269     BuiltIn.Should_Not_Contain    ${reply}    <id>test</id>
270
271 Remove_Test_Data
272     [Documentation]    Remove the testing elements and all their subelements and check the reply.
273     Perform_Test    merge-multiple-remove
274
275 Commit_Test_Data_Removal
276     [Documentation]    Commit the removal and check the reply.
277     Perform_Test    merge-multiple-remove-commit
278
279 Delete_Not_Existing_Element
280     [Documentation]    Attempt to delete the elements again and check that it fails with the correct error.
281     Perform_Test    delete-not-existing
282
283 Commit_Delete_Not_Existing_Module
284     [Documentation]    Attempt to commit and check the reply.
285     Perform_Test    commit-no-transaction
286     [Teardown]    Utils.Report_Failure_Due_To_Bug    4455
287
288 Remove_Not_Existing_Module
289     [Documentation]    Attempt to remove the "module" element again and check that the operation is "silently ignored".
290     Perform_Test    remove-not-existing
291
292 Commit_Remove_Not_Existing_Module
293     [Documentation]    Attempt to commit and check the reply.
294     Perform_Test    remove-not-existing-commit
295     [Teardown]    Utils.Report_Failure_Due_To_Bug    4455
296
297 Close_Session
298     [Documentation]    Close the session and check that it was closed properly.
299     Perform_Test    close-session
300
301 *** Keywords ***
302 Get_Data
303     [Arguments]    ${name}
304     [Documentation]    Load the specified data from the data directory and return it.
305     ${data}=    OperatingSystem.Get_File    ${datadir}${/}${name}.${dataext}
306     [Return]    ${data}
307
308 Create_ODL_Netconf_Connection
309     [Arguments]    ${host}=${CONTROLLER}    ${port}=${ODL_NETCONF_MDSAL_PORT}    ${user}=${ODL_NETCONF_USER}    ${password}=${ODL_NETCONF_PASSWORD}
310     [Documentation]    Open a netconf connecion to the given machine.
311     # The "-s netconf" flag (see the "SSHLibrary.Write" line below)    is not
312     # supported by SSHLibrary, therefore we need to use this elaborate and
313     # pretty tricky way to connect to the ODL Netconf port.
314     # TODO: Extract into NetconfKeywords as there are other tests that are
315     #    going to need to use this operation (Netconf Performance and Scaling
316     #    comes to my mind now as one of the things tested is the performance
317     #    of the direct netconf connection.
318     # TODO: Make this keyword return a dictionary object with all the
319     #    data about the prepared connection neatly packaged. Make all
320     #    the other keywords handling the connection accept such an
321     #    object and pull the data out of it rather than relying on
322     #    global variables. This will allow for tracking more Netconf
323     #    connections, increasing utility.
324     ${control}=    SSHLibrary.Open_Connection    ${host}    prompt=${ODL_SYSTEM_PROMPT}    timeout=10s
325     Utils.Flexible_Controller_Login
326     BuiltIn.Set_Suite_Variable    ${ssh_control}    ${control}
327     ${netconf}=    SSHLibrary.Open_Connection    ${host}    prompt=${ODL_SYSTEM_PROMPT}    timeout=10s
328     Utils.Flexible_Controller_Login
329     BuiltIn.Set_Suite_Variable    ${ssh_netconf}    ${netconf}
330     BuiltIn.Set_Suite_Variable    ${ssh_port}    ${port}
331     BuiltIn.Set_Suite_Variable    ${ssh_user}    ${user}
332     BuiltIn.Set_Suite_Variable    ${ssh_password}    ${password}
333
334 Reopen_ODL_Netconf_Connection
335     [Documentation]    Reopen a closed netconf connection.
336     SSHLibrary.Write    sshpass -p ${ssh_password} ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no ${ssh_user}\@127.0.0.1 -p ${ssh_port} -s netconf
337     ${hello}=    SSHLibrary.Read_Until    ${ODL_NETCONF_PROMPT}
338     SSHLibrary.Switch_Connection    ${ssh_control}
339     ${pid}=    SSHLibrary.Execute_Command    ps -A | grep sshpass | cut -b 1-6
340     BuiltIn.Set_Suite_Variable    ${ssh_netconf_pid}    ${pid}
341     SSHLibrary.Switch_Connection    ${ssh_netconf}
342     [Return]    ${hello}
343
344 Open_ODL_Netconf_Connection
345     [Documentation]    Open a prepared netconf connecion.
346     ${hello}=    Reopen_ODL_Netconf_Connection
347     ${hello_message}=    Get_Data    hello
348     Transmit_Message    ${hello_message}
349     [Return]    ${hello}
350
351 Transmit_Message
352     [Arguments]    ${message}
353     [Documentation]    Transmit message to Netconf connection and discard the echo of the message.
354     SSHLibrary.Write    ${message}
355     SSHLibrary.Write    ${ODL_NETCONF_PROMPT}
356     SSHLibrary.Read_Until    ${ODL_NETCONF_PROMPT}
357
358 Send_Message
359     [Arguments]    ${message}
360     [Documentation]    Send message to Netconf connection and get the reply.
361     Transmit_Message    ${message}
362     ${reply}=    SSHLibrary.Read_Until    ${ODL_NETCONF_PROMPT}
363     [Return]    ${reply}
364
365 Prepare_For_Search
366     [Arguments]    ${searched_string}
367     [Documentation]    Prepare the specified string for searching in Netconf connection replies.
368     ...    The string passed to this keyword is coming from a data
369     ...    file which has different end of line conventions than
370     ...    the actual Netconf reply. This keyword patches the string
371     ...    to match what Netconf actually returns.
372     ${result}=    BuiltIn.Evaluate    "\\r\\n".join("""${searched_string}""".split("\\n"))
373     [Return]    ${result}
374
375 Load_And_Send_Message
376     [Arguments]    ${name}
377     [Documentation]    Load a message from the data file set, send it to Netconf and return the reply.
378     ${request}=    Get_Data    ${name}-request
379     ${reply}=    Send_Message    ${request}
380     [Return]    ${reply}
381
382 Load_Expected_Reply
383     [Arguments]    ${name}
384     [Documentation]    Load the expected reply from the data file set and return it.
385     ${expected_reply}=    Get_Data    ${name}-reply
386     ${expected}=    Prepare_For_Search    ${expected_reply}
387     [Return]    ${expected}
388
389 Abort_ODL_Netconf_Connection
390     [Documentation]    Correctly close the Netconf connection and make sure it is really dead.
391     BuiltIn.Return_From_Keyword_If    ${ssh_netconf_pid} == -1
392     ${kill_command}=    BuiltIn.Set_Variable    kill ${ssh_netconf_pid}
393     BuiltIn.Set_Suite_Variable    ${ssh_netconf_pid}    -1
394     SSHLibrary.Switch_Connection    ${ssh_control}
395     SSHLibrary.Write    ${kill_command}
396     SSHLibrary.Read_Until_Prompt
397     SSHLibrary.Switch_Connection    ${ssh_netconf}
398     SSHLibrary.Read_Until_Prompt
399
400 Close_ODL_Netconf_Connection_Gracefully
401     Perform_Test    close-session
402     Abort_ODL_Netconf_Connection
403
404 Setup_Everything
405     [Documentation]    Setup resources and create session for Restconf checking.
406     SetupUtils.Setup_Utils_For_Setup_And_Teardown
407     RequestsLibrary.Create_Session    config    http://${CONTROLLER}:${RESTCONFPORT}${CONFIG_API}    auth=${AUTH}
408
409 Teardown_Everything
410     [Documentation]    Close the Netconf connection and destroy all sessions in the requests library.
411     Abort_ODL_Netconf_Connection
412     RequestsLibrary.Delete_All_Sessions
413
414 Check_First_Batch_Data
415     [Arguments]    ${reply}    ${keyword}
416     BuiltIn.RunKeyword    ${keyword}    ${reply}    <id>TOY001</id>
417     BuiltIn.RunKeyword    ${keyword}    ${reply}    <id>CUST001</id>
418     BuiltIn.RunKeyword    ${keyword}    ${reply}    <car-id>TOY001</car-id>
419     BuiltIn.RunKeyword    ${keyword}    ${reply}    <person-id>CUST001</person-id>
420
421 Check_First_Batch_Data_Present
422     [Arguments]    ${reply}
423     Check_First_Batch_Data    ${reply}    BuiltIn.Should_Contain
424
425 Check_First_Batch_Data_Not_Present
426     [Arguments]    ${reply}
427     Check_First_Batch_Data    ${reply}    BuiltIn.Should_Not_Contain
428
429 Check_Second_Batch_Data
430     [Arguments]    ${reply}    ${keyword}
431     BuiltIn.RunKeyword    ${keyword}    ${reply}    <id>OLD001</id>
432     BuiltIn.RunKeyword    ${keyword}    ${reply}    <id>CUST002</id>
433     BuiltIn.RunKeyword    ${keyword}    ${reply}    <car-id>OLD001</car-id>
434     BuiltIn.RunKeyword    ${keyword}    ${reply}    <person-id>CUST002</person-id>
435
436 Check_Second_Batch_Data_Present
437     [Arguments]    ${reply}
438     Check_Second_Batch_Data    ${reply}    BuiltIn.Should_Contain
439
440 Check_Multiple_Batch_Data
441     [Arguments]    ${reply}    ${keyword}
442     BuiltIn.RunKeyword    ${keyword}    ${reply}    <id>CAROLD</id>
443     BuiltIn.RunKeyword    ${keyword}    ${reply}    <id>CUSTOLD</id>
444     BuiltIn.RunKeyword    ${keyword}    ${reply}    <car-id>CAROLD</car-id>
445     BuiltIn.RunKeyword    ${keyword}    ${reply}    <person-id>CUSTOLD</person-id>
446     BuiltIn.RunKeyword    ${keyword}    ${reply}    <id>CARYOUNG</id>
447     BuiltIn.RunKeyword    ${keyword}    ${reply}    <id>CUSTYOUNG</id>
448     BuiltIn.RunKeyword    ${keyword}    ${reply}    <car-id>CARYOUNG</car-id>
449     BuiltIn.RunKeyword    ${keyword}    ${reply}    <person-id>CUSTYOUNG</person-id>
450     BuiltIn.RunKeyword    ${keyword}    ${reply}    <id>CARMID</id>
451     BuiltIn.RunKeyword    ${keyword}    ${reply}    <id>CUSTMID</id>
452     BuiltIn.RunKeyword    ${keyword}    ${reply}    <car-id>CARMID</car-id>
453     BuiltIn.RunKeyword    ${keyword}    ${reply}    <person-id>CUSTMID</person-id>
454     BuiltIn.RunKeyword    ${keyword}    ${reply}    <id>CAROLD2</id>
455     BuiltIn.RunKeyword    ${keyword}    ${reply}    <id>CUSTOLD2</id>
456     BuiltIn.RunKeyword    ${keyword}    ${reply}    <car-id>CAROLD2</car-id>
457     BuiltIn.RunKeyword    ${keyword}    ${reply}    <person-id>CUSTOLD2</person-id>
458
459 Check_Multiple_Batch_Data_Absent
460     [Arguments]    ${reply}
461     Check_Multiple_Batch_Data    ${reply}    BuiltIn.Should_not_Contain
462
463 Check_Multiple_Batch_Data_Present
464     [Arguments]    ${reply}
465     Check_Multiple_Batch_Data    ${reply}    BuiltIn.Should_Contain
466
467 Check_Auxiliary_Data
468     [Arguments]    ${reply}    ${keyword}
469     BuiltIn.RunKeyword    ${keyword}    ${reply}    <id>CUSTBAD</id>
470     BuiltIn.RunKeyword    ${keyword}    ${reply}    <id>test</id>
471
472 Check_Test_Objects_Absent
473     [Arguments]    ${reply}
474     Check_First_Batch_Data_Not_Present    ${reply}
475     Check_Second_Batch_Data    ${reply}    BuiltIn.Should_not_Contain
476     Check_Multiple_Batch_Data_Absent    ${reply}
477     Check_Auxiliary_Data    ${reply}    BuiltIn.Should_not_Contain
478     BuiltIn.Should_not_Contain    ${reply}    <id>test</id>
479
480 Check_Test_Objects_Not_Present_In_Config
481     [Arguments]    ${name}
482     [Documentation]    Use dataset with the specified name to get the configuration and check that none of our test objects are there.
483     ${reply}=    Load_And_Send_Message    ${name}
484     Check_Test_Objects_Absent    ${reply}
485     BuiltIn.Should_not_Contain    ${reply}    <id>REPLACE</id>
486     [Return]    ${reply}
487
488 Perform_Test
489     [Arguments]    ${name}
490     [Documentation]    Load and send the request from the dataset and compare the returned reply to the one stored in the dataset.
491     ${actual}=    Load_And_Send_Message    ${name}
492     ${expected}=    Load_Expected_Reply    ${name}
493     ${newline}=    BuiltIn.Evaluate    "\\r\\n"
494     BuiltIn.Should_Be_Equal    ${newline}${expected}${ODL_NETCONF_PROMPT}    ${actual}
495     [Return]    ${actual}
496
497 Send_And_Check
498     [Arguments]    ${name}    ${expected}
499     ${actual}=    Load_And_Send_Message    ${name}
500     BuiltIn.Should_Be_Equal    ${expected}    ${actual}