Add test script for showing connection details
authorMarcel Holtmann <marcel@holtmann.org>
Sun, 23 Nov 2008 14:08:37 +0000 (15:08 +0100)
committerMarcel Holtmann <marcel@holtmann.org>
Sun, 23 Nov 2008 14:08:37 +0000 (15:08 +0100)
test/list-connections [new file with mode: 0755]

diff --git a/test/list-connections b/test/list-connections
new file mode 100755 (executable)
index 0000000..806490d
--- /dev/null
@@ -0,0 +1,23 @@
+#!/usr/bin/python
+
+import dbus
+
+bus = dbus.SystemBus()
+
+manager = dbus.Interface(bus.get_object("org.moblin.connman", "/"),
+                                       "org.moblin.connman.Manager")
+
+properties = manager.GetProperties()
+
+for path in properties["Connections"]:
+       connection = dbus.Interface(bus.get_object("org.moblin.connman", path),
+                                               "org.moblin.connman.Connection")
+
+       properties = connection.GetProperties()
+
+       print "[ %s ]" % (path)
+
+       for key in properties.keys():
+               print "    %s = %s" % (key, properties[key])
+
+       print