From a3cf12f9af771e9b6ba6dad9b4d20ecbc1d6e126 Mon Sep 17 00:00:00 2001 From: "sr5154@student.uni-lj.si" Date: Fri, 31 Mar 2017 16:02:01 +0000 Subject: IP-ji DNS serverjev v navodilih git-svn-id: https://svn.lusy.fri.uni-lj.si/kpov-public-svn/kpov-public@412 5cf9fbd1-b2bc-434c-b4b7-e852f4f63414 --- kpov_judge/tasks/dhcp_dns_predefined_ip/task.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'kpov_judge') 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) -- cgit v1.2.1