summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorNishanth V <nishanth.v@intel.com>2016-04-21 09:21:18 +0530
committerDenis Kenzior <denkenz@gmail.com>2016-04-21 10:03:55 -0500
commit77856af5bd18965c1b083f7c865c14e63ee583f7 (patch)
treee1110522001c8bea05b708d6a48985a7f16a43b4 /test
parent72eb1d7b5f13599c988da9d980a0ebf994a8f949 (diff)
downloadofono-77856af5bd18965c1b083f7c865c14e63ee583f7.tar.gz
test: Add list allowed access points script
Diffstat (limited to 'test')
-rwxr-xr-xtest/list-allowed-access-points25
1 files changed, 25 insertions, 0 deletions
diff --git a/test/list-allowed-access-points b/test/list-allowed-access-points
new file mode 100755
index 00000000..c7bb50c4
--- /dev/null
+++ b/test/list-allowed-access-points
@@ -0,0 +1,25 @@
+#!/usr/bin/python3
+
+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.AllowedAccessPoints" not in properties["Interfaces"]:
+ continue
+
+ allowedAccessPoints = dbus.Interface(bus.get_object('org.ofono',
+ path), 'org.ofono.AllowedAccessPoints')
+
+ apns = allowedAccessPoints.GetAllowedAccessPoints()
+
+ print("Allowed Access Points for [ %s ]" % (path))
+ for apn in apns:
+ print(" [ %s]" % (apn))
+
+print("")