Update StreamDict to include argon
[integration/test.git] / csit / libraries / SxpLib.robot
1 *** Settings ***
2 Documentation       Library containing Keywords used for SXP testing
3
4 Library             Collections
5 Library             RequestsLibrary
6 Library             ./Sxp.py
7 Resource            CompareStream.robot
8 Resource            KarafKeywords.robot
9 Resource            TemplatedRequests.robot
10 Resource            Utils.robot
11 Resource            ../variables/Variables.robot
12
13
14 *** Variables ***
15 ${REST_CONTEXT}     /restconf/operations/sxp-controller
16
17
18 *** Keywords ***
19 Post To Controller
20     [Documentation]    Post request to Controller and checks response
21     [Arguments]    ${session}    ${path}    ${data}    ${rest_context}=${REST_CONTEXT}
22     ${resp} =    RequestsLibrary.Post Request
23     ...    ${session}
24     ...    ${rest_context}:${path}
25     ...    data=${data}
26     ...    headers=${HEADERS_XML}
27     Log    ${resp.text}
28     Log    ${session}
29     Log    ${path}
30     Log    ${data}
31     BuiltIn.Should be Equal As Strings    ${resp.status_code}    200
32     ${content} =    BuiltIn.Evaluate    json.loads('''${resp.text}''')    json
33     ${output} =    collections.Get From Dictionary    ${content}    output
34     ${result} =    collections.Get From Dictionary    ${output}    result
35     BuiltIn.Should Be True    ${result}    RPC result is False
36
37 Add Node
38     [Documentation]    Add node via RPC to ODL
39     [Arguments]    ${node}    ${password}=${EMPTY}    ${version}=version4    ${port}=64999    ${session}=session    ${ip}=${node}
40     ...    ${ssl_stores}=${EMPTY}    ${retry_open_timer}=1
41     ${data} =    Sxp.Add Node Xml    ${node}    ${port}    ${password}    ${version}    ${ip}
42     ...    keystores=${ssl_stores}    retry_open_timer=${retry_open_timer}
43     Post To Controller    ${session}    add-node    ${data}
44
45 Delete Node
46     [Documentation]    Delete connection via RPC from node
47     [Arguments]    ${node}    ${session}=session
48     ${data} =    Sxp.Delete Node Xml    ${node}
49     Post To Controller    ${session}    delete-node    ${data}
50
51 Add Connection
52     [Documentation]    Add connection via RPC to node
53     [Arguments]    ${version}    ${mode}    ${ip}    ${port}    ${node}=127.0.0.1    ${password}=${EMPTY}
54     ...    ${session}=session    ${domain}=global    ${security_mode}=${EMPTY}
55     ${data} =    Sxp.Add Connection Xml    ${version}    ${mode}    ${ip}    ${port}    ${node}
56     ...    ${password}    ${domain}    security_mode=${security_mode}
57     Post To Controller    ${session}    add-connection    ${data}
58
59 Get Connections
60     [Documentation]    Gets all connections via RPC from node
61     [Arguments]    ${node}=127.0.0.1    ${session}=session    ${domain}=global
62     ${data} =    Sxp.Get Connections From Node Xml    ${node}    ${domain}
63     ${resp} =    RequestsLibrary.Post Request
64     ...    ${session}
65     ...    ${REST_CONTEXT}:get-connections
66     ...    data=${data}
67     ...    headers=${HEADERS_XML}
68     BuiltIn.Should be Equal As Strings    ${resp.status_code}    200
69     RETURN    ${resp.text}
70
71 Delete Connections
72     [Documentation]    Delete connection via RPC from node
73     [Arguments]    ${ip}    ${port}    ${node}=127.0.0.1    ${session}=session    ${domain}=global
74     ${data} =    Sxp.Delete Connections Xml    ${ip}    ${port}    ${node}    ${domain}
75     Post To Controller    ${session}    delete-connection    ${data}
76
77 Clean Connections
78     [Documentation]    Delete all connections via RPC from node
79     [Arguments]    ${node}=127.0.0.1    ${session}=session    ${domain}=global
80     ${resp} =    Get Connections    ${node}    ${session}    ${domain}
81     @{connections} =    Sxp.Parse Connections    ${resp}
82     FOR    ${connection}    IN    @{connections}
83         Delete Connections
84         ...    ${connection['peer-address']}
85         ...    ${connection['tcp-port']}
86         ...    ${node}
87         ...    ${session}
88         ...    ${domain}
89     END
90
91 Verify Connection
92     [Documentation]    Verify that connection is ON
93     [Arguments]    ${version}    ${mode}    ${ip}    ${port}=64999    ${node}=127.0.0.1    ${state}=on
94     ...    ${session}=session    ${domain}=global
95     ${resp} =    Get Connections    ${node}    ${session}    ${domain}
96     Should Contain Connection    ${resp}    ${ip}    ${port}    ${mode}    ${version}    ${state}
97
98 Add Bindings
99     [Documentation]    Based on ODL version decide if bindings will be added with or without origin type (introduced in Fluorine)
100     [Arguments]    ${sgt}    ${prefixes}    ${node}=127.0.0.1    ${session}=session    ${domain}=global    ${origin}=LOCAL
101     CompareStream.Run_Keyword_If_At_Least_Fluorine
102     ...    Add Bindings Fluorine
103     ...    ${sgt}
104     ...    ${prefixes}
105     ...    ${node}
106     ...    ${session}
107     ...    ${domain}
108     ...    ${origin}
109     CompareStream.Run_Keyword_If_At_Most_Oxygen
110     ...    Add Bindings Oxygen
111     ...    ${sgt}
112     ...    ${prefixes}
113     ...    ${node}
114     ...    ${session}
115     ...    ${domain}
116
117 Add Bindings Fluorine
118     [Documentation]    Add/Update one or more bindings with origin type via RPC to Master DB of the node
119     [Arguments]    ${sgt}    ${prefixes}    ${node}    ${session}    ${domain}    ${origin}
120     ${data} =    Sxp.Add Bindings Xml Fluorine    ${node}    ${domain}    ${sgt}    ${prefixes}    ${origin}
121     Post To Controller    ${session}    add-bindings    ${data}
122
123 Add Bindings Oxygen
124     [Documentation]    Add/Update one or more bindings without origin type via RPC to Master DB of the node
125     [Arguments]    ${sgt}    ${prefixes}    ${node}    ${session}    ${domain}
126     ${data} =    Sxp.Add Bindings Xml Oxygen    ${node}    ${domain}    ${sgt}    ${prefixes}
127     Post To Controller    ${session}    add-bindings    ${data}
128
129 Get Bindings
130     [Documentation]    Gets all binding via RPC from Master DB of node
131     [Arguments]    ${node}=127.0.0.1    ${session}=session    ${domain}=global    ${scope}=all
132     ${data} =    Sxp.Get Bindings From Node Xml    ${node}    ${scope}    ${domain}
133     ${resp} =    TemplatedRequests.Post_To_Uri
134     ...    ${REST_CONTEXT}:get-node-bindings
135     ...    data=${data}
136     ...    accept=${ACCEPT_JSON}
137     ...    content_type=${HEADERS_XML}
138     ...    session=${session}
139     RETURN    ${resp}
140
141 Clean Bindings
142     [Documentation]    Delete all bindings via RPC from Master DB of node
143     [Arguments]    ${node}=127.0.0.1    ${session}=session    ${domain}=global    ${scope}=local
144     ${resp} =    Get Bindings    ${node}    ${session}    ${domain}    ${scope}
145     @{bindings} =    Sxp.Parse Bindings    ${resp}
146     FOR    ${binding}    IN    @{bindings}
147         @{prefixes_list} =    collections.Get From Dictionary    ${binding}    ip-prefix
148         ${prefixes} =    BuiltIn.Catenate    SEPARATOR=,    @{prefixes_list}
149         Delete Bindings    ${binding['sgt']}    ${prefixes}    ${node}    ${domain}    ${session}
150     END
151
152 Delete Bindings
153     [Documentation]    Delete one or more bindings via RPC from Master DB of node
154     [Arguments]    ${sgt}    ${prefixes}    ${node}=127.0.0.1    ${domain}=global    ${session}=session
155     ${data} =    Sxp.Delete Bindings Xml    ${node}    ${domain}    ${sgt}    ${prefixes}
156     Post To Controller    ${session}    delete-bindings    ${data}
157
158 Add PeerGroup
159     [Documentation]    Adds new PeerGroup via RPC to Node
160     [Arguments]    ${name}    ${peers}=    ${node}=127.0.0.1    ${session}=session
161     ${data} =    Sxp.Add Peer Group Xml    ${name}    ${peers}    ${node}
162     Post To Controller    ${session}    add-peer-group    ${data}
163
164 Delete Peer Group
165     [Documentation]    Delete PeerGroup via RPC from Node
166     [Arguments]    ${name}    ${node}=127.0.0.1    ${session}=session
167     ${data} =    Sxp.Delete Peer Group Xml    ${name}    ${node}
168     Post To Controller    ${session}    delete-peer-group    ${data}
169
170 Get Peer Groups
171     [Documentation]    Gets all PeerGroups via RPC from node
172     [Arguments]    ${node}=127.0.0.1    ${session}=session
173     ${data} =    Sxp.Get Peer Groups From Node Xml    ${node}
174     ${resp} =    RequestsLibrary.Post Request
175     ...    ${session}
176     ...    ${REST_CONTEXT}:get-peer-groups
177     ...    data=${data}
178     ...    headers=${HEADERS_XML}
179     BuiltIn.Should be Equal As Strings    ${resp.status_code}    200
180     RETURN    ${resp.text}
181
182 Clean Peer Groups
183     [Documentation]    Delete all PeerGroups via RPC from node
184     [Arguments]    ${node}=127.0.0.1    ${session}=session
185     ${resp} =    Get Peer Groups    ${node}    ${session}
186     @{prefixes} =    Sxp.Parse Peer Groups    ${resp}
187     FOR    ${group}    IN    @{prefixes}
188         Delete Peer Group    ${group['name']}    ${node}    ${session}
189     END
190
191 Add Filter
192     [Documentation]    Add Filter via RPC from Node
193     [Arguments]    ${name}    ${type}    ${entries}    ${node}=127.0.0.1    ${session}=session    ${policy}=auto-update
194     ${data} =    Prepare Add/Update Filter Data    ${name}    ${type}    ${entries}    ${node}    ${policy}
195     Post To Controller    ${session}    add-filter    ${data}
196
197 Update Filter
198     [Documentation]    Update Filter via RPC
199     [Arguments]    ${name}    ${type}    ${entries}    ${node}=127.0.0.1    ${session}=session    ${policy}=auto-update
200     ${data} =    Prepare Add/Update Filter Data    ${name}    ${type}    ${entries}    ${node}    ${policy}
201     Post To Controller    ${session}    update-filter    ${data}
202
203 Prepare Add/Update Filter Data
204     [Documentation]    Prepare XML payload for add-filter and update-filter RPCs. Payloads for both RPCs are the same.
205     [Arguments]    ${name}    ${type}    ${entries}    ${node}=127.0.0.1    ${policy}=auto-update
206     ${data} =    CompareStream.Run_Keyword_If_At_Least_Else
207     ...    carbon
208     ...    Add Filter Xml
209     ...    ${name}
210     ...    ${type}
211     ...    ${entries}
212     ...    ${node}
213     ...    ${policy}
214     ...    ELSE
215     ...    Add Filter Xml
216     ...    ${name}
217     ...    ${type}
218     ...    ${entries}
219     ...    ${node}
220     RETURN    ${data}
221
222 Add Domain Filter
223     [Documentation]    Add Domain Filter via RPC from Node
224     [Arguments]    ${name}    ${domains}    ${entries}    ${node}=127.0.0.1    ${filter_name}=base-domain-filter    ${session}=session
225     ${data} =    Sxp.Add Domain Filter Xml    ${name}    ${domains}    ${entries}    ${node}    ${filter_name}
226     Post To Controller    ${session}    add-domain-filter    ${data}
227
228 Delete Filter
229     [Documentation]    Delete Filter via RPC from Node
230     [Arguments]    ${name}    ${type}    ${node}=127.0.0.1    ${session}=session
231     ${data} =    Sxp.Delete Filter Xml    ${name}    ${type}    ${node}
232     Post To Controller    ${session}    delete-filter    ${data}
233
234 Delete Domain Filter
235     [Documentation]    Delete Filter via RPC from Node
236     [Arguments]    ${name}    ${node}=127.0.0.1    ${filter_name}=base-domain-filter    ${session}=session
237     ${data} =    Sxp.Delete Domain Filter Xml    ${name}    ${node}    ${filter_name}
238     Post To Controller    ${session}    delete-domain-filter    ${data}
239
240 Should Contain Binding
241     [Documentation]    Tests if data contains specified binding
242     [Arguments]    ${resp}    ${sgt}    ${prefix}
243     ${out} =    Sxp.Find Binding    ${resp}    ${sgt}    ${prefix}
244     BuiltIn.Should Be True    ${out}    Doesn't have ${sgt} ${prefix}
245
246 Should Not Contain Binding
247     [Documentation]    Tests if data doesn't contains specified binding
248     [Arguments]    ${resp}    ${sgt}    ${prefix}
249     ${out} =    Sxp.Find Binding    ${resp}    ${sgt}    ${prefix}
250     BuiltIn.Should Not Be True    ${out}    Should't have ${sgt} ${prefix}
251
252 Should Contain Connection
253     [Documentation]    Test if data contains specified connection
254     [Arguments]    ${resp}    ${ip}    ${port}    ${mode}    ${version}    ${state}=none
255     ${out} =    Sxp.Find Connection    ${resp}    ${version}    ${mode}    ${ip}    ${port}
256     ...    ${state}
257     BuiltIn.Should Be True    ${out}    Doesn't have ${ip}:${port} ${mode} ${version} in state ${state}
258
259 Should Not Contain Connection
260     [Documentation]    Test if data doesn't contains specified connection
261     [Arguments]    ${resp}    ${ip}    ${port}    ${mode}    ${version}    ${state}=none
262     ${out} =    Sxp.Find Connection    ${resp}    ${version}    ${mode}    ${ip}    ${port}
263     ...    ${state}
264     BuiltIn.Should Not Be True    ${out}    Shouldn't have ${ip}:${port} ${mode} ${version}
265
266 Bindings Should Contain
267     [Documentation]    Retrieves bindings and verifies they contain given binding
268     [Arguments]    ${sgt}    ${prefix}    ${domain}=global    ${scope}=all
269     ${resp} =    Get Bindings    domain=${domain}    scope=${scope}
270     Should Contain Binding    ${resp}    ${sgt}    ${prefix}
271
272 Bindings Should Not Contain
273     [Documentation]    Retrieves bindings and verifies they do not contain given binding
274     [Arguments]    ${sgt}    ${prefix}    ${domain}=global    ${scope}=all
275     ${resp} =    Get Bindings    domain=${domain}    scope=${scope}
276     Should Not Contain Binding    ${resp}    ${sgt}    ${prefix}
277
278 Connections Should Contain
279     [Documentation]    Retrieves connections and verifies they contain given connection
280     [Arguments]    ${ip}    ${port}    ${mode}    ${version}    ${state}=none
281     ${resp} =    Get Connections
282     Should Contain Connection    ${resp}    ${ip}    ${port}    ${mode}    ${version}    ${state}
283
284 Connections Should Not Contain
285     [Documentation]    Retrieves connections and verifies they do not contain given connection
286     [Arguments]    ${ip}    ${port}    ${mode}    ${version}    ${state}=none
287     ${resp} =    Get Connections
288     Should Not Contain Connection    ${resp}    ${ip}    ${port}    ${mode}    ${version}    ${state}
289
290 Setup Topology Complex
291     [Arguments]    ${version}=version4    ${password}=none
292     FOR    ${node}    IN RANGE    2    6
293         Add Connection    ${version}    both    127.0.0.1    64999    127.0.0.${node}
294         ...    ${password}
295         Add Connection    ${version}    both    127.0.0.${node}    64999    127.0.0.1
296         ...    ${password}
297         BuiltIn.Wait Until Keyword Succeeds    15    1    Verify Connection    ${version}    both
298         ...    127.0.0.${node}
299         Add Bindings    ${node}0    10.10.10.${node}0/32    127.0.0.${node}
300         Add Bindings    ${node}0    10.10.${node}0.0/24    127.0.0.${node}
301         Add Bindings    ${node}0    10.${node}0.0.0/16    127.0.0.${node}
302         Add Bindings    ${node}0    ${node}0.0.0.0/8    127.0.0.${node}
303     END
304     Add Bindings    10    10.10.10.10/32    127.0.0.1
305     Add Bindings    10    10.10.10.0/24    127.0.0.1
306     Add Bindings    10    10.10.0.0/16    127.0.0.1
307     Add Bindings    10    10.0.0.0/8    127.0.0.1
308
309 Verify Snapshot Was Pushed
310     [Documentation]    Will succeed if the ${snapshot_string} is found in the karaf logs
311     [Arguments]    ${snapshot_string}=22-sxp-controller-one-node.xml
312     ${output} =    Utils.Run Command On Controller
313     ...    ${ODL_SYSTEM_IP}
314     ...    cat ${WORKSPACE}/${BUNDLEFOLDER}/data/log/karaf.log* | grep -c 'Successfully pushed configuration snapshot.*${snapshot_string}'
315     BuiltIn.Should Not Be Equal As Strings    ${output}    0
316
317 Add Domain
318     [Documentation]    Based on ODL version decide if domain's bindings will be added with or without origin type (introduced in Fluorine)
319     [Arguments]    ${domain_name}    ${sgt}=None    ${prefixes}=None    ${origin}=LOCAL    ${node}=127.0.0.1    ${session}=session
320     CompareStream.Run_Keyword_If_At_Least_Fluorine
321     ...    Add Domain Fluorine
322     ...    ${domain_name}
323     ...    ${sgt}
324     ...    ${prefixes}
325     ...    ${origin}
326     ...    ${node}
327     ...    ${session}
328     CompareStream.Run_Keyword_If_At_Most_Oxygen
329     ...    Add Domain Oxygen
330     ...    ${domain_name}
331     ...    ${sgt}
332     ...    ${prefixes}
333     ...    ${node}
334     ...    ${session}
335
336 Add Domain Fluorine
337     [Documentation]    Add Domain with bindings (with origin) via RPC
338     [Arguments]    ${domain_name}    ${sgt}    ${prefixes}    ${origin}    ${node}    ${session}
339     ${data} =    Sxp.Add Domain Xml Fluorine    ${node}    ${domain_name}    ${sgt}    ${prefixes}    ${origin}
340     Post To Controller    ${session}    add-domain    ${data}
341
342 Add Domain Oxygen
343     [Documentation]    Add Domain with bindings (without origin) via RPC
344     [Arguments]    ${domain_name}    ${sgt}    ${prefixes}    ${node}    ${session}
345     ${data} =    Sxp.Add Domain Xml Oxygen    ${node}    ${domain_name}    ${sgt}    ${prefixes}
346     Post To Controller    ${session}    add-domain    ${data}
347
348 Delete Domain
349     [Documentation]    Delete Domain via RPC
350     [Arguments]    ${domain_name}    ${node}=127.0.0.1    ${session}=session
351     ${data} =    Sxp.Delete Domain Xml    ${node}    ${domain_name}
352     Post To Controller    ${session}    delete-domain    ${data}
353
354 Add Bindings Range
355     [Documentation]    Add Bindings to Node specified by range
356     [Arguments]    ${sgt}    ${start}    ${size}    ${node}=127.0.0.1
357     ${prefixes} =    Sxp.Prefix Range    ${start}    ${size}
358     Add Bindings    ${sgt}    ${prefixes}    ${node}
359
360 Delete Bindings Range
361     [Documentation]    Delete Bindings to Node specified by range
362     [Arguments]    ${sgt}    ${start}    ${size}    ${node}=127.0.0.1
363     ${prefixes} =    Sxp.Prefix Range    ${start}    ${size}
364     Delete Bindings    ${sgt}    ${prefixes}    ${node}
365
366 Check Binding Range
367     [Documentation]    Check if Node contains Bindings specified by range
368     [Arguments]    ${sgt}    ${start}    ${end}    ${node}=127.0.0.1
369     ${resp} =    Get Bindings    ${node}
370     FOR    ${num}    IN RANGE    ${start}    ${end}
371         ${ip} =    Sxp.Get Ip From Number    ${num}
372         Should Contain Binding    ${resp}    ${sgt}    ${ip}/32
373     END
374
375 Check Binding Range Negative
376     [Documentation]    Check if Node does not contains Bindings specified by range
377     [Arguments]    ${sgt}    ${start}    ${end}    ${node}=127.0.0.1
378     ${resp} =    Get Bindings    ${node}
379     FOR    ${num}    IN RANGE    ${start}    ${end}
380         ${ip} =    Sxp.Get Ip From Number    ${num}
381         Should Not Contain Binding    ${resp}    ${sgt}    ${ip}/32
382     END
383
384 Setup SXP Environment
385     [Documentation]    Create session to Controller, ${node_range} parameter specifies number of localhost nodes to be created on ${ODL_SYSTEM_IP}.
386     [Arguments]    ${node_range}=1
387     RequestsLibrary.Create Session
388     ...    session
389     ...    http://${ODL_SYSTEM_IP}:${RESTCONFPORT}
390     ...    auth=${AUTH}
391     ...    timeout=${DEFAULT_TIMEOUT_HTTP}
392     ...    max_retries=0
393     FOR    ${num}    IN RANGE    1    ${node_range}+1
394         ${node} =    Sxp.Get Ip From Number    ${num}
395         Add Node    ${node}    retry_open_timer=${num}
396         BuiltIn.Wait Until Keyword Succeeds    20    1    Check Node Started    ${node}    system=${ODL_SYSTEM_IP}
397     END
398
399 Check Node Started
400     [Documentation]    Verify that SxpNode has data writen to Operational datastore and is running
401     [Arguments]    ${node}    ${port}=64999    ${system}=${node}    ${session}=session    ${ip}=${node}
402     ${resp} =    RequestsLibrary.Get Request
403     ...    ${session}
404     ...    /restconf/operational/network-topology:network-topology/topology/sxp/node/${node}/
405     BuiltIn.Should Be Equal As Strings    ${resp.status_code}    200
406     ${rc} =    Get Node Running Status    ${node}    ${port}    ${system}    ${session}    ${ip}
407     BuiltIn.Should Be Equal As Strings    ${rc}    0
408
409 Check Node Stopped
410     [Documentation]    Verify that SxpNode has data removed from Operational datastore and is not running
411     [Arguments]    ${node}    ${port}=64999    ${system}=${node}    ${session}=session    ${ip}=${node}
412     ${resp} =    RequestsLibrary.Get Request
413     ...    ${session}
414     ...    /restconf/operational/network-topology:network-topology/topology/sxp/node/${node}/
415     BuiltIn.Should Be Equal As Strings    ${resp.status_code}    404
416     ${rc} =    Get Node Running Status    ${node}    ${port}    ${system}    ${session}    ${ip}
417     BuiltIn.Should Be Equal As Strings    ${rc}    1
418
419 Get Node Running Status
420     [Documentation]    Get status if node is running by checking that netty server is running
421     [Arguments]    ${node}    ${port}    ${system}    ${session}    ${ip}
422     ${rc} =    Utils.Run Command On Remote System
423     ...    ${system}
424     ...    netstat -tln | grep -q ${ip}:${port} && echo 0 || echo 1
425     ...    ${ODL_SYSTEM_USER}
426     ...    ${ODL_SYSTEM_PASSWORD}
427     ...    prompt=${ODL_SYSTEM_PROMPT}
428     RETURN    ${rc}
429
430 Clean SXP Environment
431     [Documentation]    Destroy created sessions
432     [Arguments]    ${node_range}=1
433     FOR    ${num}    IN RANGE    1    ${node_range}+1
434         ${ip} =    Sxp.Get Ip From Number    ${num}
435         Delete Node    ${ip}
436         BuiltIn.Wait Until Keyword Succeeds    12x    10s    Check Node Stopped    ${ip}    system=${ODL_SYSTEM_IP}
437     END
438     RequestsLibrary.Delete All Sessions
439
440 Get Routing Configuration From Controller
441     [Documentation]    Get Routing configuration from config DS
442     [Arguments]    ${session}
443     ${resp} =    RequestsLibrary.Get Request
444     ...    ${session}
445     ...    /restconf/config/sxp-cluster-route:sxp-cluster-route/
446     ...    headers=${ACCEPT_XML}
447     ${data} =    BuiltIn.Set Variable If    "${resp.status_code}" == "200"    ${resp.text}    ${EMPTY}
448     RETURN    ${data}
449
450 Put Routing Configuration To Controller
451     [Documentation]    Put Routing configuration to Config DS
452     [Arguments]    ${data}    ${session}
453     ${resp} =    RequestsLibrary.Put Request
454     ...    ${session}
455     ...    /restconf/config/sxp-cluster-route:sxp-cluster-route/
456     ...    data=${data}
457     ...    headers=${HEADERS_XML}
458     BuiltIn.Log    ${resp}
459     BuiltIn.Should Match    "${resp.status_code}"    "20?"
460
461 Clean Routing Configuration To Controller
462     [Documentation]    Delete Routing configuration from Config DS
463     [Arguments]    ${session}
464     ${resp} =    RequestsLibrary.Get Request
465     ...    ${session}
466     ...    /restconf/config/sxp-cluster-route:sxp-cluster-route/
467     ...    headers=${ACCEPT_XML}
468     IF    "${resp.status_code}" == "200"
469         RequestsLibrary.Delete Request    ${session}    /restconf/config/sxp-cluster-route:sxp-cluster-route/
470     END