bug fixing
[integration/test.git] / test / tools / OF_Test / robot_suites / 500__OF_Cluster_Sanity_OF / 010__Flows_OF13_Cluster.txt
1 *** Settings ***
2 Library        OperatingSystem
3 Library        Collections
4 Library        XML
5 Library        SSHLibrary
6 Library        ../../../../csit/libraries/XmlComparator.py
7 Variables      ../../../../csit/variables/Variables.py
8 Library        ../../../../csit/libraries/RequestsLibrary.py
9 Library        ../../../../csit/libraries/Common.py
10 Library        SanityLibrary.py
11 Suite Setup       Create Controllers Sessions
12 Suite Teardown    Delete All Sessions
13
14 *** Variables ***
15 #${member1}=        ODLVM1
16 #${member2}=        ODLVM2
17 #${member3}=        ODLVM3
18 ${switch_idx}=     1
19 ${switch_name}=    s${switch_idx}
20 ${url_m1_shard}=   /jolokia/read/org.opendaylight.controller:Category=Shards,name=member-1-shard-inventory-config,type=DistributedConfigDatastore
21 ${url_m2_shard}=   /jolokia/read/org.opendaylight.controller:Category=Shards,name=member-2-shard-inventory-config,type=DistributedConfigDatastore
22 ${url_m3_shard}=   /jolokia/read/org.opendaylight.controller:Category=Shards,name=member-3-shard-inventory-config,type=DistributedConfigDatastore
23 ${get_pers_url}=   /restconf/config/network-topology:network-topology/topology/topology-netconf/node/controller-config/yang-ext:mount/config:modules/module/distributed-datastore-provider:distributed-config-datastore-provider/distributed-config-store-module
24
25 *** Test Cases ***
26 Logging Initial Cluster Information
27     ${resp}=   Get Controller Response   session1  /jolokia/read/org.opendaylight.controller:Category=Shards,name=member-1-shard-inventory-config,type=DistributedConfigDatastore
28     Log   ${resp.content}
29     ${resp}=   Get Controller Response   session1  /jolokia/read/org.opendaylight.controller:Category=Shards,name=member-1-shard-inventory-operational,type=DistributedOperationalDatastore
30     Log   ${resp.content}
31     ${resp}=   Get Controller Response   session1  /restconf/config/network-topology:network-topology/topology/topology-netconf/node/controller-config/yang-ext:mount/config:modules/module/distributed-datastore-provider:distributed-config-datastore-provider/distributed-config-store-module
32     Log   ${resp.content}
33     ${resp}=   Get Controller Response   session1  /restconf/config/network-topology:network-topology/topology/topology-netconf/node/controller-config/yang-ext:mount/config:modules/module/distributed-datastore-provider:distributed-operational-datastore-provider/distributed-operational-store-module
34     Log   ${resp.content}
35     ${resp}=   Get Controller Response   session2  /jolokia/read/org.opendaylight.controller:Category=Shards,name=member-2-shard-inventory-config,type=DistributedConfigDatastore
36     Log   ${resp.content}
37     ${resp}=   Get Controller Response   session2  /jolokia/read/org.opendaylight.controller:Category=Shards,name=member-2-shard-inventory-operational,type=DistributedOperationalDatastore
38     Log   ${resp.content}
39     ${resp}=   Get Controller Response   session2  /restconf/config/network-topology:network-topology/topology/topology-netconf/node/controller-config/yang-ext:mount/config:modules/module/distributed-datastore-provider:distributed-config-datastore-provider/distributed-config-store-module
40     Log   ${resp.content}
41     ${resp}=   Get Controller Response   session2  /restconf/config/network-topology:network-topology/topology/topology-netconf/node/controller-config/yang-ext:mount/config:modules/module/distributed-datastore-provider:distributed-operational-datastore-provider/distributed-operational-store-module
42     Log   ${resp.content}
43     ${resp}=   Get Controller Response   session3  /jolokia/read/org.opendaylight.controller:Category=Shards,name=member-3-shard-inventory-config,type=DistributedConfigDatastore
44     Log   ${resp.content}
45     ${resp}=   Get Controller Response   session3  /jolokia/read/org.opendaylight.controller:Category=Shards,name=member-3-shard-inventory-operational,type=DistributedOperationalDatastore
46     Log   ${resp.content}
47     ${resp}=   Get Controller Response   session3  /restconf/config/network-topology:network-topology/topology/topology-netconf/node/controller-config/yang-ext:mount/config:modules/module/distributed-datastore-provider:distributed-config-datastore-provider/distributed-config-store-module
48     Log   ${resp.content}
49     ${resp}=   Get Controller Response   session3  /restconf/config/network-topology:network-topology/topology/topology-netconf/node/controller-config/yang-ext:mount/config:modules/module/distributed-datastore-provider:distributed-operational-datastore-provider/distributed-operational-store-module
50     Log   ${resp.content}
51 Add Flow 1 To Controller1
52     Init Flow Variables    1   1   1
53     Log             ${data}
54     ${resp}=        Putxml    session1   /restconf/config/opendaylight-inventory:nodes/node/openflow:${switch_idx}/table/${table_id}/flow/${flow_id}   data=${data}
55     Log             ${resp.content}
56     ${msg}=  Set Variable   Adding flow for /restconf/config/opendaylight-inventory:nodes/node/openflow:${switch_idx}/table/${table_id}/flow/${flow_id} failed, http response ${resp.status_code} received.
57     Should Be Equal As Strings   ${resp.status_code}   200   msg=${msg}
58 Add Flow 2 To Controller2
59     Init Flow Variables    1   2   2
60     Log             ${data}
61     ${resp}=        Putxml    session2   /restconf/config/opendaylight-inventory:nodes/node/openflow:${switch_idx}/table/${table_id}/flow/${flow_id}   data=${data}
62     Log             ${resp.content}
63     ${msg}=  Set Variable   Adding flow for /restconf/config/opendaylight-inventory:nodes/node/openflow:${switch_idx}/table/${table_id}/flow/${flow_id} failed, http response ${resp.status_code} received.
64     Should Be Equal As Strings   ${resp.status_code}   200   msg=${msg}
65 Add Flow 3 To Controller3
66     Init Flow Variables    1   3   3
67     Log             ${data}
68     ${resp}=        Putxml    session3   /restconf/config/opendaylight-inventory:nodes/node/openflow:${switch_idx}/table/${table_id}/flow/${flow_id}   data=${data}
69     Log             ${resp.content}
70     ${msg}=  Set Variable   Adding flow for /restconf/config/opendaylight-inventory:nodes/node/openflow:${switch_idx}/table/${table_id}/flow/${flow_id} failed, http response ${resp.status_code} received.
71     Should Be Equal As Strings   ${resp.status_code}   200   msg=${msg}
72 Show Switch Content After Add
73      Sleep  20s
74      Write    dpctl dump-flows -O OpenFlow13
75      Sleep  1s
76      ${switchouput}    Read
77      Log     ${switchouput}
78 Check Flow 1 Configured On Controller1
79    Init Flow Variables   1    1    1
80    ${resp}=   Get Controller Response   session1   /restconf/config/opendaylight-inventory:nodes/node/openflow:1/table/1/flow/1
81    Log    ${resp.content}
82    Should Be Equal As Strings  ${resp.status_code}  200
83    ${pres}  ${msg}=  Is Flow Configured  ${data}   ${resp.content}
84    Run Keyword If   '''${msg}'''!='${EMPTY}'   Log   ${msg}
85    Should Be Equal  ${True}  ${pres}   msg=${msg}
86 Check Flow 1 Operational On Controller1
87    Init Flow Variables   1    1    1
88    ${resp}=   Get Controller Response   session1   /restconf/operational/opendaylight-inventory:nodes/node/openflow:1/table/1
89    Log    ${resp.content}
90    Should Be Equal As Strings  ${resp.status_code}  200
91    ${pres}  ${msg}=  Is Flow Operational2  ${data}   ${resp.content}
92    Run Keyword If   '''${msg}'''!='${EMPTY}'   Log   ${msg}
93    Should Be Equal  ${True}  ${pres}   msg=${msg}
94 Check Flow 1 Configured On Controller2
95    Init Flow Variables   1    1    1
96    ${resp}=   Get Controller Response   session2   /restconf/config/opendaylight-inventory:nodes/node/openflow:1/table/1/flow/1
97    Log    ${resp.content}
98    Should Be Equal As Strings  ${resp.status_code}  200
99    ${pres}  ${msg}=  Is Flow Configured  ${data}   ${resp.content}
100    Run Keyword If   '''${msg}'''!='${EMPTY}'   Log   ${msg}
101    Should Be Equal  ${True}  ${pres}   msg=${msg}
102 Check Flow 1 Operational On Controller2
103    Init Flow Variables   1    1    1
104    ${resp}=   Get Controller Response   session2   /restconf/operational/opendaylight-inventory:nodes/node/openflow:1/table/1
105    Log    ${resp.content}
106    Should Be Equal As Strings  ${resp.status_code}  200
107    ${pres}  ${msg}=  Is Flow Operational2  ${data}   ${resp.content}
108    Run Keyword If   '''${msg}'''!='${EMPTY}'   Log   ${msg}
109    Should Be Equal  ${True}  ${pres}   msg=${msg}
110 Check Flow 1 Configured On Controller3
111    Init Flow Variables   1    1    1
112    ${resp}=   Get Controller Response   session3   /restconf/config/opendaylight-inventory:nodes/node/openflow:1/table/1/flow/1
113    Log    ${resp.content}
114    Should Be Equal As Strings  ${resp.status_code}  200
115    ${pres}  ${msg}=  Is Flow Configured  ${data}   ${resp.content}
116    Run Keyword If   '''${msg}'''!='${EMPTY}'   Log   ${msg}
117    Should Be Equal  ${True}  ${pres}   msg=${msg}
118 Check Flow 1 Operational On Controller3
119    Init Flow Variables   1    1    1
120    ${resp}=   Get Controller Response   session3   /restconf/operational/opendaylight-inventory:nodes/node/openflow:1/table/1
121    Log    ${resp.content}
122    Should Be Equal As Strings  ${resp.status_code}  200
123    ${pres}  ${msg}=  Is Flow Operational2  ${data}   ${resp.content}
124    Run Keyword If   '''${msg}'''!='${EMPTY}'   Log   ${msg}
125    Should Be Equal  ${True}  ${pres}   msg=${msg}
126 Check Flow 2 Configured On Controller1
127    Init Flow Variables   1    2    2
128    ${resp}=   Get Controller Response   session1   /restconf/config/opendaylight-inventory:nodes/node/openflow:1/table/1/flow/2
129    Log    ${resp.content}
130    Should Be Equal As Strings  ${resp.status_code}  200
131    ${pres}  ${msg}=  Is Flow Configured  ${data}   ${resp.content}
132    Run Keyword If   '''${msg}'''!='${EMPTY}'   Log   ${msg}
133    Should Be Equal  ${True}  ${pres}   msg=${msg}
134 Check Flow 2 Operational On Controller1
135    Init Flow Variables   1    2    2
136    ${resp}=   Get Controller Response   session1   /restconf/operational/opendaylight-inventory:nodes/node/openflow:1/table/1
137    Log    ${resp.content}
138    Should Be Equal As Strings  ${resp.status_code}  200
139    ${pres}  ${msg}=  Is Flow Operational2  ${data}   ${resp.content}
140    Run Keyword If   '''${msg}'''!='${EMPTY}'   Log   ${msg}
141    Should Be Equal  ${True}  ${pres}   msg=${msg}
142 Check Flow 2 Configured On Controller2
143    Init Flow Variables   1    2    2
144    ${resp}=   Get Controller Response   session2   /restconf/config/opendaylight-inventory:nodes/node/openflow:1/table/1/flow/2
145    Log    ${resp.content}
146    Should Be Equal As Strings  ${resp.status_code}  200
147    ${pres}  ${msg}=  Is Flow Configured  ${data}   ${resp.content}
148    Run Keyword If   '''${msg}'''!='${EMPTY}'   Log   ${msg}
149    Should Be Equal  ${True}  ${pres}   msg=${msg}
150 Check Flow 2 Operational On Controller2
151    Init Flow Variables   1    2    2
152    ${resp}=   Get Controller Response   session2   /restconf/operational/opendaylight-inventory:nodes/node/openflow:1/table/1
153    Log    ${resp.content}
154    Should Be Equal As Strings  ${resp.status_code}  200
155    ${pres}  ${msg}=  Is Flow Operational2  ${data}   ${resp.content}
156    Run Keyword If   '''${msg}'''!='${EMPTY}'   Log   ${msg}
157    Should Be Equal  ${True}  ${pres}   msg=${msg}
158 Check Flow 2 Configured On Controller3
159    Init Flow Variables   1    2    2
160    ${resp}=   Get Controller Response   session3   /restconf/config/opendaylight-inventory:nodes/node/openflow:1/table/1/flow/2
161    Log    ${resp.content}
162    Should Be Equal As Strings  ${resp.status_code}  200
163    ${pres}  ${msg}=  Is Flow Configured  ${data}   ${resp.content}
164    Run Keyword If   '''${msg}'''!='${EMPTY}'   Log   ${msg}
165    Should Be Equal  ${True}  ${pres}   msg=${msg}
166 Check Flow 2 Operational On Controller3
167    Init Flow Variables   1    2    2
168    ${resp}=   Get Controller Response   session3   /restconf/operational/opendaylight-inventory:nodes/node/openflow:1/table/1
169    Log    ${resp.content}
170    Should Be Equal As Strings  ${resp.status_code}  200
171    ${pres}  ${msg}=  Is Flow Operational2  ${data}   ${resp.content}
172    Run Keyword If   '''${msg}'''!='${EMPTY}'   Log   ${msg}
173    Should Be Equal  ${True}  ${pres}   msg=${msg}
174 Check Flow 3 Configured On Controller1
175    Init Flow Variables   1    3    3
176    ${resp}=   Get Controller Response   session1   /restconf/config/opendaylight-inventory:nodes/node/openflow:1/table/1/flow/3
177    Log    ${resp.content}
178    Should Be Equal As Strings  ${resp.status_code}  200
179    ${pres}  ${msg}=  Is Flow Configured  ${data}   ${resp.content}
180    Run Keyword If   '''${msg}'''!='${EMPTY}'   Log   ${msg}
181    Should Be Equal  ${True}  ${pres}   msg=${msg}
182 Check Flow 3 Operational On Controller1
183    Init Flow Variables   1    3    3
184    ${resp}=   Get Controller Response   session1   /restconf/operational/opendaylight-inventory:nodes/node/openflow:1/table/1
185    Log    ${resp.content}
186    Should Be Equal As Strings  ${resp.status_code}  200
187    ${pres}  ${msg}=  Is Flow Operational2  ${data}   ${resp.content}
188    Run Keyword If   '''${msg}'''!='${EMPTY}'   Log   ${msg}
189    Should Be Equal  ${True}  ${pres}   msg=${msg}
190 Check Flow 3 Configured On Controller2
191    Init Flow Variables   1    3    3
192    ${resp}=   Get Controller Response   session2   /restconf/config/opendaylight-inventory:nodes/node/openflow:1/table/1/flow/3
193    Log    ${resp.content}
194    Should Be Equal As Strings  ${resp.status_code}  200
195    ${pres}  ${msg}=  Is Flow Configured  ${data}   ${resp.content}
196    Run Keyword If   '''${msg}'''!='${EMPTY}'   Log   ${msg}
197    Should Be Equal  ${True}  ${pres}   msg=${msg}
198 Check Flow 3 Operational On Controller2
199    Init Flow Variables   1    3    3
200    ${resp}=   Get Controller Response   session2   /restconf/operational/opendaylight-inventory:nodes/node/openflow:1/table/1
201    Log    ${resp.content}
202    Should Be Equal As Strings  ${resp.status_code}  200
203    ${pres}  ${msg}=  Is Flow Operational2  ${data}   ${resp.content}
204    Run Keyword If   '''${msg}'''!='${EMPTY}'   Log   ${msg}
205    Should Be Equal  ${True}  ${pres}   msg=${msg}
206 Check Flow 3 Configured On Controller3
207    Init Flow Variables   1    3    3
208    ${resp}=   Get Controller Response   session3   /restconf/config/opendaylight-inventory:nodes/node/openflow:1/table/1/flow/3
209    Log    ${resp.content}
210    Should Be Equal As Strings  ${resp.status_code}  200
211    ${pres}  ${msg}=  Is Flow Configured  ${data}   ${resp.content}
212    Run Keyword If   '''${msg}'''!='${EMPTY}'   Log   ${msg}
213    Should Be Equal  ${True}  ${pres}   msg=${msg}
214 Check Flow 3 Operational On Controller3
215    Init Flow Variables   1    3    3
216    ${resp}=   Get Controller Response   session3   /restconf/operational/opendaylight-inventory:nodes/node/openflow:1/table/1
217    Log    ${resp.content}
218    Should Be Equal As Strings  ${resp.status_code}  200
219    ${pres}  ${msg}=  Is Flow Operational2  ${data}   ${resp.content}
220    Run Keyword If   '''${msg}'''!='${EMPTY}'   Log   ${msg}
221    Should Be Equal  ${True}  ${pres}   msg=${msg}
222 Delete Flow 1 On Controller1
223       Init Flow Variables    1   1   1
224       ${resp}=  Delete   session1   /restconf/config/opendaylight-inventory:nodes/node/openflow:${switch_idx}/table/${table_id}/flow/${flow_id}
225       Log             ${resp.content}
226       ${msg}=  Set Variable  Delete flow for /restconf/config/opendaylight-inventory:nodes/node/openflow:${switch_idx}/table/${table_id}/flow/${flow_id} failed, http response ${resp.status_code} received.
227       Should Be Equal As Strings   ${resp.status_code}   200   msg=${msg}
228 Delete Flow 2 On Controller2
229       Init Flow Variables    1   2   2
230       ${resp}=  Delete   session2   /restconf/config/opendaylight-inventory:nodes/node/openflow:${switch_idx}/table/${table_id}/flow/${flow_id}
231       Log             ${resp.content}
232       ${msg}=  Set Variable  Delete flow for /restconf/config/opendaylight-inventory:nodes/node/openflow:${switch_idx}/table/${table_id}/flow/${flow_id} failed, http response ${resp.status_code} received.
233       Should Be Equal As Strings   ${resp.status_code}   200   msg=${msg}
234 Delete Flow 3 On Controller3
235       Init Flow Variables    1   3   3
236       ${resp}=  Delete   session3   /restconf/config/opendaylight-inventory:nodes/node/openflow:${switch_idx}/table/${table_id}/flow/${flow_id}
237       Log             ${resp.content}
238       ${msg}=  Set Variable  Delete flow for /restconf/config/opendaylight-inventory:nodes/node/openflow:${switch_idx}/table/${table_id}/flow/${flow_id} failed, http response ${resp.status_code} received.
239       Should Be Equal As Strings   ${resp.status_code}   200   msg=${msg}
240 Show Switch Content After Delete
241      Sleep  20s
242      Write    dpctl dump-flows -O OpenFlow13
243      Sleep  1s
244      ${switchouput}    Read
245      Log     ${switchouput}
246 Check Flow 1 Not Configured On Controller1
247    ${resp}=   Get Controller Response   session1   /restconf/config/opendaylight-inventory:nodes/node/openflow:1/table/1/flow/1
248    Log    ${resp.content}
249    Should Be Equal As Strings  ${resp.status_code}  404
250 Check Flow 1 Not Operational On Controller1
251    ${resp}=   Get Controller Response   session1   /restconf/operational/opendaylight-inventory:nodes/node/openflow:1/table/1
252    Log    ${resp.content}
253    Should Be Equal As Strings  ${resp.status_code}  200
254    ${pres}  ${msg}=  Is Flow Operational2  ${data}   ${resp.content}
255    Run Keyword If   '''${msg}'''!='${EMPTY}'   Log   ${msg}
256    Should Be Equal  ${False}  ${pres}   msg=${msg}
257 Check Flow 1 Not Configured On Controller2
258    ${resp}=   Get Controller Response   session2   /restconf/config/opendaylight-inventory:nodes/node/openflow:1/table/1/flow/1
259    Log    ${resp.content}
260    Should Be Equal As Strings  ${resp.status_code}  404
261 Check Flow 1 Not Operational On Controller2
262    ${resp}=   Get Controller Response   session2   /restconf/operational/opendaylight-inventory:nodes/node/openflow:1/table/1
263    Log    ${resp.content}
264    Should Be Equal As Strings  ${resp.status_code}  200
265    ${pres}  ${msg}=  Is Flow Operational2  ${data}   ${resp.content}
266    Run Keyword If   '''${msg}'''!='${EMPTY}'   Log   ${msg}
267    Should Be Equal  ${False}  ${pres}   msg=${msg}
268 Check Flow 1 Not Configured On Controller3
269    ${resp}=   Get Controller Response   session3   /restconf/config/opendaylight-inventory:nodes/node/openflow:1/table/1/flow/1
270    Log    ${resp.content}
271    Should Be Equal As Strings  ${resp.status_code}  404
272 Check Flow 1 Not Operational On Controller3
273    ${resp}=   Get Controller Response   session3   /restconf/operational/opendaylight-inventory:nodes/node/openflow:1/table/1
274    Log    ${resp.content}
275    Should Be Equal As Strings  ${resp.status_code}  200
276    ${pres}  ${msg}=  Is Flow Operational2  ${data}   ${resp.content}
277    Run Keyword If   '''${msg}'''!='${EMPTY}'   Log   ${msg}
278    Should Be Equal  ${False}  ${pres}   msg=${msg}
279 Check Flow 2 Not Configured On Controller1
280    ${resp}=   Get Controller Response   session1   /restconf/config/opendaylight-inventory:nodes/node/openflow:1/table/1/flow/2
281    Log    ${resp.content}
282    Should Be Equal As Strings  ${resp.status_code}  404
283 Check Flow 2 Not Operational On Controller1
284    ${resp}=   Get Controller Response   session1   /restconf/operational/opendaylight-inventory:nodes/node/openflow:1/table/1
285    Log    ${resp.content}
286    Should Be Equal As Strings  ${resp.status_code}  200
287    ${pres}  ${msg}=  Is Flow Operational2  ${data}   ${resp.content}
288    Run Keyword If   '''${msg}'''!='${EMPTY}'   Log   ${msg}
289    Should Be Equal  ${False}  ${pres}   msg=${msg}
290 Check Flow 2 Not Configured On Controller2
291    ${resp}=   Get Controller Response   session2   /restconf/config/opendaylight-inventory:nodes/node/openflow:1/table/1/flow/2
292    Log    ${resp.content}
293    Should Be Equal As Strings  ${resp.status_code}  404
294 Check Flow 2 Not Operational On Controller2
295    ${resp}=   Get Controller Response   session2   /restconf/operational/opendaylight-inventory:nodes/node/openflow:1/table/1
296    Log    ${resp.content}
297    Should Be Equal As Strings  ${resp.status_code}  200
298    ${pres}  ${msg}=  Is Flow Operational2  ${data}   ${resp.content}
299    Run Keyword If   '''${msg}'''!='${EMPTY}'   Log   ${msg}
300    Should Be Equal  ${False}  ${pres}   msg=${msg}
301 Check Flow 2 Not Configured On Controller3
302    ${resp}=   Get Controller Response   session3   /restconf/config/opendaylight-inventory:nodes/node/openflow:1/table/1/flow/2
303    Log    ${resp.content}
304    Should Be Equal As Strings  ${resp.status_code}  404
305 Check Flow 2 Not Operational On Controller3
306    ${resp}=   Get Controller Response   session3   /restconf/operational/opendaylight-inventory:nodes/node/openflow:1/table/1
307    Log    ${resp.content}
308    Should Be Equal As Strings  ${resp.status_code}  200
309    ${pres}  ${msg}=  Is Flow Operational2  ${data}   ${resp.content}
310    Run Keyword If   '''${msg}'''!='${EMPTY}'   Log   ${msg}
311    Should Be Equal  ${False}  ${pres}   msg=${msg}
312 Check Flow 3 Not Configured On Controller1
313    ${resp}=   Get Controller Response   session1   /restconf/config/opendaylight-inventory:nodes/node/openflow:1/table/1/flow/3
314    Log    ${resp.content}
315    Should Be Equal As Strings  ${resp.status_code}  404
316 Check Flow 3 Not Operational On Controller1
317    ${resp}=   Get Controller Response   session1   /restconf/operational/opendaylight-inventory:nodes/node/openflow:1/table/1
318    Log    ${resp.content}
319    Should Be Equal As Strings  ${resp.status_code}  200
320    ${pres}  ${msg}=  Is Flow Operational2  ${data}   ${resp.content}
321    Run Keyword If   '''${msg}'''!='${EMPTY}'   Log   ${msg}
322    Should Be Equal  ${False}  ${pres}   msg=${msg}
323 Check Flow 3 Not Configured On Controller2
324    ${resp}=   Get Controller Response   session2   /restconf/config/opendaylight-inventory:nodes/node/openflow:1/table/1/flow/3
325    Log    ${resp.content}
326    Should Be Equal As Strings  ${resp.status_code}  404
327 Check Flow 3 Not Operational On Controller2
328    ${resp}=   Get Controller Response   session2   /restconf/operational/opendaylight-inventory:nodes/node/openflow:1/table/1
329    Log    ${resp.content}
330    Should Be Equal As Strings  ${resp.status_code}  200
331    ${pres}  ${msg}=  Is Flow Operational2  ${data}   ${resp.content}
332    Run Keyword If   '''${msg}'''!='${EMPTY}'   Log   ${msg}
333    Should Be Equal  ${False}  ${pres}   msg=${msg}
334 Check Flow 3 Not Configured On Controller3
335    ${resp}=   Get Controller Response   session3   /restconf/config/opendaylight-inventory:nodes/node/openflow:1/table/1/flow/3
336    Log    ${resp.content}
337    Should Be Equal As Strings  ${resp.status_code}  404
338 Check Flow 3 Not Operational On Controller3
339    ${resp}=   Get Controller Response   session3   /restconf/operational/opendaylight-inventory:nodes/node/openflow:1/table/1
340    Log    ${resp.content}
341    Should Be Equal As Strings  ${resp.status_code}  200
342    ${pres}  ${msg}=  Is Flow Operational2  ${data}   ${resp.content}
343    Run Keyword If   '''${msg}'''!='${EMPTY}'   Log   ${msg}
344    Should Be Equal  ${False}  ${pres}   msg=${msg}
345 *** Keywords ***
346 Init Flow Variables   [Arguments]   ${tableid}  ${flowid}  ${priority}
347       ${data}=       Get Flow Content   ${tableid}  ${flowid}  ${priority}
348       ${xmlroot}=    Parse Xml    ${data}
349       ${table_id}=   Set Variable  ${tableid}
350       ${flow_id}=    Set Variable  ${flowid}
351       ${flow_priority}=    Set Variable  ${priority}
352       Set Suite Variable   ${table_id}
353       Set Suite Variable   ${flow_id}
354       Set Suite Variable   ${flow_priority}
355       Set Suite Variable   ${data}
356       Set Suite Variable   ${xmlroot}
357 Create Controllers Sessions
358     Create Session    session1    http://${CONTROLLER}:${RESTCONFPORT}    auth=${AUTH}    headers=${HEADERS_XML}
359     Create Session    session2    http://${CONTROLLER1}:${RESTCONFPORT}    auth=${AUTH}    headers=${HEADERS_XML}
360     Create Session    session3    http://${CONTROLLER2}:${RESTCONFPORT}    auth=${AUTH}    headers=${HEADERS_XML}
361 Get Controller Response  [Arguments]  ${session}  ${url}
362     ${headers}=      Create Dictionary   Accept   application/xml
363     ${resp}=   Get  ${session}  ${url}   headers=${headers}
364     Return From Keyword   ${resp}
365