diff options
Diffstat (limited to 'kpov_judge/tasks/set_ip_dhcp_hostname')
-rw-r--r-- | kpov_judge/tasks/set_ip_dhcp_hostname/task.py | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/kpov_judge/tasks/set_ip_dhcp_hostname/task.py b/kpov_judge/tasks/set_ip_dhcp_hostname/task.py index f68c71b..77648e6 100644 --- a/kpov_judge/tasks/set_ip_dhcp_hostname/task.py +++ b/kpov_judge/tasks/set_ip_dhcp_hostname/task.py @@ -1,8 +1,4 @@ -#!/usr/bin/env python -# -*- 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 +80,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): |