summaryrefslogtreecommitdiff
path: root/kpov_judge/tasks
diff options
context:
space:
mode:
Diffstat (limited to 'kpov_judge/tasks')
-rw-r--r--kpov_judge/tasks/openvpn_simple_smb/task.py27
1 files changed, 8 insertions, 19 deletions
diff --git a/kpov_judge/tasks/openvpn_simple_smb/task.py b/kpov_judge/tasks/openvpn_simple_smb/task.py
index 231529b..1de4ecc 100644
--- a/kpov_judge/tasks/openvpn_simple_smb/task.py
+++ b/kpov_judge/tasks/openvpn_simple_smb/task.py
@@ -160,7 +160,7 @@ def task(IP_SimpleArbiterVPN, DNS_SimpleArbiterVPN, IP_VPNClient1, DNS_VPNClient
#import pexpect # Allows the script to spawn a child application and control it as if a human were typing commands
- # the necessary things we need to check if the task was performed correctly
+ # The necessary things we need to check if the task was performed correctly
results = dict()
# The login params (these must be used on the machines!)
@@ -199,13 +199,6 @@ def task(IP_SimpleArbiterVPN, DNS_SimpleArbiterVPN, IP_VPNClient1, DNS_VPNClient
######
# sA
######
- # TODO: (polz) you can remove nmcli and nslookup - these were only used in the task that
- # was used as the template for other taps
- # Make sure NM is not handling eth0
- results['SimpleArbiter_nmcli'] = sA.run('nmcli d')
-
- # Get the IP of the network as per a DNS server (used to check if all computers are on the same network)
- results['SimpleArbiter_nslookup'] = sA.run('nslookup www.arnes.si')
# Check if the VPN is set up
# Returns 1 if ok, else 0
@@ -237,7 +230,7 @@ def task(IP_SimpleArbiterVPN, DNS_SimpleArbiterVPN, IP_VPNClient1, DNS_VPNClient
###
# Check if both clients are connected to the correct VPN
- # (check if first 24 bits of IP addr are the same as the server's)
+ # (check if first 24 bits of IP addr are the same as the IP of the VPN server)
# a.k.a. the YES WE CAN method of checking things
# really, really hoping it has root privileges too
###
@@ -280,10 +273,6 @@ def task(IP_SimpleArbiterVPN, DNS_SimpleArbiterVPN, IP_VPNClient1, DNS_VPNClient
######
# sC1
######
- # TODO: (polz) again, no need for this
- results['VPNClient1_nmcli'] = sC1.run('nmcli d')
-
- results['VPNClient1_nslookup'] = sC1.run('nslookup www.arnes.si')
# Ping the VPN server
sC1.sendLine( 'ping -c 3 {0}'.format( DNS_SimpleArbiterVPN ) )
@@ -296,10 +285,6 @@ def task(IP_SimpleArbiterVPN, DNS_SimpleArbiterVPN, IP_VPNClient1, DNS_VPNClient
# sC2
######
- results['VPNClient2_nmcli'] = sC2.run('nmcli d')
-
- results['VPNClient2_nslookup'] = sC2.run('nslookup www.arnes.si')
-
# Ping the VPN server
sC2.sendLine( 'ping -c 3 {0}'.format( DNS_SimpleArbiterVPN ) )
sC2.prompt()
@@ -308,11 +293,15 @@ def task(IP_SimpleArbiterVPN, DNS_SimpleArbiterVPN, IP_VPNClient1, DNS_VPNClient
+ # TODO: (polz) please, add some sort of check to verify that the user created the neccessarry keys.
+ #
+
+
+
sA.logout()
sC1.logout()
sC2.logout()
- # TODO: (polz) please, add some sort of check to verify that the user created the neccessarry keys.
- #
+
return results