From 9c51bbe5016495c714789f5df01806a6d366e11a Mon Sep 17 00:00:00 2001 From: Timotej Lazar Date: Sat, 6 Oct 2018 23:56:03 +0200 Subject: Rename kpov_random_helpers to kpov_util --- kpov_judge/tasks/set_ip_dhcp_hostname/task.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'kpov_judge/tasks/set_ip_dhcp_hostname') diff --git a/kpov_judge/tasks/set_ip_dhcp_hostname/task.py b/kpov_judge/tasks/set_ip_dhcp_hostname/task.py index f68c71b..8a17fc3 100644 --- a/kpov_judge/tasks/set_ip_dhcp_hostname/task.py +++ b/kpov_judge/tasks/set_ip_dhcp_hostname/task.py @@ -2,7 +2,7 @@ # -*- coding: utf-8 -*- # TODO: finish thi -# kpov_random_helpers should be imported by add_assignment.py +# kpov_util should be imported by add_assignment.py instructions = { 'si':""" @@ -84,9 +84,9 @@ def task(IP_DHCP, Hostname_DHCP, IP_static, MAC_static, IP_dhcp_static): def gen_params(user_id, params_meta): r = random.Random(user_id) # IP_NM, DNS_NM, IP_static, DNS_static) - net = kpov_random_helpers.IPv4_subnet_gen(r, '172.23.128.0/18', 24) - params['IP_DHCP'], params['IP_static'], params['IP_dhcp_static'] = kpov_random_helpers.IPv4_addr_gen(r, net, 3) - params['Hostname_DHCP'] = kpov_random_helpers.hostname_gen(r) + net = kpov_util.IPv4_subnet_gen(r, '172.23.128.0/18', 24) + params['IP_DHCP'], params['IP_static'], params['IP_dhcp_static'] = kpov_util.IPv4_addr_gen(r, net, 3) + params['Hostname_DHCP'] = kpov_util.hostname_gen(r) return params def task_check(results, params): -- cgit v1.2.1