test: Update service monitoring script
authorMarcel Holtmann <marcel@holtmann.org>
Sun, 29 Apr 2012 23:31:24 +0000 (01:31 +0200)
committerMarcel Holtmann <marcel@holtmann.org>
Sun, 29 Apr 2012 23:31:24 +0000 (01:31 +0200)
test/monitor-services

index c1b4ced..015dbd1 100755 (executable)
@@ -25,14 +25,14 @@ def extract_list(list):
 
 def property_changed(name, value, path):
        service = path[path.rfind("/") + 1:]
-       if name in ["Profiles", "Services", "Technologies"]:
+       if name in ["Services"]:
                val = "["
                for i in value:
                        val = val + " " + i[i.rfind("/") + 1:]
                val = val + " ]"
        elif name in ["IPv4", "IPv4.Configuration",
                        "IPv6", "IPv6.Configuration",
-                       "Proxy", "Proxy.Configuration", "Ethernet"]:
+                       "Proxy", "Proxy.Configuration", "Ethernet", "Provider"]:
                val = extract_values(value)
        elif name in ["Nameservers", "Nameservers.Configuration",
                        "Domains", "Domains.Configuration",
@@ -65,6 +65,12 @@ if __name__ == '__main__':
                                signal_name="PropertyChanged",
                                path_keyword="path")
 
+       bus.add_signal_receiver(property_changed,
+                               bus_name="net.connman",
+                               dbus_interface="net.connman.Manager",
+                               signal_name="PropertyChanged",
+                               path_keyword="path")
+
        bus.add_signal_receiver(services_changed,
                                bus_name="net.connman",
                                dbus_interface="net.connman.Manager",