From 6bb9b060d5b0f972461f0c061a865393611fd86a Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Fri, 15 Dec 2017 11:14:55 -0800 Subject: ovsdb-server: Add support for a built-in _Server database. The _Server database is valuable primarily because it provides database clients a way to find out the details of changes to databases, schemas, etc. in a granular, natural way. Until now, the only way that the server could notify clients about these kinds of changes was to close the session; when the client reconnects, it is expected to reassess the server's state. One way to provide this kind of granular information would be to add specific JSON-RPC requests to obtain notifications for different kinds of changes, but since ovsdb-server already provides granular and flexible notification support for databases, using a database for the purpose is convenient and avoids duplicating functionality. Initially this database only reports databases' names and schemas, but when clustering support is added in a later commit it will also report important aspects of clustering and cluster status. Thus, this database also reduces the need to add JSON-RPC calls to retrieve information about new features. Signed-off-by: Ben Pfaff --- ovsdb/automake.mk | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'ovsdb/automake.mk') diff --git a/ovsdb/automake.mk b/ovsdb/automake.mk index d040fc6de..5760cba44 100644 --- a/ovsdb/automake.mk +++ b/ovsdb/automake.mk @@ -109,3 +109,28 @@ EXTRA_DIST += ovsdb/ovsdb-dot.in ovsdb/dot2pic noinst_SCRIPTS += ovsdb/ovsdb-dot CLEANFILES += ovsdb/ovsdb-dot OVSDB_DOT = $(run_python) $(srcdir)/ovsdb/ovsdb-dot.in + +EXTRA_DIST += ovsdb/_server.ovsschema +CLEANFILES += ovsdb/_server.ovsschema.inc +ovsdb/ovsdb-server.o: ovsdb/_server.ovsschema.inc +ovsdb/_server.ovsschema.inc: ovsdb/_server.ovsschema $(srcdir)/build-aux/text2c + $(AM_V_GEN)$(run_python) $(srcdir)/build-aux/text2c < $< > $@.tmp + $(AM_V_at)mv $@.tmp $@ + +# Version checking for _server.ovsschema. +ALL_LOCAL += ovsdb/_server.ovsschema.stamp +ovsdb/_server.ovsschema.stamp: ovsdb/_server.ovsschema + $(srcdir)/build-aux/cksum-schema-check $? $@ +CLEANFILES += ovsdb/_server.ovsschema.stamp + +# _Server schema documentation +EXTRA_DIST += ovsdb/_server.xml +CLEANFILES += ovsdb/ovsdb-server.5 +man_MANS += ovsdb/ovsdb-server.5 +ovsdb/ovsdb-server.5: \ + ovsdb/ovsdb-doc ovsdb/_server.xml ovsdb/_server.ovsschema + $(AM_V_GEN)$(OVSDB_DOC) \ + --version=$(VERSION) \ + $(srcdir)/ovsdb/_server.ovsschema \ + $(srcdir)/ovsdb/_server.xml > $@.tmp && \ + mv $@.tmp $@ -- cgit v1.2.1