summaryrefslogtreecommitdiff
path: root/test/test-manager
diff options
context:
space:
mode:
authorPatrik Flykt <patrik.flykt@linux.intel.com>2012-01-18 15:06:27 +0200
committerSamuel Ortiz <sameo@linux.intel.com>2012-01-20 01:50:20 +0100
commit85329d2736c063f85eecc8f5fbcad723991ce21f (patch)
tree4f883e290e872c1addff558ef6aed9080808673a /test/test-manager
parent0a2d884684c4201219c4cc1e96ad9918eb1a9ecf (diff)
downloadconnman-85329d2736c063f85eecc8f5fbcad723991ce21f.tar.gz
connman-85329d2736c063f85eecc8f5fbcad723991ce21f.tar.bz2
connman-85329d2736c063f85eecc8f5fbcad723991ce21f.zip
test-manager: Update test-manager with Technology changes
test-manager now gets the full set of technology paths and properties from Manager GetTechnologies() D-Bus method call. Fixes BMC#24637
Diffstat (limited to 'test/test-manager')
-rwxr-xr-xtest/test-manager44
1 files changed, 23 insertions, 21 deletions
diff --git a/test/test-manager b/test/test-manager
index 8bbcd7f6..b46a1740 100755
--- a/test/test-manager
+++ b/test/test-manager
@@ -35,8 +35,6 @@ def print_properties(key, value):
interface = "net.connman.Profile"
elif key == "Services":
interface = "net.connman.Service"
- elif key == "Technologies":
- interface = "net.connman.Technology"
else:
return
@@ -49,11 +47,10 @@ def print_properties(key, value):
properties = obj.GetProperties()
for key in properties.keys():
- if key in ["Services", "Technologies"]:
+ if key in ["Services"]:
continue
- elif key in ["Powered", "Scanning", "Connected",
- "Available", "Remember", "Default",
+ elif key in ["Available", "Remember", "Default",
"Favorite", "Immutable", "AutoConnect",
"LoginRequired",
"PassphraseRequired"]:
@@ -76,11 +73,6 @@ def print_properties(key, value):
elif key in ["Strength", "Priority"]:
val = int(properties[key])
- elif key in ["Tethering"]:
- if properties[key] == dbus.Boolean(1):
- val = "true"
- else:
- val = "false"
else:
val = str(properties[key])
@@ -95,28 +87,38 @@ def print_properties(key, value):
for key in properties.keys():
- if key in ["Profiles", "Services", "Technologies"]:
+ if key in ["Profiles", "Services"]:
print_properties(key, properties[key])
- elif key in ["AvailableTechnologies", "EnabledTechnologies",
- "ConnectedTechnologies",
- "AvailableDebugs", "EnabledDebugs"]:
+ elif key in ["AvailableDebugs", "EnabledDebugs"]:
print "%s" % (key)
list = ""
for val in properties[key]:
list = list + val + " "
print " [ %s]" % (list)
- elif key in ["OfflineMode", "Tethering"]:
+ elif key in ["OfflineMode"]:
print "%s" % (key)
if properties[key] == dbus.Boolean(1):
print " true"
else:
print " false"
- elif key in ["DefaultTechnology"]:
- print "%s" % (key)
- if properties[key] == "":
- print " <none>"
- else:
- print " %s" % (properties[key])
else:
print "%s" % (key)
print " %s" % (properties[key])
+
+
+print ("Technologies")
+technologies = manager.GetTechnologies()
+
+for (path, properties) in technologies:
+ print " %s" % (path)
+ for key in properties.keys():
+
+ if key in ["Connected", "Powered", "Tethering"]:
+ if properties[key] == dbus.Boolean(1):
+ val = "true"
+ else:
+ val = "false"
+ else:
+ val = properties[key]
+
+ print " %s = %s" % (key, val)