Hi all im looking for a solution to get multiple oids at the same time. for example is it possible to use list of oids in pysnmp get command generator?
from this:
cmdGen = cmdgen.CommandGenerator()
errorIndication, errorStatus, errorIndex, varBindTable = cmdGen.bulkCmd(
cmdgen.CommunityData('public'),
cmdgen.UdpTransportTarget(('demo.snmplabs.com', 161)),
0, 25,
'1.3.6.1.2.1.2.2.1.2',
'1.3.6.1.2.1.2.2.1.3',
)
to something like:
myoid = ['1.3.6.1.2.1.1.1.0', '1.3.6.1.2.1.1.6.0', '1.3.6.1.2.1.1.6.0']
cmdGen = cmdgen.CommandGenerator()
errorIndication, errorStatus, errorIndex, varBindTable = cmdGen.bulkCmd(
cmdgen.CommunityData('public'),
cmdgen.UdpTransportTarget(('demo.snmplabs.com', 161)),
0, 25,
myoids,
)
the actual problem is the oids are variables so im looking for a way to change them easily.