5 def extract_values(values):
7 for key in values.keys():
9 if key in ["Servers", "Excludes"]:
10 val += extract_list(values[key])
12 val += str(values[key])
16 def extract_list(list):
23 bus = dbus.SystemBus()
25 manager = dbus.Interface(bus.get_object('net.connman', '/'),
26 'net.connman.Manager')
28 services = manager.GetServices()
30 for entry in services:
34 print "[ %s ]" % (path)
36 for key in properties.keys():
37 if key in ["IPv4", "IPv4.Configuration",
38 "IPv6", "IPv6.Configuration",
39 "Proxy", "Proxy.Configuration",
40 "Ethernet", "Provider"]:
41 val = extract_values(properties[key])
42 elif key in ["Nameservers", "Nameservers.Configuration",
43 "Domains", "Domains.Configuration",
45 val = extract_list(properties[key])
46 elif key in ["Favorite", "Immutable", "AutoConnect",
47 "PassphraseRequired"]:
48 if properties[key] == dbus.Boolean(1):
52 elif key in ["Strength"]:
53 val = int(properties[key])
55 val = str(properties[key])
56 print " %s = %s" % (key, val)