diff options
author | mp7462@student.uni-lj.si <mp7462@student.uni-lj.si@5cf9fbd1-b2bc-434c-b4b7-e852f4f63414> | 2014-12-17 23:03:15 +0000 |
---|---|---|
committer | mp7462@student.uni-lj.si <mp7462@student.uni-lj.si@5cf9fbd1-b2bc-434c-b4b7-e852f4f63414> | 2014-12-17 23:03:15 +0000 |
commit | 63c09795fbb552f0b838fd249264ede252d200a0 (patch) | |
tree | 80a8f4be55c6f8a20aa3f755236da25f0d7b3721 /kpov_judge/tasks | |
parent | 5e5251b068d1099e812208c7e0d0ed4799626263 (diff) |
Dubs 100 get
git-svn-id: https://svn.lusy.fri.uni-lj.si/kpov-public-svn/kpov-public@100 5cf9fbd1-b2bc-434c-b4b7-e852f4f63414
Diffstat (limited to 'kpov_judge/tasks')
-rw-r--r-- | kpov_judge/tasks/openvpn_simple_smb/task.py | 27 |
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 |