summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2008-04-08 07:36:44 +0200
committerMarcel Holtmann <marcel@holtmann.org>2008-04-08 07:36:44 +0200
commit48dad19c8128b6da9666182520674f9b612a3e85 (patch)
treec8a1f0e705d1a593dd3c81a91a7e0e36174df96a /test
parent85752761aeb96f074968e84c7979f58c2a1010e0 (diff)
downloadconnman-48dad19c8128b6da9666182520674f9b612a3e85.tar.gz
connman-48dad19c8128b6da9666182520674f9b612a3e85.tar.bz2
connman-48dad19c8128b6da9666182520674f9b612a3e85.zip
Update scripts to handle new network methods
Diffstat (limited to 'test')
-rwxr-xr-xtest/list-interfaces10
-rwxr-xr-xtest/select-network10
2 files changed, 18 insertions, 2 deletions
diff --git a/test/list-interfaces b/test/list-interfaces
index 2cd0424d..5a1d28fa 100755
--- a/test/list-interfaces
+++ b/test/list-interfaces
@@ -23,4 +23,14 @@ for path in interfaces:
for key in ipv4.keys():
print " IPv4.%s = %s" % (key, ipv4[key])
+ networks = interface.ListNetworks()
+ for i in networks:
+ print " Network.Path = %s" % (i)
+
+ network = dbus.Interface(bus.get_object('org.freedesktop.connman', i),
+ 'org.freedesktop.connman.Network')
+
+ print " Network.Identifier = %s" % (network.GetIdentifier())
+ print " Network.Passphrase = %s" % (network.GetPassphrase())
+
print
diff --git a/test/select-network b/test/select-network
index 0d48ad30..e009d75b 100755
--- a/test/select-network
+++ b/test/select-network
@@ -18,8 +18,14 @@ for path in interfaces:
properties = interface.GetProperties()
if (properties["Type"] == "80211"):
- print " Selecting network"
- interface.SelectNetwork("ConnMan Testing")
+ networks = interface.ListNetworks()
+ for i in networks:
+ network = dbus.Interface(bus.get_object('org.freedesktop.connman', i),
+ 'org.freedesktop.connman.Network')
+
+ if (network.GetIdentifier() == "ConnMan Testing"):
+ print " Selecting network %s" % (i)
+ interface.SelectNetwork(i)
else:
print " No networks"