summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--kpov_judge/tasks/dhcp_dns_predefined_ip/task.py12
1 files changed, 5 insertions, 7 deletions
diff --git a/kpov_judge/tasks/dhcp_dns_predefined_ip/task.py b/kpov_judge/tasks/dhcp_dns_predefined_ip/task.py
index b5d8f7c..14ade9e 100644
--- a/kpov_judge/tasks/dhcp_dns_predefined_ip/task.py
+++ b/kpov_judge/tasks/dhcp_dns_predefined_ip/task.py
@@ -5,9 +5,11 @@
instructions = {
'si':u"""
-Ustvari tri navidezne računalnike. Za enega (SimpleArbiter) uporabi sliko diska simpleArbiter. Na drugega (DHCP_server) postavi strežnika
+Ustvari tri navidezne računalnike. Za enega (SimpleArbiter) uporabi sliko diska simpleArbiterGW. Na drugega (DHCP_server) postavi strežnika
DHCP in DNS. Poskrbi, da bo preostali računalnik (DHCP_client) dobil naslov, ki ga prebereš na SimpleArbiterju.
Poskrbi, da bo DNS strežnik za HOSTNAME_X vrnil naslov {HOSTNAME_X_IP}.
+DHCP_server naj za DNS strežnik uporabi {DNS_NM}.
+DHCP_client naj za DNS strežnik uporabi {DNS_static}.
"""
}
@@ -42,7 +44,7 @@ computers = {
},
'SimpleArbiter': {
'disks': [
- { 'name': 'simpleArbiterDhcp',
+ { 'name': 'simpleArbiterGW',
# attempt automount
},
#{ 'name': 'CDROM',
@@ -81,14 +83,12 @@ def task(IP_NM, DNS_NM, IP_static, DNS_static):
sA.sendline('nmcli -c no d')
sA.prompt()
results['NM_nmcli'] = sA.before
-
results['NM_nslookup'] = sA.run('nslookup www.arnes.si')
# sB
# check whether NM is handling eth0
sB.sendline('nmcli -c no d')
sB.prompt()
results['static_nmcli'] = sB.before
-
results['static_nslookup'] = sB.run('nslookup www.arnes.si')
sA.logout()
sB.logout()
@@ -118,17 +118,15 @@ def task_check(results, params):
else:
hint += ["Static DNS wrong"]
if re.search(r'e(th0|np0s3|ns3) +ethernet +connected', results['NM_nmcli']):
- # print "NM_nmcli OK"
score += 2
else:
hints += ['nmcli incorrect']
if re.search(r'e(th0|np0s3|ns3) +ethernet +unmanaged', results['static_nmcli']):
- # print "static_nmcli OK"
score += 2
else:
hints += ['nmcli on malibrez incorrect']
return score, hints
def prepare_disks(templates, task_params, global_params):
- write_default_config(templates['simpleArbiterDhcp'], global_params)
+ write_default_config(templates['simpleArbiterGW'], global_params)