Re: Retrieving 'secret' setting

On 07 September 2017 at 16:37 Dan Williams <dcbw redhat com> wrote:

On Thu, 2017-09-07 at 09:31 +0100, Colin Helliwell wrote:

Thanks Dan, that gets it.
Now I'm struggling to *modify* the password.... :S I see that I can
do a
 settings.set_property(NM.SETTING_GSM_PASSWORD, "NewPw")
but unsure how to complete the updating. I found
NM.Connection.replace_settings(), and update_secrets(), but both of
those put me back into GVariant territory.
What would be the route to get the new password fed back through
(presumably prior to finishing with a

You're correct. Here's what I'd do:

client =
c =
secrets =

# this merges
the secrets into the existing connection

# write the full connection back to NM

Yep, that's working (subject to save vs. commit_changes)  - many thanks for the guidance.

Btw, it seems the password can be extracted simply by: 
   password = secrets['gsm']['password']

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