summaryrefslogtreecommitdiff
path: root/introspection
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2017-12-01 12:56:09 +0100
committerThomas Haller <thaller@redhat.com>2017-12-05 20:18:10 +0100
commit35dc6421de78cffd1761cfb6edf9e94233f99966 (patch)
treeb2d8c5946633f9da0cc2ef37326fc9208d8c4fe4 /introspection
parentcfced599cab19bb929494f6f38712e3b08ce3d55 (diff)
downloadNetworkManager-35dc6421de78cffd1761cfb6edf9e94233f99966.tar.gz
settings: support setting a connection as volatile via Update2()th/user-block-autoconnect-rh1401515
Extend the Update2 flags to allow marking a connection as volatile. Making a connection as volatile means that the connection stays alive as long as an active connection references it. It is correct that Update2() returns before the connection is actually deleted. It might take an arbitrary long time until the volatile mechanism cleans up the connection. Also add two more IN_MEMORY flags: "detached" and "only". The existing NM_SETTINGS_UPDATE2_FLAG_IN_MEMORY would not detach nor delete the possible file on disk. That is, the mode only changes what NM thinks is the current content of the connection profile. It would not delete the file on disk nor would it detach the profile in-memory from the file. As such, later persisting the connection again to disk would overwrite the file, and deleting the profile, would delete the file. Now add two new IN_MEMORY modes. NM_SETTINGS_UPDATE2_FLAG_IN_MEMORY_DETACH is like making the connection in-memory only, but forgetting that there might be any profile on disk. That means, a later Delete() would not delete the file. Similarly, a later Update2() that persists the connection again, would not overwrite the existing file on disk, instead it would choose a new file name. On the other hand, NM_SETTINGS_UPDATE2_FLAG_IN_MEMORY_ONLY would delete a potential file from disk right away. It's clear that "volatile" only makes sense with either "in-memory-detached" or "in-memory-only". That is, the file on disk should be deleted right away (before the in-memory part is garbage collected) or the file on disk should be forgotten.
Diffstat (limited to 'introspection')
-rw-r--r--introspection/org.freedesktop.NetworkManager.Settings.Connection.xml3
1 files changed, 3 insertions, 0 deletions
diff --git a/introspection/org.freedesktop.NetworkManager.Settings.Connection.xml b/introspection/org.freedesktop.NetworkManager.Settings.Connection.xml
index 9064ecaf39..ec596fd1e9 100644
--- a/introspection/org.freedesktop.NetworkManager.Settings.Connection.xml
+++ b/introspection/org.freedesktop.NetworkManager.Settings.Connection.xml
@@ -108,6 +108,9 @@
@flags: optional flags argument. Currently supported flags are:
"0x1" (to-disk),
"0x2" (in-memory),
+ "0x4" (in-memory-detached),
+ "0x8" (in-memory-only),
+ "0x10" (volatile),
"0x20" (block-autoconnect).
Unknown flags cause the call to fail.
@args: optional arguments dictionary, for extensibility. Currently no