summaryrefslogtreecommitdiff
path: root/kpov_judge/tasks/dhcp_dns_predefined_ip
diff options
context:
space:
mode:
Diffstat (limited to 'kpov_judge/tasks/dhcp_dns_predefined_ip')
-rw-r--r--kpov_judge/tasks/dhcp_dns_predefined_ip/task.py14
1 files changed, 11 insertions, 3 deletions
diff --git a/kpov_judge/tasks/dhcp_dns_predefined_ip/task.py b/kpov_judge/tasks/dhcp_dns_predefined_ip/task.py
index d251ebd..f6e0ded 100644
--- a/kpov_judge/tasks/dhcp_dns_predefined_ip/task.py
+++ b/kpov_judge/tasks/dhcp_dns_predefined_ip/task.py
@@ -100,17 +100,25 @@ def gen_params(user_id, params_meta):
def task_check(results, params):
import re
- score = -9
+ score = 0
+ hints = []
if results['NM_nslookup'].find('Server:\t\t{0}\r'.format(params['DNS_NM'])) > -1:
score += 3
+ else:
+ hint += ["NM DNS wrong"]
if results['static_nslookup'].find('Server:\t\t{0}\r'.format(params['DNS_static'])) > -1:
score += 3
+ else:
+ hint += ["Static DNS wrong"]
if re.search(r'eth0 +802-.*connected', results['NM_nmcli']):
score += 2
+ else:
+ hint += ["NM wrong"]
if not re.search(r'eth0 +802-.*connected', results['static_nmcli']):
score += 2
- score = 0
- return score
+ else:
+ hint += ["static wrong"]
+ return score, hints
def prepare_disks(templates, params):
# d = templates['simpleArbiterDhcp']