summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorBen Pfaff <blp@nicira.com>2010-07-01 09:47:46 -0700
committerBen Pfaff <blp@nicira.com>2010-07-01 09:47:46 -0700
commit20aa445d66ace847aa2945b372cc8d3c0e9b034b (patch)
tree7307ff1e1d0118dbeacaa8c221c21025d938a02b /tests
parentfd193af4334d05e119ad7bd10e8786c5034948fb (diff)
downloadopenvswitch-20aa445d66ace847aa2945b372cc8d3c0e9b034b.tar.gz
ovsdb: Extend "monitor" to select different operations in a single table.
Until now, "monitor" has only allowed the client to choose the kinds of changes that will be monitored on a per-table basis. However, it makes sense to be able to choose operations on a per-column basis. The immediate need for this is to make sure that the final statistics of deleted Interface records are known at time of deletion, even though the intermediate values of the statistics are not important. CC: Jeremy Stribling <strib@nicira.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/ovsdb-monitor.at17
1 files changed, 8 insertions, 9 deletions
diff --git a/tests/ovsdb-monitor.at b/tests/ovsdb-monitor.at
index 110a3138d..e3829056e 100644
--- a/tests/ovsdb-monitor.at
+++ b/tests/ovsdb-monitor.at
@@ -1,14 +1,13 @@
AT_BANNER([OVSDB -- ovsdb-server monitors])
# OVSDB_CHECK_MONITOR(TITLE, SCHEMA, [PRE-MONITOR-TXN], DB, TABLE,
-# TRANSACTIONS, OUTPUT, [SELECT], [KEYWORDS])
+# TRANSACTIONS, OUTPUT, [COLUMNS], [KEYWORDS])
#
# Creates a database with the given SCHEMA, starts an ovsdb-server on
# that database, and runs each of the TRANSACTIONS (which should be a
# quoted list of quoted strings) against it with ovsdb-client one at a
-# time. SELECT, if specified, is passed to ovsdb-client as the
-# operations to select. It should be a comma-separated list of
-# "initial", "insert", "delete", or "modify" keywords.
+# time. COLUMNS, if specified, is passed to ovsdb-client as the set
+# of columns and operations to select.
#
# Checks that the overall output is OUTPUT, but UUIDs in the output
# are replaced by markers of the form <N> where N is a number. The
@@ -28,7 +27,7 @@ m4_define([OVSDB_CHECK_MONITOR],
AT_CAPTURE_FILE([ovsdb-server-log])
AT_CHECK([ovsdb-server --detach --pidfile=$PWD/server-pid --remote=punix:socket --unixctl=$PWD/unixctl --log-file=$PWD/ovsdb-server-log db >/dev/null 2>&1],
[0], [], [])
- AT_CHECK([ovsdb-client -vjsonrpc --detach --pidfile=$PWD/client-pid -d json monitor --format=csv unix:socket $4 $5 '' $8 > output],
+ AT_CHECK([ovsdb-client -vjsonrpc --detach --pidfile=$PWD/client-pid -d json monitor --format=csv unix:socket $4 $5 $8 > output],
[0], [ignore], [ignore], [kill `cat server-pid`])
m4_foreach([txn], [$6],
[AT_CHECK([ovsdb-client transact unix:socket 'txn'], [0],
@@ -294,14 +293,14 @@ OVSDB_CHECK_MONITOR([monitor initial only],
[ordinals], [ordinals], [OVSDB_MONITOR_TXNS],
[[row,action,name,number,_version
<0>,initial,"""ten""",10,"[""uuid"",""<1>""]"
-]], [initial])
+]], [!insert,!delete,!modify])
OVSDB_CHECK_MONITOR([monitor insert only],
[ORDINAL_SCHEMA], [OVSDB_MONITOR_INITIAL],
[ordinals], [ordinals], [OVSDB_MONITOR_TXNS],
[[row,action,name,number,_version
<0>,insert,"""five""",5,"[""uuid"",""<1>""]"
-]], [insert])
+]], [!initial,!delete,!modify])
OVSDB_CHECK_MONITOR([monitor delete only],
[ORDINAL_SCHEMA], [OVSDB_MONITOR_INITIAL],
@@ -309,7 +308,7 @@ OVSDB_CHECK_MONITOR([monitor delete only],
[[row,action,name,number,_version
<0>,delete,"""FIVE""",5,"[""uuid"",""<1>""]"
<2>,delete,"""ten""",10,"[""uuid"",""<3>""]"
-]], [delete])
+]], [!initial,!insert,!modify])
OVSDB_CHECK_MONITOR([monitor modify only],
[ORDINAL_SCHEMA], [OVSDB_MONITOR_INITIAL],
@@ -317,4 +316,4 @@ OVSDB_CHECK_MONITOR([monitor modify only],
[[row,action,name,number,_version
<0>,old,"""five""",,"[""uuid"",""<1>""]"
,new,"""FIVE""",5,"[""uuid"",""<2>""]"
-]], [modify])
+]], [!initial,!insert,!delete])