blob: 710a36c280a090c8e210a8f6925fe2cc7f0b7454 [file] [log] [blame]
#!/usr/bin/python
import dbus
bus = dbus.SystemBus()
manager = dbus.Interface(bus.get_object("org.moblin.connman", "/"),
"org.moblin.connman.Manager")
properties = manager.GetProperties()
active = properties["ActiveProfile"]
for path in properties["Profiles"]:
if (active == path):
print "[ %s ] <== active" % (path)
else:
print "[ %s ]" % (path)
profile = dbus.Interface(bus.get_object("org.moblin.connman", path),
"org.moblin.connman.Profile")
properties = profile.GetProperties()
for key in properties.keys():
if key in ["Services"]:
list = ""
for path in properties["Services"]:
val = str(path)
list = list + val[val.rfind("/") + 1:] + " "
print " Services = [ %s]" % (list)
else:
print " %s = %s" % (key, properties[key])
print