RE: Help with NM DBus API



> Just looking at the interfaces, it seems I need to call
> NetworkManagerSettings.ListConnections() on the
> NetworkManagerSystemSettings service (this is NM 0.7/0.8) to get the
> path of the connection object; and then call
> NetworkManagerSettings.Connection.Update( ... ) on this object, with
> the new settings. If this method call returns successfully (i.e. no
> error, as it has no out arguments), what does it mean -- that the
> connection is now active, or merely that the settings have been
> applied (potentially disconnecting the connection)?
This will just update your new settings for that connection. It won't make the connection active.

> Which signals
> should I register for, to know when the new settings have successfully
> taken effect?
org.freedesktop.NetworkManagerSettings.Connection.Updated

> My experiments sending some messages with D-Feet indicate that calling
> Update() on the System Connection isn't allowed ("Read-only
> connections may not be modified") -- or is this merely a configuration
> issue around DBus permissions?
You should have root permissions to modify the Network Manager System Settings.

> Perhaps bindings to a
> language like Python will be the way to go for quick exploration.
Yes, this would be a better option. See the samples.
http://cgit.freedesktop.org/NetworkManager/NetworkManager/tree/examples/python

::DISCLAIMER::
-----------------------------------------------------------------------------------------------------------------------

The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only.
It shall not attach any liability on the originator or HCL or its affiliates. Any views or opinions presented in
this email are solely those of the author and may not necessarily reflect the opinions of HCL or its affiliates.
Any form of reproduction, dissemination, copying, disclosure, modification, distribution and / or publication of
this message without the prior written consent of the author of this e-mail is strictly prohibited. If you have
received this email in error please delete it and notify the sender immediately. Before opening any mail and
attachments please check them for viruses and defect.

-----------------------------------------------------------------------------------------------------------------------


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