summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrik Flykt <patrik.flykt@linux.intel.com>2012-01-20 14:01:28 +0200
committerDaniel Wagner <daniel.wagner@bmw-carit.de>2012-01-24 11:44:54 +0100
commitfd72bf69c08a873456b64f018ab2770cda8e2279 (patch)
treed9c51c8d92f332c20dab7b4ad0de7115e9ba3012
parent0b004569df8539521d96fbc9a08d390aa29344b6 (diff)
downloadconnman-fd72bf69c08a873456b64f018ab2770cda8e2279.tar.gz
connman-fd72bf69c08a873456b64f018ab2770cda8e2279.tar.bz2
connman-fd72bf69c08a873456b64f018ab2770cda8e2279.zip
test-connman: Use Powered property to enable/disable Technologies
-rwxr-xr-xtest/test-connman14
1 files changed, 8 insertions, 6 deletions
diff --git a/test/test-connman b/test/test-connman
index 8ce1ac1f..b36b4c53 100755
--- a/test/test-connman
+++ b/test/test-connman
@@ -146,15 +146,17 @@ elif sys.argv[1] == "scan":
elif sys.argv[1] == "enable":
if len(sys.argv) > 2:
- manager.EnableTechnology(sys.argv[2])
- else:
- manager.EnableTechnology("")
+ path = "/net/connman/technology/" + sys.argv[2]
+ technology = dbus.Interface(bus.get_object("net.connman", path),
+ "net.connman.Technology")
+ technology.SetProperty("Powered", True)
elif sys.argv[1] == "disable":
if len(sys.argv) > 2:
- manager.DisableTechnology(sys.argv[2])
- else:
- manager.DisableTechnology("")
+ path = "/net/connman/technology/" + sys.argv[2]
+ technology = dbus.Interface(bus.get_object("net.connman", path),
+ "net.connman.Technology")
+ technology.SetProperty("Powered", False)
elif sys.argv[1] in ["offlinemode", "flightmode"]:
if len(sys.argv) > 2: