2
0
mirror of https://github.com/xcat2/confluent.git synced 2025-02-16 18:49:04 +00:00

Change mind about peerid

Stick to the identifiers mandated by LLDP, and only those to
base the peerid (by-name can help otherwise).
This commit is contained in:
Jarrod Johnson 2017-10-02 13:32:56 -04:00
parent e298ead944
commit 1fb6eb230b

View File

@ -161,8 +161,7 @@ def _extract_neighbor_data_b(args):
for entry in lldpdata:
entry = lldpdata[entry]
entry['switch'] = switch
peerid = '{0}-{1}-{2}'.format(
entry.get('peername', ''),
peerid = '{0}-{1}'.format(
entry.get('peerchassisid', '').replace(':', '-'),
entry.get('peerport', '').replace(':', '-'))
_neighbypeerid[peerid] = entry