mirror of git://git.sysmocom.de/ofono
test: add deactivate-all
Uses ConnectionManager DeactivateAll
This commit is contained in:
parent
180f765ebe
commit
42dfbc450b
|
@ -409,7 +409,8 @@ test_scripts = test/backtrace \
|
||||||
test/unlock-pin \
|
test/unlock-pin \
|
||||||
test/enable-gprs \
|
test/enable-gprs \
|
||||||
test/disable-gprs \
|
test/disable-gprs \
|
||||||
test/get-icon
|
test/get-icon \
|
||||||
|
test/deactivate-all
|
||||||
|
|
||||||
if TEST
|
if TEST
|
||||||
testdir = $(pkglibdir)/test
|
testdir = $(pkglibdir)/test
|
||||||
|
|
|
@ -0,0 +1,20 @@
|
||||||
|
#!/usr/bin/python
|
||||||
|
|
||||||
|
import sys
|
||||||
|
import dbus
|
||||||
|
|
||||||
|
bus = dbus.SystemBus()
|
||||||
|
|
||||||
|
manager = dbus.Interface(bus.get_object('org.ofono', '/'),
|
||||||
|
'org.ofono.Manager')
|
||||||
|
|
||||||
|
modems = manager.GetModems()
|
||||||
|
|
||||||
|
for path, properties in modems:
|
||||||
|
if "org.ofono.ConnectionManager" not in properties["Interfaces"]:
|
||||||
|
continue
|
||||||
|
|
||||||
|
connman = dbus.Interface(bus.get_object('org.ofono', path),
|
||||||
|
'org.ofono.ConnectionManager')
|
||||||
|
|
||||||
|
connman.DeactivateAll()
|
Loading…
Reference in New Issue