This commit is contained in:
Sharad Ahlawat
2021-04-17 11:05:38 -07:00
parent 90c5709862
commit 6d8da42776
20 changed files with 3690 additions and 23 deletions

14
scripts/fan.py Normal file
View File

@ -0,0 +1,14 @@
# pkgk install py37-pysnmp
from pysnmp import hlapi
def get(target, oids, credentials, port=161, engine=hlapi.SnmpEngine(), context=hlapi.ContextData()):
handler = hlapi.getCmd(
engine,
credentials,
hlapi.UdpTransportTarget((target, port)),
context,
*construct_object_types(oids)
)
return fetch(handler, 1)[0]