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