---
test/list-providers | 63 -------------------------------------------------
test/monitor-manager | 2 +-
test/monitor-services | 2 +-
test/test-manager | 12 ++-------
4 files changed, 5 insertions(+), 74 deletions(-)
delete mode 100755 test/list-providers
diff --git a/test/list-providers b/test/list-providers
deleted file mode 100755
index 8497685..0000000
--- a/test/list-providers
+++ /dev/null
@@ -1,63 +0,0 @@
-#!/usr/bin/python
-
-import dbus
-
-def extract_values(values):
- val = "{"
- for key in values.keys():
- val += " " + key + "="
- if key in ["PrefixLength"]:
- val += "%s" % (int(values[key]))
- else:
- if key in ["Servers", "Excludes"]:
- val += extract_list(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", "/"),
- "org.moblin.connman.Manager")
-
-properties = manager.GetProperties()
-
-for path in properties["Providers"]:
- service = dbus.Interface(bus.get_object("org.moblin.connman", path),
- "org.moblin.connman.Service")
-
- properties = service.GetProperties()
-
- print "[ %s ]" % (path)
-
- for key in properties.keys():
- if key in ["IPv4", "IPv4.Configuration",
- "IPv6", "IPv6.Configuration",
- "Proxy", "Proxy.Configuration",
- "Ethernet", "Provider"]:
- val = extract_values(properties[key])
- elif key in ["Nameservers", "Nameservers.Configuration",
- "Domains", "Domains.Configuration"]:
- val = extract_list(properties[key])
- elif key in ["Favorite", "Immutable", "AutoConnect",
- "LoginRequired", "SetupRequired",
- "PassphraseRequired"]:
- if properties[key] == dbus.Boolean(1):
- val = "true"
- else:
- val = "false"
- elif key in ["Strength"]:
- val = int(properties[key])
- else:
- val = properties[key]
- print " %s = %s" % (key, val)
-
- print
diff --git a/test/monitor-manager b/test/monitor-manager
index f9fe26a..ebb53f7 100755
--- a/test/monitor-manager
+++ b/test/monitor-manager
@@ -6,7 +6,7 @@ import dbus
import dbus.mainloop.glib
def property_changed(name, value):
- if name in ["Profiles", "Services", "Providers", "Technologies"]:
+ if name in ["Profiles", "Services", "Technologies"]:
val = "["
for i in value:
val = val + " " + i[i.rfind("/") + 1:]
diff --git a/test/monitor-services b/test/monitor-services
index 235adfe..2f81c71 100755
--- a/test/monitor-services
+++ b/test/monitor-services
@@ -25,7 +25,7 @@ def extract_list(list):
def property_changed(name, value, path):
service = path[path.rfind("/") + 1:]
- if name in ["Profiles", "Services", "Providers", "Technologies"]:
+ if name in ["Profiles", "Services", "Technologies"]:
val = "["
for i in value:
val = val + " " + i[i.rfind("/") + 1:]
diff --git a/test/test-manager b/test/test-manager
index 2a80b75..6c694a0 100755
--- a/test/test-manager
+++ b/test/test-manager
@@ -33,7 +33,7 @@ properties = manager.GetProperties()
def print_properties(key, value):
if key == "Profiles":
interface = "org.moblin.connman.Profile"
- elif key in ["Services", "Providers"]:
+ elif key == "Services":
interface = "org.moblin.connman.Service"
elif key == "Technologies":
interface = "org.moblin.connman.Technology"
@@ -49,7 +49,7 @@ def print_properties(key, value):
properties = obj.GetProperties()
for key in properties.keys():
- if key in ["Services", "Providers", "Technologies"]:
+ if key in ["Services", "Technologies"]:
continue
elif key in ["Powered", "Scanning", "Connected",
@@ -85,16 +85,10 @@ def print_properties(key, value):
val = str(path)
list = list + val[val.rfind("/") + 1:] + " "
print " Services = [ %s]" % (list)
- if "Providers" in properties.keys():
- list = ""
- for path in properties["Providers"]:
- val = str(path)
- list = list + val[val.rfind("/") + 1:] + " "
- print " Providers = [ %s]" % (list)
for key in properties.keys():
- if key in ["Profiles", "Services", "Providers", "Technologies"]:
+ if key in ["Profiles", "Services", "Technologies"]:
print_properties(key, properties[key])
elif key in ["AvailableTechnologies", "EnabledTechnologies",
"ConnectedTechnologies",
--
1.7.3.2
_______________________________________________
connman mailing list
[email protected]
http://lists.connman.net/listinfo/connman