Add script for testing manager interface
authorMarcel Holtmann <marcel@holtmann.org>
Wed, 19 Nov 2008 09:22:05 +0000 (10:22 +0100)
committerMarcel Holtmann <marcel@holtmann.org>
Wed, 19 Nov 2008 09:22:05 +0000 (10:22 +0100)
test/test-manager [new file with mode: 0755]

diff --git a/test/test-manager b/test/test-manager
new file mode 100755 (executable)
index 0000000..d06391f
--- /dev/null
@@ -0,0 +1,22 @@
+#!/usr/bin/python
+
+import dbus
+
+bus = dbus.SystemBus()
+
+manager = dbus.Interface(bus.get_object("org.moblin.connman", "/"),
+                                       "org.moblin.connman.Manager")
+
+properties = manager.GetProperties()
+
+def print_list(key, value):
+       text = ""
+       for path in value:
+               text = text + str(path)
+       print "%s = %s" % (key, text)
+
+for key in properties.keys():
+       if (key in ["Profiles", "Devices", "Connections"]):
+               print_list(key, properties[key])
+       else:
+               print "%s = %s" % (key, properties[key])