Commit Graph

11 Commits

Author SHA1 Message Date
Tomasz Kłoczko
20677c175d update DocBook DTD version to latest stable 4.5
Signed-off-by: Tomasz Kłoczko <kloczek@github.com>
2024-04-22 12:06:16 +00:00
Beniamino Galvani
cc5ebf265d dispatcher: read device-handler's stdout into a dictionary
Device handlers need a way to pass data back to NetworkManager, such
as the ifindex and an error message. Allow them to return a dictionary
on standard output, where each line contains a "$key=$value" pair.
In the daemon, the dictionary is returned via the callback function.

(cherry picked from commit d72f26b875)
2024-02-21 11:49:17 +01:00
Beniamino Galvani
9322c3e9db libnm: add generic.device-handler property
Add a new "generic.device-handler" property that specifies the name of
a dispatcher script to be invoked to add and delete the interface for
this connection.

(cherry picked from commit e686ab35b3)
2024-02-21 11:49:11 +01:00
Beniamino Galvani
5dea7f068b dispatcher: pass user setting properties in the environment
Properties in the "user" setting are a convenient way to associate any
kind of user-provided metadata to connections.

However, nmcli doesn't support the user setting at the moment and
adding this feature requires a significant effort. Without nmcli
support, dispatcher scripts can only access user properties by either
parsing connection files or by using D-Bus (with or without libnm and
GObject introspection). Since both these solutions are not very
convenient, provide an alternative way: pass the properties as
environment variables.

(cherry picked from commit d7c311eb85)
2024-02-21 11:49:11 +01:00
Beniamino Galvani
abf41bc282 man: improve NM-dispatcher man page 2023-10-06 13:27:59 +02:00
Beniamino Galvani
7a07a0b92d man: replace license blurb with SPDX tag 2023-10-06 13:27:59 +02:00
Gris Ge
a1db61ebc9 dispatch dns-change dispatcher event
Introducing new dispatcher event -- `dns-change` which will be emitted when
DNS configuration changed(even in `dns=none` mode). This is to solve two
use cases:
 * Invoke dispatch script for DNS changes triggered by the global DNS
   API.

 * Do not invoke [OpenShift resolv-prepender][1] for non-DNS changes.

Bug reference: https://issues.redhat.com/browse/RHEL-1671

[1]: https://github.com/openshift/machine-config-operator/blob/master/templates/common/on-prem/files/resolv-prepender.yaml

Signed-off-by: Gris Ge <fge@redhat.com>
2023-09-26 17:14:58 +08:00
Dylan Van Assche
e20eb72fe7
man: NetworkManager-dispatcher: document reapply action
NetworkManager dispatcher will now run dispatcher scripts with 'reapply'
as action as well. Each time the connection is reapplied on a device,
this action is triggered. Document this action in the documentation.

(cherry picked from commit 0e3d2c367c)
2023-02-08 20:51:07 +01:00
Thomas Haller
3876c99da8
man: fix letter case of values for CONNECTIVITY_STATE in NetworkManager-dispatcher
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/issues/1047
2022-07-22 11:51:20 +02:00
Thomas Haller
7a39f1f7e7
man: update URL for networkmanager.dev home page 2021-08-03 14:57:35 +02:00
Thomas Haller
9c0c0ac966
man: split NetworkManager-dispatcher(8) manual page out of NetworkManager(8)
https://gitlab.freedesktop.org/NetworkManager/NetworkManager/-/merge_requests/784
2021-03-16 17:01:53 +01:00