test: Providers is no longer a manager property
authorGustavo F. Padovan <padovan@profusion.mobi>
Wed, 24 Nov 2010 18:21:39 +0000 (16:21 -0200)
committerSamuel Ortiz <sameo@linux.intel.com>
Thu, 25 Nov 2010 11:09:01 +0000 (12:09 +0100)
Makefile.am
test/list-providers [deleted file]
test/monitor-manager
test/monitor-services
test/test-manager

index cba6b9c..b4d4250 100644 (file)
@@ -182,10 +182,10 @@ test_scripts = test/get-state test/list-profiles test/list-services \
                test/set-address test/test-profile \
                test/simple-agent test/show-introspection test/test-compat \
                test/test-manager test/test-connman test/monitor-connman \
-               test/connect-vpn test/disconnect-vpn test/list-providers \
-               test/monitor-manager test/test-counter test/set-ip-method \
-               test/set-nameservers test/set-domains test/find-service \
-               test/get-services test/get-proxy-autoconfig test/set-proxy \
+               test/connect-vpn test/disconnect-vpn test/monitor-manager \
+               test/test-counter test/set-ip-method test/set-nameservers \
+               test/set-domains test/find-service test/get-services \
+               test/get-proxy-autoconfig test/set-proxy \
                test/enable-tethering test/disable-tethering test/backtrace
 
 if TEST
diff --git a/test/list-providers b/test/list-providers
deleted file mode 100755 (executable)
index 8497685..0000000
+++ /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
index f9fe26a..ebb53f7 100755 (executable)
@@ -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:]
index 235adfe..2f81c71 100755 (executable)
@@ -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:]
index 2a80b75..6c694a0 100755 (executable)
@@ -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",