summaryrefslogtreecommitdiff
path: root/kpov_judge/tasks/snmp_agent_uptime
diff options
context:
space:
mode:
Diffstat (limited to 'kpov_judge/tasks/snmp_agent_uptime')
-rw-r--r--kpov_judge/tasks/snmp_agent_uptime/task.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/kpov_judge/tasks/snmp_agent_uptime/task.py b/kpov_judge/tasks/snmp_agent_uptime/task.py
index a32a607..9aaa20b 100644
--- a/kpov_judge/tasks/snmp_agent_uptime/task.py
+++ b/kpov_judge/tasks/snmp_agent_uptime/task.py
@@ -95,9 +95,9 @@ computers = {
networks = { 'net1': {'public': False}, 'test-net': {'public': True} }
params_meta = {
- 'SNMP_VALUE': {'descriptions': {'si': 'Vrednost, dostopna prek SNMP'}, 'w': False, 'public':True, 'type': 'number', 'generated': True},
- 'SNMP_OID_ON_SERVER': {'descriptions': {'si': 'OID, na katerem je vrednost dostopna'}, 'w': False, 'public':True, 'type': 'OID', 'generated': True},
- 'SNMP_OID_ON_CLIENT': {'descriptions': {'si': 'OID, ki naj ga klient bere'}, 'w': False, 'public':True, 'type': 'OID', 'generated': True},
+ 'SNMP_VALUE': {'descriptions': {'si': 'Vrednost, dostopna prek SNMP'}Value:0, 'w': False, 'public':True, 'type': 'number', 'generated': True},
+ 'SNMP_OID_ON_SERVER': {'descriptions': {'si': 'OID, na katerem je vrednost dostopna'},'OID':'1.3.6.1.4.1.8072.1.3.2.4', 'w': False, 'public':True, 'type': 'OID', 'generated': True},
+ 'SNMP_OID_ON_CLIENT': {'descriptions': {'si': 'OID, ki naj ga klient bere'}'OID':'1.3.6.1.4.1.8072.1.3.2.4.1.4', 'w': False, 'public':True, 'type': 'OID', 'generated': True},
}
def task(SNMP_VALUE, SNMP_OID_ON_SERVER, SNMP_OID_ON_CLIENT):
@@ -118,8 +118,9 @@ def task(SNMP_VALUE, SNMP_OID_ON_SERVER, SNMP_OID_ON_CLIENT):
def gen_params(user_id, params_meta):
params = dict()
- r = random.Random(user_id)
- return params
+ r = random.randrange(1,255,1)
+ paras_meta[SNMP_VAULE[Value]]=r
+ return r
def task_check(results, params):
import re