Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

junos: make sure we don't duplicate lldp neighbor entries #1640

Merged
merged 2 commits into from
May 20, 2022

Conversation

matejv
Copy link
Contributor

@matejv matejv commented May 18, 2022

if an interface had 3 LLDP neighbors function returned 3*3=9 entries - each was returned 3 times

Example from one of our switches:

matej@myswitch> show lldp neighbors | match 0/0/16    
ge-0/0/16          -                   54:bf:64:94:4d:9e   54:bf:64:94:4d:9e
ge-0/0/16          -                   7c:8a:e1:76:d3:f7   7c:8a:e1:76:d3:f7

Note two LLDP neighbors on the same interface.

$ napalm --user matej --vendor junos myswitch call get_lldp_neighbors_detail
Enter password: 
{
...
    "ge-0/0/16": [
        {
            "parent_interface": "-",
            "remote_port": "54:bf:64:94:4d:9e",
            "remote_chassis_id": "54:BF:64:94:4D:9E",
            "remote_port_description": "",
            "remote_system_name": null,
            "remote_system_description": null,
            "remote_system_capab": [],
            "remote_system_enable_capab": []
        },
        {
            "parent_interface": "-",
            "remote_port": "7c:8a:e1:76:d3:f7",
            "remote_chassis_id": "7C:8A:E1:76:D3:F7",
            "remote_port_description": "",
            "remote_system_name": null,
            "remote_system_description": null,
            "remote_system_capab": [],
            "remote_system_enable_capab": []
        },
        {
            "parent_interface": "-",
            "remote_port": "54:bf:64:94:4d:9e",
            "remote_chassis_id": "54:BF:64:94:4D:9E",
            "remote_port_description": "",
            "remote_system_name": null,
            "remote_system_description": null,
            "remote_system_capab": [],
            "remote_system_enable_capab": []
        },
        {
            "parent_interface": "-",
            "remote_port": "7c:8a:e1:76:d3:f7",
            "remote_chassis_id": "7C:8A:E1:76:D3:F7",
            "remote_port_description": "",
            "remote_system_name": null,
            "remote_system_description": null,
            "remote_system_capab": [],
            "remote_system_enable_capab": []
        }
    ]
}

Note that each LLDP neighbor entry war returned twice. This pull request fixes that.

matejv and others added 2 commits May 18, 2022 12:55
if an interface had 3 LLDP neighbors function returned 3*3=9 entries - each was returned 3 times
@mirceaulinic mirceaulinic merged commit d419cde into napalm-automation:develop May 20, 2022
@mirceaulinic mirceaulinic added this to the 4.0.0 milestone May 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants