NetworkManager/tools
Thomas Haller fbb038af5e all: return output dictionary from "AddAndActivate2"
Add a "a{sv}" output argument to "AddAndActivate2" D-Bus API.
"AddAndActivate2" replaces "AddAndActivate" with more options.
It also has a dictionary argument to be forward compatible so that we
hopefully won't need an "AddAndActivate3". However, it lacked a similar
output dictionary. Add it for future extensibility. I think this is
really to workaround a shortcoming of D-Bus, which does provide strong
typing and type information about its API, but does not allow to extend
an existing API in a backward compatible manner. So we either resort to
Method(), Method2(), Method3() variants, or a catch-all variant with a
generic "a{sv}" input/output argument.

In libnm, rename "nm_client_add_and_activate_connection_options()" to
"nm_client_add_and_activate_connection2()". I think libnm API should have
an obvious correspondence with D-Bus API. Or stated differently, if
"AddAndActivateOptions" would be a better name, then the D-Bus API should
be renamed. We should prefer one name over the other, but regardless
of which is preferred, the naming for D-Bus and libnm API should
correspond.

In this case, I do think that AddAndActivate2() is a better name than
AddAndActivateOptions(). Hence I rename the libnm API.

Also, unless necessary, let libnm still call "AddAndActivate" instead of
"AddAndActivate2". Our backward compatibility works the way that libnm
requires a server version at least as new as itself. As such, libnm
theoretically could assume that server version is new enough to support
"AddAndActivate2" and could always use the more powerful variant.
However, we don't need to break compatibility intentionally and for
little gain. Here, it's easy to let libnm also handle old server API, by
continuing to use "AddAndActivate" for nm_client_add_and_activate_connection().
Note that during package update, we don't restart the currently running
NetworkManager instance. In such a scenario, it can easily happen that
nmcli/libnm is newer than the server version. Let's try a bit harder
to not break that.

Changes as discussed in [1].

[1] https://gitlab.freedesktop.org/NetworkManager/NetworkManager/merge_requests/37#note_79876
2019-01-14 11:56:18 +01:00
..
check-config-options.sh core: add checks on connection default properties 2018-12-01 15:16:48 +01:00
check-docs.sh build: fix check-docs.sh for out-of-tree builds 2018-10-25 11:08:39 +02:00
check-exports.sh tools/check-exports.sh: use ${NM} when available 2015-09-24 16:28:15 +02:00
check-settings-docs.sh meson: add check on settings docs 2018-12-12 14:38:18 +01:00
create-exports-NetworkManager.sh build: fix ibft option in create-exports-NetworkManager.sh 2018-10-24 22:10:31 +02:00
debug-helper.py python: make dbus, gi examples, and debug-helper.py python3 ready 2017-12-04 11:21:40 +01:00
enums-to-docbook.pl docs: fix handling enums without explicit numeric value in "tools/enums-to-docbook.pl" 2017-01-04 09:33:50 +01:00
meson-post-install.sh build: meson: fix wrong man page link 2018-11-08 10:21:58 +01:00
run-nm-test.sh acd/tests: skip NAcd tests under valgrind 2018-10-04 10:58:50 +02:00
test-build.sh tools: add test script to build various configurations 2016-11-24 15:59:27 +01:00
test-networkmanager-service.py all: return output dictionary from "AddAndActivate2" 2019-01-14 11:56:18 +01:00
test-sudo-wrapper.sh nmtst: add nmtst_reexec_sudo() function 2014-06-05 18:12:57 +02:00