summaryrefslogtreecommitdiff
path: root/test/test-manager
diff options
context:
space:
mode:
authorSamuel Ortiz <sameo@linux.intel.com>2010-08-02 19:33:39 +0200
committerSamuel Ortiz <sameo@linux.intel.com>2010-08-02 19:33:39 +0200
commit11c127dac776955e4b31a4bf50f660169009a58e (patch)
tree978e294e85ffd87b2570f6376b893b0e3fd70435 /test/test-manager
parent92f2e80a211396981a276e170c958520a6636853 (diff)
downloadconnman-11c127dac776955e4b31a4bf50f660169009a58e.tar.gz
connman-11c127dac776955e4b31a4bf50f660169009a58e.tar.bz2
connman-11c127dac776955e4b31a4bf50f660169009a58e.zip
Fix test-manager
Diffstat (limited to 'test/test-manager')
-rwxr-xr-xtest/test-manager35
1 files changed, 33 insertions, 2 deletions
diff --git a/test/test-manager b/test/test-manager
index 92f70858..b5a2530c 100755
--- a/test/test-manager
+++ b/test/test-manager
@@ -2,6 +2,24 @@
import dbus
+def extract_values(values):
+ val = "{"
+ for key in values.keys():
+ val += " " + key + "="
+ if key in ["PrefixLength"]:
+ val += "%s" % (int(values[key]))
+ else:
+ val += str(values[key])
+ val += " }"
+ return val
+
+def extract_list(list):
+ val = "["
+ for i in list:
+ val += " " + str(i)
+ val += " ]"
+ return val
+
bus = dbus.SystemBus()
manager = dbus.Interface(bus.get_object("org.moblin.connman", "/"),
@@ -34,12 +52,25 @@ def print_properties(key, value):
"Providers", "Technologies"]:
continue
- if key in ["Powered", "Scanning", "Connected",
- "Available", "Remember", "Default"]:
+ elif key in ["Powered", "Scanning", "Connected",
+ "Available", "Remember", "Default",
+ "Favorite", "Immutable", "AutoConnect",
+ "LoginRequired", "SetupRequired",
+ "PassphraseRequired"]:
if properties[key] == dbus.Boolean(1):
val = "true"
else:
val = "false"
+
+ elif key in ["IPv4", "IPv4.Configuration",
+ "IPv6", "IPv6.Configuration",
+ "Proxy", "Ethernet", "Provider"]:
+ val = extract_values(properties[key])
+
+ elif key in ["Nameservers", "Nameservers.Configuration",
+ "Domains", "Domains.Configuration"]:
+ val = extract_list(properties[key])
+
elif key in ["Strength", "Priority"]:
val = int(properties[key])
else: