Speed up SouthboundIT through multi-threading test cases
[netvirt.git] / integrationtest / src / test / resources / northbound.yaml
1 # This file contains test cases for the OVSDB Northbound API
2 # The ordering of the test data MUST be as follows:
3 #   name:
4 #   operation:
5 #   uri:
6 #   json:
7 #   expected:
8 #
9 # The tests are run in the order specified in this file
10 # The following variables are permitted in the URI or JSON:
11 #
12 # ${node} = The node identifier
13 # ${uuid} = The last UUID returned by a POST operation
14 # ${bridge_uuid} = The UUID of the test bridge
15 # ${port_uuid} = The UUID of the test port
16 ---
17 - name: testGetBridgeRows
18   operation: GET
19   uri: /ovsdb/nb/v2/node/OVS/${node}/tables/bridge/rows
20   json:
21   expected: 200
22
23 - name: testGetPortRows
24   operation: GET
25   uri: /ovsdb/nb/v2/node/OVS/${node}/tables/port/rows
26   json:
27   expected: 200
28
29 - name: testGetInterfaceRows
30   operation: GET
31   uri: /ovsdb/nb/v2/node/OVS/${node}/tables/interface/rows
32   json:
33   expected: 200
34
35 - name: testGetControllerRows
36   operation: GET
37   uri: /ovsdb/nb/v2/node/OVS/${node}/tables/controller/rows
38   json:
39   expected: 200
40
41 - name: testGetSslRows
42   operation: GET
43   uri: /ovsdb/nb/v2/node/OVS/${node}/tables/ssl/rows
44   json:
45   expected: 200
46
47 - name: testGetSflowRows
48   operation: GET
49   uri: /ovsdb/nb/v2/node/OVS/${node}/tables/sflow/rows
50   json:
51   expected: 200
52
53 - name: testGetQosRows
54   operation: GET
55   uri: /ovsdb/nb/v2/node/OVS/${node}/tables/qos/rows
56   json:
57   expected: 200
58
59 - name: testGetQueueRows
60   operation: GET
61   uri: /ovsdb/nb/v2/node/OVS/${node}/tables/queue/rows
62   json:
63   expected: 200
64
65 - name: testGetNetflowRows
66   operation: GET
67   uri: /ovsdb/nb/v2/node/OVS/${node}/tables/netflow/rows
68   json:
69   expected: 200
70
71 - name: testGetManagerRows
72   operation: GET
73   uri: /ovsdb/nb/v2/node/OVS/${node}/tables/manager/rows
74   json:
75   expected: 200
76
77 - name: testGetOpenVswitchRows
78   operation: GET
79   uri: /ovsdb/nb/v2/node/OVS/${node}/tables/open_vswitch/rows
80   json:
81   expected: 200
82
83 # Bridge
84
85 - name: testCreateBridge
86   operation: POST
87   uri: /ovsdb/nb/v2/node/OVS/${node}/tables/bridge/rows
88   json: >
89     {
90       "row": {
91         "Bridge": {
92         "name": "bridge1",
93         "datapath_type": "OPENFLOW"
94         }
95      }
96     }
97   expected: 201
98
99 - name: testGetBridgeRow
100   operation: GET
101   uri: /ovsdb/nb/v2/node/OVS/${node}/tables/bridge/rows/${uuid}
102   json:
103   expected: 200
104
105 - name: testUpdateBridgeRow
106   operation: PUT
107   uri: /ovsdb/nb/v2/node/OVS/${node}/tables/bridge/rows/${uuid}
108   json: >
109     {
110       "row": {
111         "Bridge": {
112           "stp_enable": true
113         }
114      }
115     }
116   expected: 200
117
118 # Port
119
120 - name: testCreatePort
121   operation: POST
122   uri: /ovsdb/nb/v2/node/OVS/${node}/tables/port/rows
123   json: >
124     {
125       "parent_uuid":"${bridge_uuid}",
126         "row":{
127           "Port":{
128             "name":"testPort1"
129           }
130         }
131     }
132   expected: 201
133
134 - name: testGetPortRow
135   operation: GET
136   uri: /ovsdb/nb/v2/node/OVS/${node}/tables/port/rows/${uuid}
137   json:
138   expected: 200
139
140 - name: testUpdatePortRow
141   operation: PUT
142   uri: /ovsdb/nb/v2/node/OVS/${node}/tables/port/rows/${uuid}
143   json: >
144     {
145        "row": {
146          "Port": {
147             "fake_bridge": true
148          }
149        }
150     }
151   expected: 200
152
153 # Interface
154
155 - name: testCreateInteface
156   operation: POST
157   uri: /ovsdb/nb/v2/node/OVS/${node}/tables/interface/rows
158   json: >
159     {
160       "parent_uuid": "${port_uuid}",
161         "row":{
162           "Interface":{
163             "name":"testInterface",
164             "admin_state":"up"
165         }
166       }
167     }
168   expected: 201
169
170 - name: testGetInterfaceRow
171   operation: GET
172   uri: /ovsdb/nb/v2/node/OVS/${node}/tables/interface/rows/${uuid}
173   json:
174   expected: 200
175
176 - name: testUpdateInterfaceRow
177   operation: PUT
178   uri: /ovsdb/nb/v2/node/OVS/${node}/tables/interface/rows/${uuid}
179   json: >
180     {
181       "row":{
182         "Interface":{
183           "type": "gre"
184         }
185       }
186     }
187   expected: 200
188
189 - name: testDeleteInterfaceRow
190   operation: DELETE
191   uri: /ovsdb/nb/v2/node/OVS/${node}/tables/interface/rows/${uuid}
192   json:
193   expected: 204
194
195 # Controller
196
197 - name: testCreateController
198   operation: POST
199   uri: /ovsdb/nb/v2/node/OVS/${node}/tables/controller/rows
200   json: >
201     {
202       "parent_uuid" : "${bridge_uuid}",
203       "row" : {
204         "Controller": {
205           "target": "1.1.1.1"
206             }
207         }
208     }
209   expected: 201
210
211 - name: testGetControllerRow
212   operation: GET
213   uri: /ovsdb/nb/v2/node/OVS/${node}/tables/controller/rows/${uuid}
214   json:
215   expected: 200
216
217 - name: testUpdateControllerRow
218   operation: PUT
219   uri: /ovsdb/nb/v2/node/OVS/${node}/tables/controller/rows/${uuid}
220   json: >
221     {
222       "row":{
223         "Controller":{
224           "is_connected": false
225         }
226       }
227     }
228   expected: 200
229
230 - name: testDeleteControllerRow
231   operation: DELETE
232   uri: /ovsdb/nb/v2/node/OVS/${node}/tables/controller/rows/${uuid}
233   json:
234   expected: 204
235
236 # SSL
237
238 - name: testCreateSslRow
239   operation: POST
240   uri: /ovsdb/nb/v2/node/OVS/${node}/tables/ssl/rows
241   json: >
242     {
243         "row":{
244           "SSL":{
245             "name":"mySSL",
246             "ca_cert" : "ca_cert",
247             "bootstrap_ca_cert" : true,
248             "certificate":"pieceofpaper",
249             "private_key" : "private"
250           }
251         }
252     }
253   expected: 201
254
255 - name: testGetSslRow
256   operation: GET
257   uri: /ovsdb/nb/v2/node/OVS/${node}/tables/ssl/rows/${uuid}
258   json:
259   expected: 200
260
261 - name: testUpdateSslRow
262   operation: PUT
263   uri: /ovsdb/nb/v2/node/OVS/${node}/tables/ssl/rows/${uuid}
264   json: >
265     {
266       "row":{
267         "SSL":{
268           "private_key" : "secret"
269         }
270       }
271     }
272   expected: 200
273
274 - name: testDeleteSslRow
275   operation: DELETE
276   uri: /ovsdb/nb/v2/node/OVS/${node}/tables/ssl/rows/${uuid}
277   json:
278   expected: 204
279
280 # sFlow
281
282 - name: testCreateSflowRow
283   operation: POST
284   uri: /ovsdb/nb/v2/node/OVS/${node}/tables/sflow/rows
285   json: >
286     {
287       "parent_uuid": "${bridge_uuid}",
288       "row": {
289         "sFlow": {
290           "targets": [
291             "set",
292             [
293               "targets_string"
294             ]
295           ]
296         }
297       }
298     }
299   expected: 201
300
301 - name: testGetSflowRow
302   operation: GET
303   uri: /ovsdb/nb/v2/node/OVS/${node}/tables/sflow/rows/${uuid}
304   json:
305   expected: 200
306
307 - name: testUpdateSflowRow
308   operation: PUT
309   uri: /ovsdb/nb/v2/node/OVS/${node}/tables/sflow/rows/${uuid}
310   json: >
311     {
312       "row":{
313         "sFlow":{
314           "targets": [
315             "set",
316             [
317               "targets_string",
318               "second_target"
319             ]
320           ]
321         }
322       }
323     }
324   expected: 200
325
326 - name: testDeleteSflowRow
327   operation: DELETE
328   uri: /ovsdb/nb/v2/node/OVS/${node}/tables/sflow/rows/${uuid}
329   json:
330   expected: 204
331
332 # QoS
333
334 - name: testCreateQosRow
335   operation: POST
336   uri: /ovsdb/nb/v2/node/OVS/${node}/tables/qos/rows
337   json: >
338     {
339       "parent_uuid" : "${port_uuid}",
340       "row" : {
341         "QoS": {
342           "type": "linux-htb"
343         }
344       }
345     }
346   expected: 201
347
348 - name: testGetQosRow
349   operation: GET
350   uri: /ovsdb/nb/v2/node/OVS/${node}/tables/qos/rows/${uuid}
351   json:
352   expected: 200
353
354 - name: testUpdateQosRow
355   operation: PUT
356   uri: /ovsdb/nb/v2/node/OVS/${node}/tables/qos/rows/${uuid}
357   json: >
358     {
359       "row":{
360         "QoS":{
361           "type": "linux-hfsc"
362         }
363       }
364     }
365   expected: 200
366
367 # Queue
368
369 - name: testCreateQueueRow
370   operation: POST
371   uri: /ovsdb/nb/v2/node/OVS/${node}/tables/queue/rows
372   json: >
373     {
374       "parent_uuid": "${qos_uuid}",
375       "row": {
376         "Queue": {
377           "dscp" : [
378           "set",
379           [
380               25
381             ]
382           ]
383         }
384       }
385     }
386   expected: 201
387
388 - name: testGetQueueRow
389   operation: GET
390   uri: /ovsdb/nb/v2/node/OVS/${node}/tables/queue/rows/${uuid}
391   json:
392   expected: 200
393
394 - name: testUpdateQueueRow
395   operation: PUT
396   uri: /ovsdb/nb/v2/node/OVS/${node}/tables/queue/rows/${uuid}
397   json: >
398     {
399       "row":{
400         "Queue":{
401           "other_config" : [
402             "map", ["foo", "bar" ]
403           ]
404         }
405       }
406     }
407   expected: 200
408
409 - name: testDeleteQueueRow
410   operation: DELETE
411   uri: /ovsdb/nb/v2/node/OVS/${node}/tables/queue/rows/${uuid}
412   json:
413   expected: 204
414
415 # NetFlow
416
417 - name: testCreateNetflowRow
418   operation: POST
419   uri: /ovsdb/nb/v2/node/OVS/${node}/tables/netflow/rows
420   json: >
421     {
422       "parent_uuid":"${bridge_uuid}",
423       "row" : {
424         "NetFlow":{
425           "targets" : [
426             "set", ["192.168.1.102:9998"]],
427           "active_timeout" : "0"
428           }
429       }
430     }
431   expected: 201
432
433 - name: testGetNetflowRow
434   operation: GET
435   uri: /ovsdb/nb/v2/node/OVS/${node}/tables/netflow/rows/${uuid}
436   json:
437   expected: 200
438
439 - name: testUpdateNetflowRow
440   operation: PUT
441   uri: /ovsdb/nb/v2/node/OVS/${node}/tables/netflow/rows/${uuid}
442   json: >
443     {
444       "row" : {
445         "NetFlow":{
446           "targets" : [
447             "set", ["192.168.1.102:9998", "192.168.2.102:9998"]]
448           }
449       }
450     }
451   expected: 200
452
453 - name: testDeleteNetflowRow
454   operation: DELETE
455   uri: /ovsdb/nb/v2/node/OVS/${node}/tables/netflow/rows/${uuid}
456   json:
457   expected: 204
458
459 # Manager
460
461 - name: testCreateManagerRow
462   operation: POST
463   uri: /ovsdb/nb/v2/node/OVS/${node}/tables/manager/rows
464   json: >
465     {
466       "parent_uuid":"${ovs_uuid}",
467         "row":{
468           "Manager":{
469             "target":"a_string",
470             "is_connected": true,
471             "state":"active"
472           }
473         }
474     }
475   expected: 201
476
477 - name: testGetManagerRow
478   operation: GET
479   uri: /ovsdb/nb/v2/node/OVS/${node}/tables/manager/rows/${uuid}
480   json:
481   expected: 200
482
483 - name: testUpdateManagerRow
484   operation: PUT
485   uri: /ovsdb/nb/v2/node/OVS/${node}/tables/manager/rows/${uuid}
486   json: >
487     {
488         "row":{
489           "Manager":{
490             "is_connected": false
491           }
492         }
493     }
494   expected: 200
495
496 - name: testDeleteManagerRow
497   operation: DELETE
498   uri: /ovsdb/nb/v2/node/OVS/${node}/tables/manager/rows/${uuid}
499   json:
500   expected: 204
501
502 # Cleanup
503
504 - name: testDeleteQosRow
505   operation: DELETE
506   uri: /ovsdb/nb/v2/node/OVS/${node}/tables/qos/rows/${qos_uuid}
507   json:
508   expected: 204
509
510 - name: testDeletePortRow
511   operation: DELETE
512   uri: /ovsdb/nb/v2/node/OVS/${node}/tables/port/rows/${port_uuid}
513   json:
514   expected: 204
515
516 - name: testDeleteBridgeRow
517   operation: DELETE
518   uri: /ovsdb/nb/v2/node/OVS/${node}/tables/bridge/rows/${bridge_uuid}
519   json:
520   expected: 204