From d9cc1937abd5cffd5b4214ccaf4a8fab483fcb24 Mon Sep 17 00:00:00 2001 From: "jp8046@student.uni-lj.si" Date: Sun, 21 Dec 2014 06:14:32 +0000 Subject: Popravo gen_parametrs in se konano git-svn-id: https://svn.lusy.fri.uni-lj.si/kpov-public-svn/kpov-public@109 5cf9fbd1-b2bc-434c-b4b7-e852f4f63414 --- kpov_judge/tasks/snmp_agent_uptime/task.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 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 88e6438..0a2fbc1 100644 --- a/kpov_judge/tasks/snmp_agent_uptime/task.py +++ b/kpov_judge/tasks/snmp_agent_uptime/task.py @@ -120,14 +120,13 @@ def task(SNMP_VALUE, SNMP_OID_ON_SERVER, SNMP_OID_ON_CLIENT): def gen_params(user_id, params_meta): params = dict() # TODO (polz) this is wrong. Try something like: - # r = random.Random(user_id) - # params_meta['SNMP_VALUE'] = r.randInt() - # params_meta['SNMP_OID_ON_SERVER'] = '1.3.6.1.4.1.8072.1.3.2.4.1.4' + r = random.Random(user_id) + params_meta['SNMP_VALUE'] = r.randInt() + params_meta['SNMP_OID_ON_SERVER'] = '1.3.6.1.4.1.8072.1.3.2.4.1.4' + params_meta['SNMP_OID_ON_CLIENT'] = '1.3.6.1.4.1.8072.1.3.2.4.1.4.' # You can also create an OID creation function in kpov_random_helpers. - r = random.randrange(1,255,1) - params_meta[SNMP_VAULE[Value]]=r # this should probably return params_meta - return r + return params_meta def task_check(results, params): #cakam na predhodnike in pomagam tistim ki kaj ne vejo -- cgit v1.2.1