summaryrefslogtreecommitdiff
path: root/introspection
diff options
context:
space:
mode:
authorBeniamino Galvani <bgalvani@redhat.com>2016-07-01 12:11:01 +0200
committerBeniamino Galvani <bgalvani@redhat.com>2016-08-17 14:55:34 +0200
commit3e09aed2a09fab11f66b8228e48dc8f732c65cce (patch)
tree5d9fbc37fe5025b36e0cdf81cba44c15c0e79bdb /introspection
parentb9e89c918f13374772a72cefbe0cda6bb6bc88e4 (diff)
downloadNetworkManager-3e09aed2a09fab11f66b8228e48dc8f732c65cce.tar.gz
checkpoint: add create, rollback and destroy D-Bus API
Co-authored-by: Thomas Haller <thaller@redhat.com>
Diffstat (limited to 'introspection')
-rw-r--r--introspection/Makefile.am4
-rw-r--r--introspection/nm-checkpoint.xml42
-rw-r--r--introspection/nm-manager.xml41
3 files changed, 87 insertions, 0 deletions
diff --git a/introspection/Makefile.am b/introspection/Makefile.am
index 3a627930b9..d4762637a0 100644
--- a/introspection/Makefile.am
+++ b/introspection/Makefile.am
@@ -17,6 +17,8 @@ nodist_libnmdbus_la_SOURCES = \
nmdbus-active-connection.h \
nmdbus-agent-manager.c \
nmdbus-agent-manager.h \
+ nmdbus-checkpoint.c \
+ nmdbus-checkpoint.h \
nmdbus-device-adsl.c \
nmdbus-device-adsl.h \
nmdbus-device-bond.c \
@@ -81,6 +83,7 @@ nodist_libnmdbus_la_SOURCES = \
DBUS_INTERFACE_DOCS = \
nmdbus-access-point-org.freedesktop.NetworkManager.AccessPoint.xml \
nmdbus-active-connection-org.freedesktop.NetworkManager.Connection.Active.xml \
+ nmdbus-checkpoint-org.freedesktop.NetworkManager.Checkpoint.xml \
nmdbus-device-team-org.freedesktop.NetworkManager.Device.Team.xml \
nmdbus-dhcp6-config-org.freedesktop.NetworkManager.DHCP6Config.xml \
nmdbus-device-wifi-org.freedesktop.NetworkManager.Device.Wireless.xml \
@@ -139,6 +142,7 @@ EXTRA_DIST = \
nm-access-point.xml \
nm-active-connection.xml \
nm-agent-manager.xml \
+ nm-checkpoint.xml \
nm-device-adsl.xml \
nm-device-bond.xml \
nm-device-bridge.xml \
diff --git a/introspection/nm-checkpoint.xml b/introspection/nm-checkpoint.xml
new file mode 100644
index 0000000000..d0fbda8dec
--- /dev/null
+++ b/introspection/nm-checkpoint.xml
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<node name="/">
+
+ <!--
+ org.freedesktop.NetworkManager.Checkpoint:
+
+ A snapshot of NetworkManager state for a given device list
+ -->
+ <interface name="org.freedesktop.NetworkManager.Checkpoint">
+ <annotation name="org.gtk.GDBus.C.Name" value="Checkpoint"/>
+
+ <!--
+ Devices:
+
+ Array of object paths for devices which are part of this
+ checkpoint.
+ -->
+ <property name="Devices" type="ao" access="read"/>
+
+ <!--
+ Created:
+
+ The timestamp (in CLOCK_BOOTTIME milliseconds) of checkpoint creation.
+ -->
+ <property name="Created" type="x" access="read"/>
+
+ <!--
+ RollbackTimeout:
+
+ Timeout in seconds for automatic rollback, or zero.
+ -->
+ <property name="RollbackTimeout" type="u" access="read"/>
+
+ <!--
+ PropertiesChanged:
+ @properties: A dictionary mapping property names to variant boxed values
+ -->
+ <signal name="PropertiesChanged">
+ <arg name="properties" type="a{sv}"/>
+ </signal>
+ </interface>
+</node>
diff --git a/introspection/nm-manager.xml b/introspection/nm-manager.xml
index ea368ba331..95cc16cabe 100644
--- a/introspection/nm-manager.xml
+++ b/introspection/nm-manager.xml
@@ -206,6 +206,47 @@
</method>
<!--
+ CheckpointCreate:
+
+ @devices: a list of device paths for which a checkpoint should be created. An empty list means all managed devices.
+ @rollback_timeout: the time in seconds until NetworkManager will automatically rollback to the checkpoint. Set to zero for infinite.
+ @flags: optional flags that influence the creation.
+ @checkpoint: on success, returns the path of the checkpoint.
+
+ Create a checkpoint of the current networking configuration
+ for given interfaces. If @rollback_timeout is not zero, a
+ rollback is automatically performed after the given timeout.
+ -->
+ <method name="CheckpointCreate">
+ <arg name="devices" type="ao" direction="in"/>
+ <arg name="rollback_timeout" type="u" direction="in"/>
+ <arg name="flags" type="u" direction="in"/>
+ <arg name="checkpoint" type="o" direction="out"/>
+ </method>
+
+ <!--
+ CheckpointDestroy:
+ @checkpoint: the checkpoint to be destroyed. Set to empty to cancel all pending checkpoints.
+
+ Destroy a previously created checkpoint.
+ -->
+ <method name="CheckpointDestroy">
+ <arg name="checkpoint" type="o" direction="in"/>
+ </method>
+
+ <!--
+ CheckpointRollback:
+ @checkpoint: the checkpoint to be rolled back.
+ @result: on return, a dictionary of devices and results. Devices are represented by their original D-Bus path; each result is a <link linkend="NMRollbackResult">RollbackResult</link>.
+
+ Rollback a checkpoint before the timeout is reached.
+ -->
+ <method name="CheckpointRollback">
+ <arg name="checkpoint" type="o" direction="in"/>
+ <arg name="result" type="a{su}" direction="out" />
+ </method>
+
+ <!--
Devices:
The list of realized network devices. Realized devices are those which