checkpoint: allow resetting the rollback timeout via D-Bus

System Internals / NetworkManager - Thomas Haller [redhat.com] - 4 April 2018 12:02 EDT

This allows to adjust the timeout of an existing checkpoint.

The main usecase of checkpoints, is to have a fail-safe when configuring the network remotely. By allowing to reset the timeout, the user can perform a series of actions, and keep bumping the timeout. That way, the entire series is still guarded by the same checkpoint, but the user can start with short timeout, and re-adjust the timeout as he goes along.

The libnm API only implements the async form (at least for now). Sync methods are fundamentally wrong with D-Bus, and it's probably not needed. Also, follow glib convenction, where the async form doesn't have the _async name suffix. Also, accept a D-Bus path as argument, not a NMCheckpoint instance. The libnm API should not be more restricted than the underlying D-Bus API. It would be cumbersome to require the user to lookup the NMCheckpoint instance first, especially since libnm doesn't provide an efficient or convenient lookup-by-path method. On the other hand, retrieving the path from a NMCheckpoint instance is always possible.

f67303221 checkpoint: allow resetting the rollback timeout via D-Bus
introspection/org.freedesktop.NetworkManager.xml | 21 ++++++
libnm/libnm.ver | 2 +
libnm/nm-client.c | 82 ++++++++++++++++++++++++
libnm/nm-client.h | 13 ++++
libnm/nm-manager.c | 60 +++++++++++++++++
libnm/nm-manager.h | 9 +++
src/nm-audit-manager.h | 1 +
src/nm-checkpoint-manager.c | 20 ++++++
src/nm-checkpoint-manager.h | 5 ++
src/nm-checkpoint.c | 38 ++++++++++-
src/nm-checkpoint.h | 2 +
src/nm-manager.c | 54 +++++++++++++++-
12 files changed, 303 insertions(+), 4 deletions(-)

Upstream: cgit.freedesktop.org


  • Share