From db54a482b1190562e17627d42b5edd28c169a3d6 Mon Sep 17 00:00:00 2001 From: Jukka Rissanen Date: Mon, 12 Nov 2012 14:07:23 +0200 Subject: test: New VPN test script that connect to connman-vpnd --- test/vpn-disconnect | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100755 test/vpn-disconnect (limited to 'test/vpn-disconnect') diff --git a/test/vpn-disconnect b/test/vpn-disconnect new file mode 100755 index 00000000..d7a49ba9 --- /dev/null +++ b/test/vpn-disconnect @@ -0,0 +1,24 @@ +#!/usr/bin/python + +import sys +import dbus + +if (len(sys.argv) < 1): + print "Usage: %s " % (sys.argv[0]) + sys.exit(1) + +bus = dbus.SystemBus() + +manager = dbus.Interface(bus.get_object("net.connman.vpn", "/"), + "net.connman.vpn.Manager") + +connections = manager.GetConnections() + +path = "/net/connman/vpn/connection/" + sys.argv[1] + +print "Attempting to disconnect VPN %s" % (path) + +connection = dbus.Interface(bus.get_object("net.connman.vpn", path), + "net.connman.vpn.Connection") + +connection.Disconnect() -- cgit v1.2.3