summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorMohamed Abbas <mabbas@linux.intel.com>2011-11-15 13:06:19 +0200
committerSamuel Ortiz <sameo@linux.intel.com>2011-11-15 13:41:44 +0100
commit764b680c053650985b6f4424c0cdf75b3fbd42b3 (patch)
tree03ca893a95ee7ac58e7a81ae96efa2b90a401fc6 /test
parent4d86c7c957ef7ec254e1452e55186f045f0d80ff (diff)
downloadconnman-764b680c053650985b6f4424c0cdf75b3fbd42b3.tar.gz
connman-764b680c053650985b6f4424c0cdf75b3fbd42b3.tar.bz2
connman-764b680c053650985b6f4424c0cdf75b3fbd42b3.zip
test: Add test script support for pptp/l2tp
Modify connect-vpn script to handle pptp/l2tp connection.
Diffstat (limited to 'test')
-rwxr-xr-xtest/connect-vpn19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/connect-vpn b/test/connect-vpn
index 4e1fc7cf..15128c85 100755
--- a/test/connect-vpn
+++ b/test/connect-vpn
@@ -9,6 +9,10 @@ if (len(sys.argv) < 4):
print " <name> <host> <domain> <cookie> [servercert]"
print " type: openvpn"
print " <name> <host> <domain> [<cafile> <certfile> <keyfile>]"
+ print " type: pptp"
+ print " <name> <host> <domain> <user> <password>"
+ print " type: l2tp"
+ print " <name> <host> <domain> <user> <password>"
sys.exit(1)
bus = dbus.SystemBus()
@@ -47,6 +51,21 @@ elif sys.argv[1] == "openvpn":
"OpenVPN.Cert": sys.argv[6],
"OpenVPN.Key": sys.argv[7]}))
+elif sys.argv[1] == "pptp":
+ path = manager.ConnectProvider(({ "Type": "pptp",
+ "Name": sys.argv[2],
+ "Host": sys.argv[3],
+ "VPN.Domain": sys.argv[4],
+ "PPTP.User": sys.argv[5],
+ "PPTP.Password": sys.argv[6]}))
+elif sys.argv[1] == "l2tp":
+ path = manager.ConnectProvider(({ "Type": "l2tp",
+ "Name": sys.argv[2],
+ "Host": sys.argv[3],
+ "VPN.Domain": sys.argv[4],
+ "L2TP.User": sys.argv[5],
+ "L2TP.Password": sys.argv[6]}))
+
else:
print "Unknown VPN type"
sys.exit(1)