ovsdb-client: support monitor-cond method
[cascardo/ovs.git] / tests / ovsdb-monitor.at
1 AT_BANNER([OVSDB -- ovsdb-server monitors])
2
3 # OVSDB_CHECK_MONITOR(TITLE, SCHEMA, [PRE-MONITOR-TXN], DB, TABLE,
4 #                     TRANSACTIONS, OUTPUT, [COLUMNS], [KEYWORDS])
5 #
6 # Creates a database with the given SCHEMA, starts an ovsdb-server on
7 # that database, and runs each of the TRANSACTIONS (which should be a
8 # quoted list of quoted strings) against it with ovsdb-client one at a
9 # time.  COLUMNS, if specified, is passed to ovsdb-client as the set
10 # of columns and operations to select.
11 #
12 # Checks that the overall output is OUTPUT, but UUIDs in the output
13 # are replaced by markers of the form <N> where N is a number.  The
14 # first unique UUID is replaced by <0>, the next by <1>, and so on.
15 # If a given UUID appears more than once it is always replaced by the
16 # same marker.
17 #
18 # TITLE is provided to AT_SETUP and KEYWORDS to AT_KEYWORDS.
19 m4_define([OVSDB_CHECK_MONITOR], 
20   [AT_SETUP([$1])
21    AT_KEYWORDS([ovsdb server monitor positive $9])
22    $2 > schema
23    AT_CHECK([ovsdb-tool create db schema], [0], [stdout], [ignore])
24    m4_foreach([txn], [$3],
25      [AT_CHECK([ovsdb-tool transact db 'txn'], [0], [ignore], [ignore])])
26    AT_CAPTURE_FILE([ovsdb-server-log])
27    AT_CHECK([ovsdb-server --detach --no-chdir --pidfile="`pwd`"/server-pid --remote=punix:socket --unixctl="`pwd`"/unixctl --log-file="`pwd`"/ovsdb-server-log db >/dev/null 2>&1],
28             [0], [], [])
29    AT_CAPTURE_FILE([ovsdb-client-log])
30    if test "$IS_WIN32" = "yes"; then
31      AT_CHECK([ovsdb-client -vjsonrpc --pidfile="`pwd`"/client-pid --log-file="`pwd`"/ovsdb-client-log -d json monitor --format=csv unix:socket $4 $5 $8 > output 2>/dev/null &],
32               [0], [ignore], [ignore], [kill `cat server-pid`])
33      sleep 1
34    else
35      AT_CHECK([ovsdb-client -vjsonrpc --detach --no-chdir --pidfile="`pwd`"/client-pid --log-file="`pwd`"/ovsdb-client-log -d json monitor --format=csv unix:socket $4 $5 $8 > output],
36             [0], [ignore], [ignore], [kill `cat server-pid`])
37    fi
38    m4_foreach([txn], [$6],
39      [AT_CHECK([ovsdb-client transact unix:socket 'txn'], [0],
40                      [ignore], [ignore], [kill `cat server-pid client-pid`])])
41    AT_CHECK([ovsdb-client transact unix:socket '[["$4"]]'], [0],
42             [ignore], [ignore], [kill `cat server-pid client-pid`])
43    OVS_APP_EXIT_AND_WAIT_BY_TARGET([`pwd`/unixctl], [`pwd`/server-pid])
44    OVS_WAIT_UNTIL([test ! -e client-pid])
45    AT_CHECK([${PERL} $srcdir/ovsdb-monitor-sort.pl < output | ${PERL} $srcdir/uuidfilt.pl], [0], [$7], [ignore])
46    AT_CLEANUP])
47
48 # OVSDB_CHECK_MONITOR_COND(TITLE, SCHEMA, [PRE-MONITOR-TXN], DB, TABLE,
49 #                     TRANSACTIONS, OUTPUT, CONDITIONS, [COLUMNS], [KEYWORDS],
50 #                     [CONDITIONS_CHANGE])
51 #
52 # Creates a database with the given SCHEMA, starts an ovsdb-server on
53 # that database, and runs each of the TRANSACTIONS (which should be a
54 # quoted list of quoted strings) against it with ovsdb-client one at a
55 # time.  COLUMNS, if specified, is passed to ovsdb-client as the set
56 # of columns and operations to select.
57 #
58 # Checks that the overall output is OUTPUT, but UUIDs in the output
59 # are replaced by markers of the form <N> where N is a number.  The
60 # first unique UUID is replaced by <0>, the next by <1>, and so on.
61 # If a given UUID appears more than once it is always replaced by the
62 # same marker.
63 #
64 # TITLE is provided to AT_SETUP and KEYWORDS to AT_KEYWORDS.
65 m4_define([OVSDB_CHECK_MONITOR_COND],
66   [AT_SETUP([$1])
67    AT_KEYWORDS([ovsdb server monitor monitor-cond positive $10])
68    $2 > schema
69    AT_CHECK([ovsdb-tool create db schema], [0], [stdout], [ignore])
70    m4_foreach([txn], [$3],
71      [AT_CHECK([ovsdb-tool transact db 'txn'], [0], [ignore], [ignore])])
72    AT_CAPTURE_FILE([ovsdb-server-log])
73    AT_CHECK([ovsdb-server --detach --no-chdir --pidfile="`pwd`"/server-pid --remote=punix:socket --unixctl="`pwd`"/unixctl --log-file="`pwd`"/ovsdb-server-log db >/dev/null 2>&1],
74             [0], [], [])
75    if test "$IS_WIN32" = "yes"; then
76      AT_CHECK([ovsdb-client -vjsonrpc --pidfile="`pwd`"/client-pid -d json monitor-cond --format=csv unix:socket $4 '[$8]' $5 $9 > output &],
77               [0], [ignore], [ignore], [kill `cat server-pid`])
78      sleep 1
79    else
80      AT_CHECK([ ovsdb-client -vjsonrpc --detach --no-chdir --pidfile="`pwd`"/client-pid -d json monitor-cond --format=csv unix:socket $4 '[$8]' $5 $9 > output],
81             [0], [ignore], [ignore], [kill `cat server-pid`])
82    fi
83    m4_foreach([txn], [$6],
84      [AT_CHECK([ovsdb-client transact unix:socket 'txn'], [0],
85                      [ignore], [ignore], [kill `cat server-pid client-pid`])])
86    CLIENT_PID=`cat "$OVS_RUNDIR"/client-pid 2>/dev/null`
87    m4_foreach([cond], [$10],
88      [AT_CHECK([ovs-appctl -t "`pwd`"/ovsdb-client.$CLIENT_PID.ctl ovsdb-client/cond_change $5 'cond'], [0], [ignore], [ignore])])
89    AT_CHECK([ovsdb-client transact unix:socket '[["$4"]]'], [0],
90             [ignore], [ignore], [kill `cat server-pid client-pid`])
91    AT_CHECK([ovs-appctl -t "`pwd`"/unixctl -e exit], [0], [ignore], [ignore])
92    OVS_WAIT_UNTIL([test ! -e server-pid && test ! -e client-pid])
93    AT_CHECK([${PERL} $srcdir/ovsdb-monitor-sort.pl < output | ${PERL} $srcdir/uuidfilt.pl], [0], [$7], [ignore])
94    AT_CLEANUP])
95
96 OVSDB_CHECK_MONITOR([monitor insert into empty table],
97   [ordinal_schema],
98   [],
99   [ordinals], [ordinals],
100   [[[["ordinals",
101       {"op": "insert",
102        "table": "ordinals",
103        "row": {"number": 0, "name": "zero"}}]]]],
104   [[row,action,name,number,_version
105 <0>,insert,"""zero""",0,"[""uuid"",""<1>""]"
106 ]])
107
108 OVSDB_CHECK_MONITOR([monitor insert into populated table],
109   [ordinal_schema],
110   [[[["ordinals",
111       {"op": "insert",
112        "table": "ordinals",
113        "row": {"number": 10, "name": "ten"}}]]]],
114   [ordinals], [ordinals],
115   [[[["ordinals",
116       {"op": "insert",
117        "table": "ordinals",
118        "row": {"number": 0, "name": "zero"}}]]]],
119   [[row,action,name,number,_version
120 <0>,initial,"""ten""",10,"[""uuid"",""<1>""]"
121
122 row,action,name,number,_version
123 <2>,insert,"""zero""",0,"[""uuid"",""<3>""]"
124 ]])
125
126 OVSDB_CHECK_MONITOR([monitor delete],
127   [ordinal_schema],
128   [[[["ordinals",
129       {"op": "insert",
130        "table": "ordinals",
131        "row": {"number": 10, "name": "ten"}}]]]],
132   [ordinals], [ordinals],
133   [[[["ordinals",
134       {"op": "delete",
135        "table": "ordinals",
136        "where": [["number", "==", 10]]}]]]],
137   [[row,action,name,number,_version
138 <0>,initial,"""ten""",10,"[""uuid"",""<1>""]"
139
140 row,action,name,number,_version
141 <0>,delete,"""ten""",10,"[""uuid"",""<1>""]"
142 ]])
143
144 OVSDB_CHECK_MONITOR([monitor row update],
145   [ordinal_schema],
146   [[[["ordinals",
147       {"op": "insert",
148        "table": "ordinals",
149        "row": {"number": 10, "name": "ten"}}]]]],
150   [ordinals], [ordinals],
151   [[[["ordinals",
152       {"op": "update",
153        "table": "ordinals",
154        "where": [["number", "==", 10]],
155        "row": {"name": "five plus five"}}]]]],
156   [[row,action,name,number,_version
157 <0>,initial,"""ten""",10,"[""uuid"",""<1>""]"
158
159 row,action,name,number,_version
160 <0>,old,"""ten""",,"[""uuid"",""<1>""]"
161 ,new,"""five plus five""",10,"[""uuid"",""<2>""]"
162 ]])
163
164 OVSDB_CHECK_MONITOR([monitor no-op row updates],
165   [ordinal_schema],
166   [[[["ordinals",
167       {"op": "insert",
168        "table": "ordinals",
169        "row": {"number": 10, "name": "ten"}}]]]],
170   [ordinals], [ordinals],
171   [[[["ordinals",
172       {"op": "update",
173        "table": "ordinals",
174        "where": [["number", "==", 10]],
175        "row": {"number": 10, "name": "ten"}}]]],
176    [[["ordinals",
177       {"op": "insert",
178        "table": "ordinals",
179        "row": {"number": 9, "name": "nine"}}]]]],
180   [[row,action,name,number,_version
181 <0>,initial,"""ten""",10,"[""uuid"",""<1>""]"
182
183 row,action,name,number,_version
184 <2>,insert,"""nine""",9,"[""uuid"",""<3>""]"
185 ]])
186
187 OVSDB_CHECK_MONITOR([monitor insert-and-update transaction],
188   [ordinal_schema],
189   [[[["ordinals",
190       {"op": "insert",
191        "table": "ordinals",
192        "row": {"number": 10, "name": "ten"}}]]]],
193   [ordinals], [ordinals],
194   [[[["ordinals",
195       {"op": "insert",
196        "table": "ordinals",
197        "row": {"number": 9, "name": "nine"},
198        "uuid-name": "nine"},
199       {"op": "update",
200        "table": "ordinals",
201        "where": [["_uuid", "==", ["named-uuid", "nine"]]],
202        "row": {"name": "three squared"}}]]]],
203   [[row,action,name,number,_version
204 <0>,initial,"""ten""",10,"[""uuid"",""<1>""]"
205
206 row,action,name,number,_version
207 <2>,insert,"""three squared""",9,"[""uuid"",""<3>""]"
208 ]])
209
210 OVSDB_CHECK_MONITOR([monitor insert-update-and-delete transaction],
211   [ordinal_schema],
212   [[[["ordinals",
213       {"op": "insert",
214        "table": "ordinals",
215        "row": {"number": 10, "name": "ten"}}]]]],
216   [ordinals], [ordinals],
217   [[[["ordinals",
218       {"op": "insert",
219        "table": "ordinals",
220        "row": {"number": 9, "name": "nine"},
221        "uuid-name": "nine"},
222       {"op": "update",
223        "table": "ordinals",
224        "where": [["_uuid", "==", ["named-uuid", "nine"]]],
225        "row": {"name": "three squared"}},
226       {"op": "delete",
227        "table": "ordinals",
228        "where": [["_uuid", "==", ["named-uuid", "nine"]]]},
229       {"op": "insert",
230        "table": "ordinals",
231        "row": {"number": 7, "name": "seven"}}]]]],
232   [[row,action,name,number,_version
233 <0>,initial,"""ten""",10,"[""uuid"",""<1>""]"
234
235 row,action,name,number,_version
236 <2>,insert,"""seven""",7,"[""uuid"",""<3>""]"
237 ]])
238
239 OVSDB_CHECK_MONITOR([monitor weak reference change],
240   [weak_schema],
241   [[[["weak",
242       {"op": "insert",
243        "table": "a",
244        "row": {"a": 0,
245                "a2a1": ["named-uuid", "a0"],
246                "a2b": ["named-uuid", "b2"]},
247        "uuid-name": "a0"},
248       {"op": "insert",
249        "table": "a",
250        "row": {"a": 1,
251                "a2a": ["named-uuid", "a0"],
252                "a2a1": ["named-uuid", "a1"],
253                "a2b": ["named-uuid", "b2"]},
254        "uuid-name": "a1"},
255       {"op": "insert",
256        "table": "b",
257        "row": {"b": 2},
258        "uuid-name": "b2"}]]]],
259   [weak], [a],
260   [[[["weak",
261       {"op": "delete",
262        "table": "a",
263        "where": [["a", "==", 0]]}]]]],
264   [[row,action,a,a2a,a2a1,a2b,_version
265 <0>,initial,0,"[""set"",[]]","[""uuid"",""<0>""]","[""uuid"",""<1>""]","[""uuid"",""<2>""]"
266 <3>,initial,1,"[""uuid"",""<0>""]","[""uuid"",""<3>""]","[""uuid"",""<1>""]","[""uuid"",""<4>""]"
267
268 row,action,a,a2a,a2a1,a2b,_version
269 <0>,delete,0,"[""set"",[]]","[""uuid"",""<0>""]","[""uuid"",""<1>""]","[""uuid"",""<2>""]"
270 <3>,old,,"[""uuid"",""<0>""]",,,"[""uuid"",""<4>""]"
271 ,new,1,"[""set"",[]]","[""uuid"",""<3>""]","[""uuid"",""<1>""]","[""uuid"",""<5>""]"
272 ]])
273
274 OVSDB_CHECK_MONITOR([monitor insert-update-and-delete transaction],
275   [ordinal_schema],
276   [[[["ordinals",
277       {"op": "insert",
278        "table": "ordinals",
279        "row": {"number": 10, "name": "ten"}}]]]],
280   [ordinals], [ordinals],
281   [[[["ordinals",
282       {"op": "insert",
283        "table": "ordinals",
284        "row": {"number": 9, "name": "nine"},
285        "uuid-name": "nine"},
286       {"op": "update",
287        "table": "ordinals",
288        "where": [["_uuid", "==", ["named-uuid", "nine"]]],
289        "row": {"name": "three squared"}},
290       {"op": "delete",
291        "table": "ordinals",
292        "where": [["_uuid", "==", ["named-uuid", "nine"]]]},
293       {"op": "insert",
294        "table": "ordinals",
295        "row": {"number": 7, "name": "seven"}}]]]],
296   [[row,action,name,number,_version
297 <0>,initial,"""ten""",10,"[""uuid"",""<1>""]"
298
299 row,action,name,number,_version
300 <2>,insert,"""seven""",7,"[""uuid"",""<3>""]"
301 ]])
302 \f
303 AT_BANNER([ovsdb -- ovsdb-monitor monitor only some operations])
304
305 m4_define([OVSDB_MONITOR_INITIAL],
306   [[[["ordinals",
307       {"op": "insert",
308        "table": "ordinals",
309        "row": {"number": 10, "name": "ten"}}]]]])
310 m4_define([OVSDB_MONITOR_TXNS],
311   [[[["ordinals",
312       {"op": "insert",
313        "table": "ordinals",
314        "row": {"number": 5, "name": "five"}}]]],
315    [[["ordinals",
316       {"op": "update",
317        "table": "ordinals",
318        "where": [["name", "==", "five"]],
319        "row": {"name": "FIVE"}}]]],
320    [[["ordinals",
321       {"op": "delete",
322        "table": "ordinals",
323        "where": []}]]]])
324
325 OVSDB_CHECK_MONITOR([monitor all operations],
326   [ordinal_schema], [OVSDB_MONITOR_INITIAL],
327   [ordinals], [ordinals], [OVSDB_MONITOR_TXNS],
328   [[row,action,name,number,_version
329 <0>,initial,"""ten""",10,"[""uuid"",""<1>""]"
330
331 row,action,name,number,_version
332 <2>,insert,"""five""",5,"[""uuid"",""<3>""]"
333
334 row,action,name,number,_version
335 <2>,old,"""five""",,"[""uuid"",""<3>""]"
336 ,new,"""FIVE""",5,"[""uuid"",""<4>""]"
337
338 row,action,name,number,_version
339 <2>,delete,"""FIVE""",5,"[""uuid"",""<4>""]"
340 <0>,delete,"""ten""",10,"[""uuid"",""<1>""]"
341 ]])
342
343 dnl A monitor with "initial" only doesn't really make sense,
344 dnl but it's still allowed and should work.
345 OVSDB_CHECK_MONITOR([monitor initial only],
346   [ordinal_schema], [OVSDB_MONITOR_INITIAL],
347   [ordinals], [ordinals], [OVSDB_MONITOR_TXNS],
348   [[row,action,name,number,_version
349 <0>,initial,"""ten""",10,"[""uuid"",""<1>""]"
350 ]], [!insert,!delete,!modify])
351
352 OVSDB_CHECK_MONITOR([monitor insert only],
353   [ordinal_schema], [OVSDB_MONITOR_INITIAL],
354   [ordinals], [ordinals], [OVSDB_MONITOR_TXNS],
355   [[row,action,name,number,_version
356 <0>,insert,"""five""",5,"[""uuid"",""<1>""]"
357 ]], [!initial,!delete,!modify])
358
359 OVSDB_CHECK_MONITOR([monitor delete only],
360   [ordinal_schema], [OVSDB_MONITOR_INITIAL],
361   [ordinals], [ordinals], [OVSDB_MONITOR_TXNS],
362   [[row,action,name,number,_version
363 <0>,delete,"""FIVE""",5,"[""uuid"",""<1>""]"
364 <2>,delete,"""ten""",10,"[""uuid"",""<3>""]"
365 ]], [!initial,!insert,!modify])
366
367 OVSDB_CHECK_MONITOR([monitor modify only],
368   [ordinal_schema], [OVSDB_MONITOR_INITIAL],
369   [ordinals], [ordinals], [OVSDB_MONITOR_TXNS],
370   [[row,action,name,number,_version
371 <0>,old,"""five""",,"[""uuid"",""<1>""]"
372 ,new,"""FIVE""",5,"[""uuid"",""<2>""]"
373 ]], [!initial,!insert,!delete])
374
375 AT_BANNER([ovsdb -- ovsdb-monitor-cond conditional monitor only some operations])
376
377 OVSDB_CHECK_MONITOR_COND([monitor-cond empty condition],
378   [ordinal_schema],
379   [[[["ordinals",
380       {"op": "insert",
381        "table": "ordinals",
382        "row": {"number": 0, "name": "zero"}},
383       {"op": "insert",
384        "table": "ordinals",
385        "row": {"number": 1, "name": "one"}},
386       {"op": "insert",
387        "table": "ordinals",
388        "row": {"number": 2, "name": "two"}}]]]],
389   [ordinals], [ordinals],
390   [[[["ordinals",
391       {"op": "insert",
392        "table": "ordinals",
393        "row": {"number": 10, "name": "ten"}},
394       {"op": "insert",
395        "table": "ordinals",
396        "row": {"number": 11, "name": "eleven"}}]]]],
397   [[row,action,name,number,_version
398 <0>,initial,"""one""",1,"[""uuid"",""<1>""]"
399 <2>,initial,"""two""",2,"[""uuid"",""<3>""]"
400 <4>,initial,"""zero""",,"[""uuid"",""<5>""]"
401
402 row,action,name,number,_version
403 <6>,insert,"""eleven""",11,"[""uuid"",""<7>""]"
404 <8>,insert,"""ten""",10,"[""uuid"",""<9>""]"
405 ]],
406   [[]])
407
408 OVSDB_CHECK_MONITOR_COND([monitor-cond multiple conditions],
409   [ordinal_schema],
410   [[[["ordinals",
411       {"op": "insert",
412        "table": "ordinals",
413        "row": {"number": 0, "name": "zero"}},
414       {"op": "insert",
415        "table": "ordinals",
416        "row": {"number": 1, "name": "one"}},
417       {"op": "insert",
418        "table": "ordinals",
419        "row": {"number": 2, "name": "two"}}]]]],
420   [ordinals], [ordinals],
421   [[[["ordinals",
422       {"op": "insert",
423        "table": "ordinals",
424        "row": {"number": 10, "name": "ten"}},
425       {"op": "insert",
426        "table": "ordinals",
427        "row": {"number": 11, "name": "eleven"}}]]]],
428   [[row,action,name,number,_version
429 <0>,initial,"""one""",1,"[""uuid"",""<1>""]"
430
431 row,action,name,number,_version
432 <2>,insert,"""ten""",10,"[""uuid"",""<3>""]"
433 ]],
434   [[["name","==","one"],["name","==","ten"]]])
435
436 OVSDB_CHECK_MONITOR_COND([monitor-cond delete from populated table],
437   [ordinal_schema],
438   [[[["ordinals",
439       {"op": "insert",
440        "table": "ordinals",
441        "row": {"number": 0, "name": "zero"}},
442       {"op": "insert",
443        "table": "ordinals",
444        "row": {"number": 1, "name": "one"}},
445       {"op": "insert",
446        "table": "ordinals",
447        "row": {"number": 2, "name": "two"}}]]]],
448   [ordinals], [ordinals],
449   [[[["ordinals",
450       {"op": "delete",
451        "table": "ordinals",
452        "where": []}]]]],
453   [[row,action,name,number,_version
454 <0>,initial,"""one""",1,"[""uuid"",""<1>""]"
455
456 row,action,name,number,_version
457 <0>,delete,,,
458 ]],
459   [[["name","==","one"],["name","==","ten"]]])
460
461 OVSDB_CHECK_MONITOR_COND([monitor-cond insert due to modify],
462   [ordinal_schema],
463   [[[["ordinals",
464       {"op": "insert",
465        "table": "ordinals",
466        "row": {"number": 0, "name": "zero"}},
467       {"op": "insert",
468        "table": "ordinals",
469        "row": {"number": 1, "name": "one"}},
470       {"op": "insert",
471        "table": "ordinals",
472        "row": {"number": 2, "name": "two"}}]]]],
473   [ordinals], [ordinals],
474   [[[["ordinals",
475       {"op": "update",
476        "table": "ordinals",
477        "where": [["name", "==", "one"]],
478        "row": {"name": "ONE"}}]]]],
479   [[row,action,name,number,_version
480 <0>,insert,"""ONE""",1,"[""uuid"",""<1>""]"
481 ]],
482   [[["name","==","ONE"]]],
483   [!initial,!delete,!modify])
484
485 OVSDB_CHECK_MONITOR_COND([monitor-cond delete due to modify],
486   [ordinal_schema],
487   [[[["ordinals",
488       {"op": "insert",
489        "table": "ordinals",
490        "row": {"number": 0, "name": "zero"}},
491       {"op": "insert",
492        "table": "ordinals",
493        "row": {"number": 1, "name": "one"}},
494       {"op": "insert",
495        "table": "ordinals",
496        "row": {"number": 2, "name": "two"}}]]]],
497   [ordinals], [ordinals],
498   [[[["ordinals",
499       {"op": "update",
500        "table": "ordinals",
501        "where": [["name", "==", "one"]],
502        "row": {"name": "ONE"}}]]]],
503   [[row,action,name,number,_version
504 <0>,delete,,,
505 ]],
506   [[["name","==","one"]]],
507   [!initial,!insert,!modify])
508
509 OVSDB_CHECK_MONITOR_COND([monitor-cond condition non-monitored columns],
510   [ordinal_schema],
511   [[[["ordinals",
512       {"op": "insert",
513        "table": "ordinals",
514        "row": {"number": 0, "name": "zero"}},
515       {"op": "insert",
516        "table": "ordinals",
517        "row": {"number": 1, "name": "one"}},
518       {"op": "insert",
519        "table": "ordinals",
520        "row": {"number": 2, "name": "two"}}]]]],
521   [ordinals], [ordinals],
522   [[[["ordinals",
523       {"op": "insert",
524        "table": "ordinals",
525        "row": {"number": 10, "name": "ten"}},
526       {"op": "insert",
527        "table": "ordinals",
528        "row": {"number": 11, "name": "eleven"}}]]]],
529   [[row,action,number
530 <0>,initial,1
531
532 row,action,number
533 <1>,insert,10
534 ]],
535   [[["name","==","one"],["name","==","ten"]]],
536   ["number"])
537
538 OVSDB_CHECK_MONITOR_COND([monitor-cond-change],
539   [ordinal_schema],
540   [[[["ordinals",
541       {"op": "insert",
542        "table": "ordinals",
543        "row": {"number": 0, "name": "zero"}},
544       {"op": "insert",
545        "table": "ordinals",
546        "row": {"number": 1, "name": "one"}},
547       {"op": "insert",
548        "table": "ordinals",
549        "row": {"number": 2, "name": "two"}}]]]],
550   [ordinals], [ordinals],
551   [],
552   [[row,action,name,number,_version
553 <0>,initial,"""one""",1,"[""uuid"",""<1>""]"
554 <2>,initial,"""two""",2,"[""uuid"",""<3>""]"
555 <4>,initial,"""zero""",,"[""uuid"",""<5>""]"
556
557 row,action,name,number,_version
558 <4>,delete,,,
559
560 row,action,name,number,_version
561 <2>,delete,,,
562
563 row,action,name,number,_version
564 <0>,delete,,,
565
566 row,action,name,number,_version
567 <0>,insert,"""one""",1,"[""uuid"",""<1>""]"
568 <2>,insert,"""two""",2,"[""uuid"",""<3>""]"
569 <4>,insert,"""zero""",,"[""uuid"",""<5>""]"
570 ]],
571   [[]],
572   [],
573   [[[[["name","==","one"],["name","==","two"]]]],
574    [[[["name","==","one"]]]],
575     [[[false]]],
576     [[[true]]]])