~cyphermox/ubuntu/natty/connman/release-0.64

« back to all changes in this revision

Viewing changes to test/monitor-services

  • Committer: Mathieu Trudel-Lapierre
  • Date: 2010-11-30 15:51:10 UTC
  • mfrom: (1.1.13 upstream)
  • Revision ID: mathieu.trudel-lapierre@canonical.com-20101130155110-32g0usyc4jbl131x
New upstream release 0.64.

Show diffs side-by-side

added added

removed removed

Lines of Context:
9
9
        val = "{"
10
10
        for key in values.keys():
11
11
                val += " " + key + "="
12
 
                val += str(values[key])
 
12
                if key in ["Servers", "Excludes"]:
 
13
                        val += extract_list(values[key])
 
14
                else:
 
15
                        val += str(values[key])
13
16
        val += " }"
14
17
        return val
15
18
 
22
25
 
23
26
def property_changed(name, value, path):
24
27
        service = path[path.rfind("/") + 1:]
25
 
        if name in ["Profiles", "Services", "Providers", "Technologies",
26
 
                                                "Devices", "Networks"]:
 
28
        if name in ["Profiles", "Services", "Technologies"]:
27
29
                val = "["
28
30
                for i in value:
29
31
                        val = val + " " + i[i.rfind("/") + 1:]
30
32
                val = val + " ]"
31
 
        elif name in ["IPv4", "IPv4.Configuration", "Proxy", "Ethernet"]:
 
33
        elif name in ["IPv4", "IPv4.Configuration",
 
34
                        "IPv6", "IPv6.Configuration",
 
35
                        "Proxy", "Proxy.Configuration", "Ethernet"]:
32
36
                val = extract_values(value)
33
37
        elif name in ["Nameservers", "Nameservers.Configuration",
34
38
                                        "Domains", "Domains.Configuration"]:
45
49
        bus = dbus.SystemBus()
46
50
 
47
51
        bus.add_signal_receiver(property_changed,
48
 
                                bus_name="org.moblin.connman",
49
 
                                dbus_interface="org.moblin.connman.Service",
 
52
                                bus_name="net.connman",
 
53
                                dbus_interface="net.connman.Service",
50
54
                                signal_name = "PropertyChanged",
51
55
                                path_keyword="path")
52
56