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/isc_dhcp_live_boot/task.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'kpov_judge/tasks/isc_dhcp_live_boot/task.py') diff --git a/kpov_judge/tasks/isc_dhcp_live_boot/task.py b/kpov_judge/tasks/isc_dhcp_live_boot/task.py index c5ac728..3004209 100644 --- a/kpov_judge/tasks/isc_dhcp_live_boot/task.py +++ b/kpov_judge/tasks/isc_dhcp_live_boot/task.py @@ -2,7 +2,7 @@ # -*- coding: utf-8 -*- # TODO: dokoncaj! -# kpov_random_helpers should be imported by add_assignment.py +# kpov_util should be imported by add_assignment.py instructions = { 'si':""" @@ -161,10 +161,10 @@ def task(IP_DHCP, IP_GW, MAC_BOOT, BOOT_FNAME): def gen_params(user_id, params_meta): params = dict() r = random.Random(user_id) - net = kpov_random_helpers.IPv4_subnet_gen(r, '10.64.0.0/10', 24) - params['IP_DHCP'], params['IP_GW'] = kpov_random_helpers.IPv4_addr_gen(r, net, 2) - params['BOOT_FNAME'] = kpov_random_helpers.fname_gen(r) - params['TFTP_STRING'] = kpov_random_helpers.alnum_gen(r, 45) + net = kpov_util.IPv4_subnet_gen(r, '10.64.0.0/10', 24) + params['IP_DHCP'], params['IP_GW'] = kpov_util.IPv4_addr_gen(r, net, 2) + params['BOOT_FNAME'] = kpov_util.fname_gen(r) + params['TFTP_STRING'] = kpov_util.alnum_gen(r, 45) # IP_NM, DNS_NM, IP_static, DNS_static) return params -- cgit v1.2.1 From 3091fc2877600f7926ed6a596c316183499125f8 Mon Sep 17 00:00:00 2001 From: Timotej Lazar Date: Sun, 7 Oct 2018 19:11:49 +0200 Subject: Remove coding: lines Python 3 source is utf-8 by default. --- kpov_judge/tasks/isc_dhcp_live_boot/task.py | 1 - 1 file changed, 1 deletion(-) (limited to 'kpov_judge/tasks/isc_dhcp_live_boot/task.py') diff --git a/kpov_judge/tasks/isc_dhcp_live_boot/task.py b/kpov_judge/tasks/isc_dhcp_live_boot/task.py index 3004209..71f41a9 100644 --- a/kpov_judge/tasks/isc_dhcp_live_boot/task.py +++ b/kpov_judge/tasks/isc_dhcp_live_boot/task.py @@ -1,5 +1,4 @@ #!/usr/bin/env python -# -*- coding: utf-8 -*- # TODO: dokoncaj! # kpov_util should be imported by add_assignment.py -- cgit v1.2.1 From dbf585c2a59dbcb7f6d803d5756826b562cd7f43 Mon Sep 17 00:00:00 2001 From: Timotej Lazar Date: Sun, 7 Oct 2018 19:38:40 +0200 Subject: Fix or remove hashbangs --- kpov_judge/tasks/isc_dhcp_live_boot/task.py | 2 -- 1 file changed, 2 deletions(-) (limited to 'kpov_judge/tasks/isc_dhcp_live_boot/task.py') diff --git a/kpov_judge/tasks/isc_dhcp_live_boot/task.py b/kpov_judge/tasks/isc_dhcp_live_boot/task.py index 71f41a9..38bbcd8 100644 --- a/kpov_judge/tasks/isc_dhcp_live_boot/task.py +++ b/kpov_judge/tasks/isc_dhcp_live_boot/task.py @@ -1,5 +1,3 @@ -#!/usr/bin/env python - # TODO: dokoncaj! # kpov_util should be imported by add_assignment.py -- cgit v1.2.1