From f67303221bdc8098cb3b6203ec777b294e412971 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Wed, 28 Mar 2018 08:09:56 +0200 Subject: [PATCH] checkpoint: allow resetting the rollback timeout via D-Bus 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. --- .../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(-) diff --git a/introspection/org.freedesktop.NetworkManager.xml b/introspection/org.freedesktop.NetworkManager.xml index 26a618c1bf..b8ad5911f2 100644 --- a/introspection/org.freedesktop.NetworkManager.xml +++ b/introspection/org.freedesktop.NetworkManager.xml @@ -251,6 +251,27 @@ + + + + + +