summaryrefslogtreecommitdiff
path: root/test/list-allowed-access-points
blob: c7bb50c4c512b650cecd0dce4493baa1dae8ea6b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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("")