summaryrefslogtreecommitdiffstats
path: root/test/activate-context
diff options
context:
space:
mode:
authorDenis Kenzior <denkenz@gmail.com>2010-08-19 13:23:34 -0500
committerDenis Kenzior <denkenz@gmail.com>2010-08-19 14:20:06 -0500
commitb4c1938d8a0788c64b923aa0bc112b63cf15e6df (patch)
tree1694d799a23213e3fd15f4760b6c547b16f08120 /test/activate-context
parent256e01c8c4949a43409cbd1c4c1e64c1016a9cad (diff)
downloadofono-b4c1938d8a0788c64b923aa0bc112b63cf15e6df.tar.bz2
test: Update activate-context to the new API
Diffstat (limited to 'test/activate-context')
-rwxr-xr-xtest/activate-context16
1 files changed, 8 insertions, 8 deletions
diff --git a/test/activate-context b/test/activate-context
index 98c177a6..743ba1fd 100755
--- a/test/activate-context
+++ b/test/activate-context
@@ -16,24 +16,24 @@ for path in properties["Modems"]:
properties = modem.GetProperties()
- if "org.ofono.DataConnectionManager" not in properties["Interfaces"]:
+ if "org.ofono.ConnectionManager" not in properties["Interfaces"]:
continue
- connmgr = dbus.Interface(bus.get_object('org.ofono', path),
- 'org.ofono.DataConnectionManager')
+ connman = dbus.Interface(bus.get_object('org.ofono', path),
+ 'org.ofono.ConnectionManager')
- properties = connmgr.GetProperties()
+ contexts = connman.GetContexts()
- if (properties["PrimaryContexts"] == []):
+ if (len(contexts) == 0):
print "No context available"
sys.exit(1)
- connmgr.SetProperty("Powered", dbus.Boolean(1))
+ connman.SetProperty("Powered", dbus.Boolean(1))
- path = properties["PrimaryContexts"][0]
+ path = contexts[0][0]
context = dbus.Interface(bus.get_object('org.ofono', path),
- 'org.ofono.PrimaryDataContext')
+ 'org.ofono.ConnectionContext')
try:
context.SetProperty("Active", dbus.Boolean(1))