Help with NM DBus API
- From: David Rothlisberger <david rothlis net>
- To: networkmanager-list gnome org
- Subject: Help with NM DBus API
- Date: Mon, 18 Apr 2011 16:19:15 +0100
Hi,
I'm looking for some insight into how to use the NM DBus API. (I've
poked around a bit in the libnm-util and network-manager-applet
sources but my small brain is none the wiser.)
I have a single *system* connection (no user connections) and I want
to change the settings of this system connection.
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)? Which signals
should I register for, to know when the new settings have successfully
taken effect?
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?
Finally, any tips on tools for sending DBus messages? dbus-send
doesn't support nested containers (which are required by
Connection.Update()) and I haven't had much luck sending nested
container parameters with D-Feet either. Perhaps bindings to a
language like Python will be the way to go for quick exploration.
Many thanks,
David Röthlisberger
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]