diff options
author | sr5154@student.uni-lj.si <sr5154@student.uni-lj.si@5cf9fbd1-b2bc-434c-b4b7-e852f4f63414> | 2017-03-31 16:02:01 +0000 |
---|---|---|
committer | sr5154@student.uni-lj.si <sr5154@student.uni-lj.si@5cf9fbd1-b2bc-434c-b4b7-e852f4f63414> | 2017-03-31 16:02:01 +0000 |
commit | a3cf12f9af771e9b6ba6dad9b4d20ecbc1d6e126 (patch) | |
tree | 0b373c389f128404629b619e73bb2a9cdc3768c1 | |
parent | cfdee5e4feb8742b7970678b158656d7c5fd61bc (diff) |
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
-rw-r--r-- | kpov_judge/tasks/dhcp_dns_predefined_ip/task.py | 12 |
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) |