summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbc1610@student.uni-lj.si <bc1610@student.uni-lj.si@5cf9fbd1-b2bc-434c-b4b7-e852f4f63414>2014-12-12 13:13:19 +0000
committerbc1610@student.uni-lj.si <bc1610@student.uni-lj.si@5cf9fbd1-b2bc-434c-b4b7-e852f4f63414>2014-12-12 13:13:19 +0000
commitc6807b52ffcb9628a28f1d292ce3fcb1eed53d9a (patch)
treefd84dc4dee2247355a56954ba6afa51d912f479a
parent6240edcc52d6770fc4392dcd3e305fa83abb13bf (diff)
git-svn-id: https://svn.lusy.fri.uni-lj.si/kpov-public-svn/kpov-public@43 5cf9fbd1-b2bc-434c-b4b7-e852f4f63414
-rw-r--r--kpov_judge/tasks/snmp_agent_uptime/task.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/kpov_judge/tasks/snmp_agent_uptime/task.py b/kpov_judge/tasks/snmp_agent_uptime/task.py
index c21ee0b..a299b6b 100644
--- a/kpov_judge/tasks/snmp_agent_uptime/task.py
+++ b/kpov_judge/tasks/snmp_agent_uptime/task.py
@@ -105,7 +105,12 @@ def task(SNMP_VALUE, SNMP_OID_ON_SERVER, SNMP_OID_ON_CLIENT):
# run SNMP read SNMP_OID_ON_CLIENT script on client
# read data on SNMP_OID_ON_CLIENT
# read data from SNMP server
- return results
+ import netsnmp
+ session = netsnmp.Session(DestHost=SNMP_VALUE['type'],Version=2,Community='public')
+ vars=netsnmp.VarList(netsnmp.Varbind('.1.3.6.1.2.1.255.1.1')
+
+
+ return session.get(vars)
def gen_params(user_id, params_meta):
params = dict()