Re: Retrieving 'secret' setting



On Wed, 2017-09-06 at 12:51 +0100, Colin Helliwell wrote:
On 06 September 2017 at 11:14 Thomas Haller <thaller redhat com>
wrote:

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.freedes
ktop.NetworkManager.Settings.Connection.html

Anyway, from libnm (and python gi) you would call

secrets = remote_connection.get_secrets('ethernet')


Great, got that. Now, don't suppose you could help me get to grips
with parsing the Glib.Variant....? ;)

Hi,

No, I never did that with python+gi.

I would read through /usr/share/gir-1.0/GLib-2.0.gir to see how the API
looks like. But that might not be the best approach.


Thomas

Attachment: signature.asc
Description: This is a digitally signed message part



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]