summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2008-11-23 15:16:21 +0100
committerMarcel Holtmann <marcel@holtmann.org>2008-11-23 15:16:21 +0100
commit5d5ab87764722fc33b10a331a9462c169a03bb6b (patch)
tree34f17ed5793f462f8cbfd7c0a61a6008b5426cc7 /test
parentca785efaf9500aada346a8155df568c44287a8e5 (diff)
downloadconnman-5d5ab87764722fc33b10a331a9462c169a03bb6b.tar.gz
connman-5d5ab87764722fc33b10a331a9462c169a03bb6b.tar.bz2
connman-5d5ab87764722fc33b10a331a9462c169a03bb6b.zip
Adapter test script to new network interface
Diffstat (limited to 'test')
-rwxr-xr-xtest/list-networks31
1 files changed, 18 insertions, 13 deletions
diff --git a/test/list-networks b/test/list-networks
index 11726a82..94e111c4 100755
--- a/test/list-networks
+++ b/test/list-networks
@@ -7,20 +7,25 @@ bus = dbus.SystemBus()
manager = dbus.Interface(bus.get_object("org.moblin.connman", "/"),
"org.moblin.connman.Manager")
-elements = manager.ListElements()
+properties = manager.GetProperties()
-for path in elements:
- element = dbus.Interface(bus.get_object("org.moblin.connman", path),
- "org.moblin.connman.Element")
+for path in properties["Devices"]:
+ device = dbus.Interface(bus.get_object("org.moblin.connman", path),
+ "org.moblin.connman.Device")
- properties = element.GetProperties()
+ properties = device.GetProperties()
- if (properties["Type"] == "device"):
- print "[ %s ]" % (path)
+ print "[ %s ]" % (path)
- if (properties["Type"] == "network"):
- if (properties["Enabled"] == 1):
- state = "*"
- else:
- state = " "
- print " %s %s" % (state, properties["WiFi.Name"])
+ for path in properties["Networks"]:
+ network = dbus.Interface(bus.get_object("org.moblin.connman", path),
+ "org.moblin.connman.Network")
+
+ properties = network.GetProperties()
+
+ print " [ %s ]" % (path)
+
+ for key in properties.keys():
+ print " %s = %s" % (key, properties[key])
+
+ print