From cfdee5e4feb8742b7970678b158656d7c5fd61bc Mon Sep 17 00:00:00 2001 From: "sr5154@student.uni-lj.si" Date: Tue, 28 Mar 2017 15:39:29 +0000 Subject: Pravilno preveri nmcli 2. - copy paste fu git-svn-id: https://svn.lusy.fri.uni-lj.si/kpov-public-svn/kpov-public@411 5cf9fbd1-b2bc-434c-b4b7-e852f4f63414 --- kpov_judge/tasks/dhcp_dns_predefined_ip/task.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'kpov_judge/tasks/dhcp_dns_predefined_ip') diff --git a/kpov_judge/tasks/dhcp_dns_predefined_ip/task.py b/kpov_judge/tasks/dhcp_dns_predefined_ip/task.py index 525e5bb..b5d8f7c 100644 --- a/kpov_judge/tasks/dhcp_dns_predefined_ip/task.py +++ b/kpov_judge/tasks/dhcp_dns_predefined_ip/task.py @@ -85,9 +85,9 @@ def task(IP_NM, DNS_NM, IP_static, DNS_static): results['NM_nslookup'] = sA.run('nslookup www.arnes.si') # sB # check whether NM is handling eth0 - sA.sendline('nmcli -c no d') - sA.prompt() - results['static_nmcli'] = sA.before + sB.sendline('nmcli -c no d') + sB.prompt() + results['static_nmcli'] = sB.before results['static_nslookup'] = sB.run('nslookup www.arnes.si') sA.logout() @@ -122,11 +122,11 @@ def task_check(results, params): score += 2 else: hints += ['nmcli incorrect'] - if not re.search(r'e(th0|np0s3|ns3) +ethernet +connected', results['static_nmcli']): - # print "NM_nmcli OK" + if re.search(r'e(th0|np0s3|ns3) +ethernet +unmanaged', results['static_nmcli']): + # print "static_nmcli OK" score += 2 else: - hints += ['static nmcli incorrect'] + hints += ['nmcli on malibrez incorrect'] return score, hints def prepare_disks(templates, task_params, global_params): -- cgit v1.2.1