mirror of git://git.sysmocom.de/ofono
test: update list-contexts to the new API
This commit is contained in:
parent
c6bdb48420
commit
cc8ade1b1f
|
@ -17,20 +17,15 @@ for path in properties["Modems"]:
|
||||||
|
|
||||||
print "[ %s ]" % (path)
|
print "[ %s ]" % (path)
|
||||||
|
|
||||||
if "org.ofono.DataConnectionManager" not in properties["Interfaces"]:
|
if "org.ofono.ConnectionManager" not in properties["Interfaces"]:
|
||||||
continue
|
continue
|
||||||
|
|
||||||
connmgr = dbus.Interface(bus.get_object('org.ofono', path),
|
connman = dbus.Interface(bus.get_object('org.ofono', path),
|
||||||
'org.ofono.DataConnectionManager')
|
'org.ofono.ConnectionManager')
|
||||||
|
|
||||||
properties = connmgr.GetProperties()
|
contexts = connman.GetContexts()
|
||||||
|
|
||||||
for path in properties["PrimaryContexts"]:
|
|
||||||
context = dbus.Interface(bus.get_object('org.ofono', path),
|
|
||||||
'org.ofono.PrimaryDataContext')
|
|
||||||
|
|
||||||
properties = context.GetProperties()
|
|
||||||
|
|
||||||
|
for path, properties in contexts:
|
||||||
print " [ %s ]" % (path)
|
print " [ %s ]" % (path)
|
||||||
|
|
||||||
for key in properties.keys():
|
for key in properties.keys():
|
||||||
|
@ -47,5 +42,5 @@ for path in properties["Modems"]:
|
||||||
else:
|
else:
|
||||||
val = str(properties[key])
|
val = str(properties[key])
|
||||||
print " %s = %s" % (key, val)
|
print " %s = %s" % (key, val)
|
||||||
|
|
||||||
print
|
print
|
||||||
|
|
Loading…
Reference in New Issue