diff options
author | jp8046@student.uni-lj.si <jp8046@student.uni-lj.si@5cf9fbd1-b2bc-434c-b4b7-e852f4f63414> | 2014-12-21 06:14:32 +0000 |
---|---|---|
committer | jp8046@student.uni-lj.si <jp8046@student.uni-lj.si@5cf9fbd1-b2bc-434c-b4b7-e852f4f63414> | 2014-12-21 06:14:32 +0000 |
commit | d9cc1937abd5cffd5b4214ccaf4a8fab483fcb24 (patch) | |
tree | 564112f1e0fdce325ad33c6b5359196a0d59e42e /kpov_judge/tasks/snmp_agent_uptime | |
parent | 36c4d52f9917a83bd7d8c677be77133905afabb4 (diff) |
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
Diffstat (limited to 'kpov_judge/tasks/snmp_agent_uptime')
-rw-r--r-- | kpov_judge/tasks/snmp_agent_uptime/task.py | 11 |
1 files changed, 5 insertions, 6 deletions
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 |