On Wed, 2017-09-06 at 10:20 +0100, colin helliwell ln-systems com wrote:
I'm python-scripting to get a connection's gsm properties, and want to get the password - which "c.for_each_setting_value(print_values, None)" seems to not report (just "None"). What would be the technique to get it? Thanks
Hi, on D-Bus, secrets are exposed separately from regular properties of the connection. GetSettings() vs GetSecrets() in https://developer.gnome.org/NetworkManager/stable/gdbus-org.freedesktop.NetworkManager.Settings.Connection.html Anyway, from libnm (and python gi) you would call secrets = remote_connection.get_secrets('ethernet') and possibly merge it with the connection that you have via clone = NM.SimpleConnection.new_clone(remote_connection) clone.update_secrets(None, secrets) I didn't test any of this, just looking at what nmcli does: https://cgit.freedesktop.org/NetworkManager/NetworkManager/tree/clients/cli/connections.c#n614 best, Thomas
Attachment:
signature.asc
Description: This is a digitally signed message part