This adds ovs-confctl to configure DBs running the Local_Config
schema added in 6f24c2bc7.
Signed-off-by: Terry Wilson
---
debian/openvswitch-common.install | 1 +
debian/openvswitch-common.manpages | 1 +
lib/.gitignore | 3 +
lib/automake.mk| 8 +
lib/ovsconf-idl.ann| 9 +
rhel/openvswitch.spec.in | 2 +
tests/automake.mk | 1 +
tests/ovs-confctl.at | 58 +++
tests/testsuite.at | 1 +
utilities/.gitignore | 2 +
utilities/automake.mk | 8 +
utilities/ovs-confctl.8.xml| 213 +
utilities/ovs-confctl.c| 726 +
13 files changed, 1033 insertions(+)
create mode 100644 lib/ovsconf-idl.ann
create mode 100644 tests/ovs-confctl.at
create mode 100644 utilities/ovs-confctl.8.xml
create mode 100644 utilities/ovs-confctl.c
diff --git a/debian/openvswitch-common.install
b/debian/openvswitch-common.install
index 3264ea53c..32acdb9b6 100644
--- a/debian/openvswitch-common.install
+++ b/debian/openvswitch-common.install
@@ -1,5 +1,6 @@
etc/bash_completion.d/ovs-appctl-bashcomp.bash
usr/bin/ovs-appctl
+usr/bin/ovs-confctl
usr/bin/ovs-docker
usr/bin/ovs-ofctl
usr/bin/ovs-parse-backtrace
diff --git a/debian/openvswitch-common.manpages
b/debian/openvswitch-common.manpages
index 95004122c..73c125af2 100644
--- a/debian/openvswitch-common.manpages
+++ b/debian/openvswitch-common.manpages
@@ -2,6 +2,7 @@ ovsdb/ovsdb-client.1
ovsdb/ovsdb-tool.1
utilities/bugtool/ovs-bugtool.8
debian/tmp/usr/share/man/man8/ovs-appctl.8
+utilities/ovs-confctl.8
utilities/ovs-ofctl.8
debian/tmp/usr/share/man/man8/ovs-parse-backtrace.8
debian/tmp/usr/share/man/man8/ovs-pki.8
diff --git a/lib/.gitignore b/lib/.gitignore
index ec9bdb092..c165deb72 100644
--- a/lib/.gitignore
+++ b/lib/.gitignore
@@ -8,6 +8,9 @@
/ofp-actions.inc2
/ofp-errors.inc
/ofp-msgs.inc
+/ovsconf-idl.c
+/ovsconf-idl.h
+/ovsconf-idl.ovsidl
/ovsdb-server-idl.c
/ovsdb-server-idl.h
/ovsdb-server-idl.ovsidl
diff --git a/lib/automake.mk b/lib/automake.mk
index 1d00cfa20..816fa1c99 100644
--- a/lib/automake.mk
+++ b/lib/automake.mk
@@ -426,6 +426,8 @@ nodist_lib_libopenvswitch_la_SOURCES = \
lib/dirs.c \
lib/ovsdb-server-idl.c \
lib/ovsdb-server-idl.h \
+ lib/ovsconf-idl.c \
+ lib/ovsconf-idl.h \
lib/vswitch-idl.c \
lib/vswitch-idl.h
CLEANFILES += $(nodist_lib_libopenvswitch_la_SOURCES)
@@ -612,6 +614,12 @@ EXTRA_DIST += lib/vswitch-idl.ann
lib/vswitch-idl.ovsidl: vswitchd/vswitch.ovsschema lib/vswitch-idl.ann
$(AM_V_GEN)$(OVSDB_IDLC) annotate $(srcdir)/vswitchd/vswitch.ovsschema
$(srcdir)/lib/vswitch-idl.ann > $@.tmp && mv $@.tmp $@
+# local-config IDL
+OVSIDL_BUILT += lib/ovsconf-idl.c lib/ovsconf-idl.h lib/ovsconf-idl.ovsidl
+EXTRA_DIST += lib/ovsconf-idl.ann
+lib/ovsconf-idl.ovsidl: ovsdb/local-config.ovsschema lib/ovsconf-idl.ann
+ $(AM_V_GEN)$(OVSDB_IDLC) annotate
$(srcdir)/ovsdb/local-config.ovsschema $(srcdir)/lib/ovsconf-idl.ann > $@.tmp
&& mv $@.tmp $@
+
lib/dirs.c: lib/dirs.c.in Makefile
$(AM_V_GEN)($(ro_c) && sed < $(srcdir)/lib/dirs.c.in \
-e 's,[@]srcdir[@],$(srcdir),g' \
diff --git a/lib/ovsconf-idl.ann b/lib/ovsconf-idl.ann
new file mode 100644
index 0..6c948d3b9
--- /dev/null
+++ b/lib/ovsconf-idl.ann
@@ -0,0 +1,9 @@
+# -*- python -*-
+
+# This code, when invoked by "ovsdb-idlc annotate" (by the build
+# process), annotates local-config.ovsschema with additional data that give
+# the ovsdb-idl engine information about the types involved, so that
+# it can generate more programmer-friendly data structures.
+
+s["idlPrefix"] = "ovsconf_"
+s["idlHeader"] = "\"lib/ovsconf-idl.h\""
diff --git a/rhel/openvswitch.spec.in b/rhel/openvswitch.spec.in
index 2d8ff18bb..34a64f5a0 100644
--- a/rhel/openvswitch.spec.in
+++ b/rhel/openvswitch.spec.in
@@ -206,6 +206,7 @@ exit 0
/etc/sysconfig/network-scripts/ifup-ovs
/etc/sysconfig/network-scripts/ifdown-ovs
/usr/bin/ovs-appctl
+/usr/bin/ovs-confctl
/usr/bin/ovs-dpctl
/usr/bin/ovs-dpctl-top
/usr/bin/ovs-docker
@@ -240,6 +241,7 @@ exit 0
%{_mandir}/man7/ovsdb-server.7*
/usr/share/man/man8/ovs-appctl.8.gz
/usr/share/man/man8/ovs-bugtool.8.gz
+/usr/share/man/man8/ovs-confctl.8.gz
/usr/share/man/man8/ovs-ctl.8.gz
/usr/share/man/man8/ovs-dpctl.8.gz
/usr/share/man/man8/ovs-dpctl-top.8.gz
diff --git a/tests/automake.mk b/tests/automake.mk
index b29cb783e..48130cd5b 100644
--- a/tests/automake.mk
+++ b/tests/automake.mk
@@ -98,6 +98,7 @@ TESTSUITE_AT = \
tests/ovsdb-idl.at \
tests/ovsdb-lock.at \
tests/ovsdb-rbac.at \
+ tests/ovs-confctl.at \
tests/ovs-vsctl.at \
tests/ovs-xapi-sync.at \
tests/stp.at \
diff --git a/tests/ovs-confctl.at b/tests/ovs-confctl.at
new file mode 100644
index 0..fadc48130
--- /dev/null
+++