2
0
mirror of https://github.com/xcat2/confluent.git synced 2024-11-29 13:00:03 +00:00

Fix missing portname in lldp data

Root cause was pysnmp returning extraneous leftover data causing
calling code to overrite good data.
This commit is contained in:
Jarrod Johnson 2018-05-22 09:36:09 -04:00
parent 8b37199654
commit ca7711b373

View File

@ -99,6 +99,10 @@ class Session(object):
elif errnum:
raise exc.ConfluentException(errnum.prettyPrint())
for ans in answers:
if not obj[0].isPrefixOf(ans[0]):
# PySNMP returns leftovers in a bulk command
# filter out such leftovers
break
yield ans
except snmperr.WrongValueError:
raise exc.TargetEndpointBadCredentials('Invalid SNMPv3 password')