I am planning to use PySnmp and my requirement is very simple. I would like to just connect to a network device via PySnmp and do nothing. Basically just to check whether the SNMP community is correct and i just need if the source can connect to a network device . I do not want to run the entire walk or get which consume time.
Flow :
Program Runs --> Connect to a network device over the supplied SNMP community --> If it connects - return True , and if it cannot --> Return False.
I do not want to provide any OID details in my code as it will just be connect or disconnect message expected.
All examples are showing to run entire GET or WALk or GETBULK etc.
I don't know of a way to test a community without doing an SNMP operation. It's not necessary to walk. You can do a single GET
to something common like .1.3.6.1.2.1.1.5.0
(SNMPv2-MIB::sysName) as a test.