From: Jakob Meng <[email protected]> This patch series builds upon [0] and primarily incorporates Ilya's suggestions [1]: * In contrast to previous revisions, the JSON-RPC API is now left unmodified. * Instead a new 'set-options' command (unixctl_set_options callback) has been introduced. It allows to change the options for a current connection. At the moment it offers a "--format text|json" argument to change the output format. * For example, when 'ovs-appctl --format json ...' is called, then ovs-appctl will call "set-options" before running the actual command in order to set the output format to JSON. * Both ovs-appctl as well as ovs-vswitchd are still compatible to older servers/clients. Of course, JSON output is only supported with a new client and a new server.
[0] https://patchwork.ozlabs.org/project/openvswitch/list/?series=382459&archive=both&state=* [1] https://patchwork.ozlabs.org/project/openvswitch/patch/[email protected]/#3240747 Thanks to Ilya for the idea to simply do two command calls👍☺️ Jakob Meng (6): Add global option for JSON output to ovs-appctl. python: Add global option for JSON output to Python tools. Migrate commands to extended unixctl API. ofproto: Add JSON output for 'dpif/show' command. appctl: Add option '--pretty' for pretty-printing JSON output. appctl: Add tests for unsupported output formats. NEWS | 7 ++ lib/bfd.c | 16 ++- lib/cfm.c | 13 ++- lib/command-line.c | 36 +++++++ lib/command-line.h | 10 ++ lib/coverage.c | 11 +- lib/dpctl.c | 127 +++++++++++++--------- lib/dpctl.h | 4 + lib/dpdk.c | 15 +-- lib/dpif-netdev-perf.c | 1 + lib/dpif-netdev-perf.h | 1 + lib/dpif-netdev.c | 84 +++++++++------ lib/dpif-netlink.c | 6 +- lib/lacp.c | 7 +- lib/memory.c | 5 +- lib/netdev-dpdk.c | 16 ++- lib/netdev-dummy.c | 30 ++++-- lib/netdev-native-tnl.c | 4 +- lib/netdev-native-tnl.h | 4 +- lib/netdev-vport.c | 1 + lib/odp-execute.c | 10 +- lib/ovs-lldp.c | 16 +-- lib/ovs-router.c | 26 +++-- lib/rstp.c | 22 ++-- lib/stopwatch.c | 10 +- lib/stp.c | 20 ++-- lib/timeval.c | 13 ++- lib/tnl-neigh-cache.c | 35 +++--- lib/tnl-ports.c | 6 +- lib/unixctl.c | 133 +++++++++++++++++------ lib/unixctl.h | 11 +- lib/vlog.c | 46 +++++--- ofproto/bond.c | 32 ++++-- ofproto/ofproto-dpif-trace.c | 10 +- ofproto/ofproto-dpif-upcall.c | 81 ++++++++++---- ofproto/ofproto-dpif.c | 187 ++++++++++++++++++++++++++++----- ofproto/ofproto.c | 10 +- ofproto/tunnel.c | 4 +- ovsdb/file.c | 4 +- ovsdb/ovsdb-client.c | 40 ++++--- ovsdb/ovsdb-server.c | 129 +++++++++++++++++------ ovsdb/ovsdb.c | 4 +- ovsdb/raft.c | 28 +++-- python/ovs/unixctl/__init__.py | 19 ++-- python/ovs/unixctl/server.py | 37 ++++++- python/ovs/util.py | 8 ++ python/ovs/vlog.py | 12 ++- tests/appctl.py | 17 +++ tests/pmd.at | 33 ++++++ tests/test-netflow.c | 4 +- tests/test-sflow.c | 4 +- tests/test-unixctl.c | 33 ++++-- tests/test-unixctl.py | 25 +++-- tests/unixctl-py.at | 8 ++ utilities/ovs-appctl.c | 117 ++++++++++++++++++--- utilities/ovs-dpctl.c | 1 + utilities/ovs-ofctl.c | 43 +++++--- vswitchd/bridge.c | 25 +++-- vswitchd/ovs-vswitchd.c | 5 +- 59 files changed, 1231 insertions(+), 435 deletions(-) -- 2.39.2 _______________________________________________ dev mailing list [email protected] https://mail.openvswitch.org/mailman/listinfo/ovs-dev
