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/snmp_agent_uptime/task.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'kpov_judge/tasks/snmp_agent_uptime') diff --git a/kpov_judge/tasks/snmp_agent_uptime/task.py b/kpov_judge/tasks/snmp_agent_uptime/task.py index c636549..cc23549 100644 --- a/kpov_judge/tasks/snmp_agent_uptime/task.py +++ b/kpov_judge/tasks/snmp_agent_uptime/task.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -# kpov_random_helpers should be imported by add_assignment.py +# kpov_util should be imported by add_assignment.py # TODO: finish this. instructions = { 'si':""" @@ -154,13 +154,13 @@ def gen_params(user_id, params_meta): import random params = dict() r = random.Random(user_id) - # You can also create an OID creation function in kpov_random_helpers. + # You can also create an OID creation function in kpov_util. # this should probably return params_meta #<== Aleksander Fujs 6310020 ==> - params['SNMP_VALUE'] = kpov_random_helpers.alnum_gen(r, 64) + params['SNMP_VALUE'] = kpov_util.alnum_gen(r, 64) params['SNMP_UPTIME_OID'] = 'NET-SNMP-EXTEND-MIB::nsExtendOutLine."{}".1'.format( - kpov_random_helpers.hostname_gen(r)) + kpov_util.hostname_gen(r)) params['SNMP_CLIENT_OID'] = '1.3.6.1.4.1.8072.2.9999.9999.{}'.format( r.randint(0, 255)) #<== Aleksander Fujs 6310020 ==> -- 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/snmp_agent_uptime/task.py | 1 - 1 file changed, 1 deletion(-) (limited to 'kpov_judge/tasks/snmp_agent_uptime') diff --git a/kpov_judge/tasks/snmp_agent_uptime/task.py b/kpov_judge/tasks/snmp_agent_uptime/task.py index cc23549..d4ffb9a 100644 --- a/kpov_judge/tasks/snmp_agent_uptime/task.py +++ b/kpov_judge/tasks/snmp_agent_uptime/task.py @@ -1,5 +1,4 @@ #!/usr/bin/env python -# -*- coding: utf-8 -*- # kpov_util should be imported by add_assignment.py # TODO: finish this. -- 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/snmp_agent_uptime/task.py | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) (limited to 'kpov_judge/tasks/snmp_agent_uptime') diff --git a/kpov_judge/tasks/snmp_agent_uptime/task.py b/kpov_judge/tasks/snmp_agent_uptime/task.py index d4ffb9a..7b3143c 100644 --- a/kpov_judge/tasks/snmp_agent_uptime/task.py +++ b/kpov_judge/tasks/snmp_agent_uptime/task.py @@ -1,6 +1,5 @@ - #!/usr/bin/env python - # kpov_util should be imported by add_assignment.py + # TODO: finish this. instructions = { 'si':""" @@ -41,20 +40,14 @@ Set it up on SNMPClient in the home directory of the user test. Make all the data available over SNMP readable by the "studentje" community. """ - } - computers = { 'SNMPClient': { 'disks': [ { 'name': 'student-SNMPClient', }, - #{ 'name': 'CDROM', - # 'options':{'readonly': True}, - # 'parts': [],# no parts, no mounting. - #} ], 'network_interfaces': [{'network': 'net1'}], 'flavor': 'm1.tiny', @@ -64,10 +57,6 @@ computers = { 'disks': [ { 'name': 'student-SNMPServer', }, - #{ 'name': 'CDROM', - # 'options':{'readonly': True}, - # 'parts': [],# no parts, no mounting. - #} ], 'network_interfaces': [{'network': 'net1'}], 'flavor': 'm1.tiny', @@ -78,12 +67,7 @@ computers = { 'SimpleArbiter': { 'disks': [ { 'name': 'simpleArbiterDhcpGWSNMP', - # attempt automount }, - #{ 'name': 'CDROM', - # 'options': {'readonly': True}, - # 'parts': [{'dev': 'b1', 'path': '/cdrom'}], - #}, ], 'network_interfaces': [{'network': 'net1'}, {'network': 'test-net'}], 'flavor': 'm1.tiny', -- cgit v1.2.1