]> git.proxmox.com Git - mirror_ovs.git/commit - lib/ovsdb-data.h
ovsdb-idl: Change interface to conditional monitoring.
authorBen Pfaff <blp@ovn.org>
Tue, 20 Dec 2016 04:55:35 +0000 (20:55 -0800)
committerBen Pfaff <blp@ovn.org>
Tue, 20 Dec 2016 05:02:11 +0000 (21:02 -0800)
commit0164e367f5d8e815bd224b1040b10c5d1a69b4dc
treedbbcf8c9411d47934f264a6d57936e7ef697436c
parent3a60b7cd5f38badfdd15fe4ba57b5c74c9ee9fce
ovsdb-idl: Change interface to conditional monitoring.

Most users of OVSDB react to whatever is currently in their view of the
database, as opposed to keeping track of changes and reacting to those
changes individually.  The interface to conditional monitoring was
different, in that it expected the client to say what to add or remove from
monitoring instead of what to monitor.  This seemed reasonable at the time,
but in practice it turns out that the usual approach actually works better,
because the condition is generally a function of the data visible in the
database.  This commit changes the approach.

This commit also changes the meaning of an empty condition for a table.
Previously, an empty condition meant to replicate every row.  Now, an empty
condition means to replicate no rows.  This is more convenient for code
that gradually constructs conditions, because it does not need special
cases for replicating nothing.

This commit also changes the internal implementation of conditions from
linked lists to arrays.  I just couldn't see an advantage to using linked
lists.

Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Liran Schour <lirans@il.ibm.com>
lib/ovsdb-data.h
lib/ovsdb-idl-provider.h
lib/ovsdb-idl.c
lib/ovsdb-idl.h
ovsdb/ovsdb-idlc.in
python/ovs/db/idl.py
tests/ovsdb-idl.at
tests/test-ovsdb.c
tests/test-ovsdb.py