summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMarcel Holtmann <marcel@holtmann.org>2008-12-03 13:27:51 +0100
committerMarcel Holtmann <marcel@holtmann.org>2008-12-03 13:27:51 +0100
commitb9d78ccae06676a1cc82b1555bc14fb6ecfcdae0 (patch)
treebd27e3e421803e2ad120bbc73283bfb8943efe6e /test
parent13006c2850b7017da698a457c48726777db68234 (diff)
downloadconnman-b9d78ccae06676a1cc82b1555bc14fb6ecfcdae0.tar.gz
connman-b9d78ccae06676a1cc82b1555bc14fb6ecfcdae0.tar.bz2
connman-b9d78ccae06676a1cc82b1555bc14fb6ecfcdae0.zip
Change test scripts to use Powered property
Diffstat (limited to 'test')
-rwxr-xr-xtest/disable-device14
-rwxr-xr-xtest/enable-device14
2 files changed, 14 insertions, 14 deletions
diff --git a/test/disable-device b/test/disable-device
index ac55e77a..31e9f951 100755
--- a/test/disable-device
+++ b/test/disable-device
@@ -7,17 +7,17 @@ bus = dbus.SystemBus()
manager = dbus.Interface(bus.get_object('org.moblin.connman', "/"),
'org.moblin.connman.Manager')
-elements = manager.ListElements()
+properties = manager.GetProperties()
-for path in elements:
- element = dbus.Interface(bus.get_object('org.moblin.connman', path),
- 'org.moblin.connman.Element')
+for path in properties["Devices"]:
+ device = dbus.Interface(bus.get_object('org.moblin.connman', path),
+ 'org.moblin.connman.Device')
- properties = element.GetProperties()
+ properties = device.GetProperties()
- if (properties["Type"] != "device"):
+ if (properties["Powered"] == dbus.Boolean(0)):
continue
print "[ %s ]" % (path)
- element.Disable()
+ device.SetProperty("Powered", dbus.Boolean(0));
diff --git a/test/enable-device b/test/enable-device
index 55bd1f19..e79b7361 100755
--- a/test/enable-device
+++ b/test/enable-device
@@ -7,17 +7,17 @@ bus = dbus.SystemBus()
manager = dbus.Interface(bus.get_object('org.moblin.connman', "/"),
'org.moblin.connman.Manager')
-elements = manager.ListElements()
+properties = manager.GetProperties()
-for path in elements:
- element = dbus.Interface(bus.get_object('org.moblin.connman', path),
- 'org.moblin.connman.Element')
+for path in properties["Devices"]:
+ device = dbus.Interface(bus.get_object('org.moblin.connman', path),
+ 'org.moblin.connman.Device')
- properties = element.GetProperties()
+ properties = device.GetProperties()
- if (properties["Type"] != "device"):
+ if (properties["Powered"] == dbus.Boolean(1)):
continue
print "[ %s ]" % (path)
- element.Enable()
+ device.SetProperty("Powered", dbus.Boolean(1));