From: Marcel Holtmann Date: Tue, 8 Apr 2008 05:36:44 +0000 (+0200) Subject: Update scripts to handle new network methods X-Git-Tag: 2.0_alpha~4853 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=48dad19c8128b6da9666182520674f9b612a3e85;p=framework%2Fconnectivity%2Fconnman.git Update scripts to handle new network methods --- diff --git a/test/list-interfaces b/test/list-interfaces index 2cd0424..5a1d28f 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 0d48ad3..e009d75 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"