2010/4/29 Nguyen Canh Toan <[email protected]> > Hi all, > > > > After reading DBus API > http://projects.gnome.org/NetworkManager/developers/spec-07.html#org.freedesktop.NetworkManager > > I try to list all connection setting by below interface specification > > * * > > *org.freedesktop.NetworkManagerSettings* > > The NetworkManagerSettings interface is provided by the service which > provides connections to NetworkManager. > > Methods: > > ListConnections ( ) → ao > > List the connections stored by this Settings object. > > Returns > > > > connections - ao > > List of connections. > > > > Signals: > > NewConnection ( o: connection ) > > Emitted when a new connection has been configured. > > Parameters > > > > connection - o > > Object path of the new connection. > > > > Interface has no properties. > > > > > > *Without success. *DBus service say: > > > > Traceback (most recent call last): > > File "./python_dbus_client", line 21, in <module> > > connections = manager.ListConnections() > > File "/var/lib/python-support/python2.6/dbus/proxies.py", line 140, in > __call__ > > **keywords) > > File "/var/lib/python-support/python2.6/dbus/connection.py", line 622, in > call_blocking > > message, timeout) > > *dbus.exceptions.DBusException: org.freedesktop.DBus.Error.UnknownMethod: > Method "ListConnections" with signature "" on interface > "org.freedesktop.NetworkManager" doesn't exist* >
That's because ListConnections is a method of the "org.freedesktop.NetworkManagerSettings" interface ;) Try executing your method as: connections = manager.ListConnections(dbus_interface=" org.freedesktop.NetworkManagerSettings") Best regards, -- Pablo Martí // http://minimoesfuerzo.org python -c "print '706d617267616d40676d61696c2e636f6d'.decode('hex')"
_______________________________________________ networkmanager-list mailing list [email protected] http://mail.gnome.org/mailman/listinfo/networkmanager-list
