netbox-community / netbox

The premier source of truth powering network automation. Open source under Apache 2. Public demo: https://demo.netbox.dev
http://netboxlabs.com/oss/netbox/
Apache License 2.0
15.67k stars 2.53k forks source link

LLDP interface showing with quotes #4390

Closed inetman28 closed 4 years ago

inetman28 commented 4 years ago

Environment

Steps to Reproduce

  1. Navigate to a device and click the "LLDP Neighbors" tab

Expected Behavior

I must see green line if configured interface == lldp interface

Observed Behavior

Because LLDP interface show with quotes then str did not match, for example see below screen image

jeremystretch commented 4 years ago

What does the raw API response look like? (Go to http://netbox/api/dcim/devices/<id>/napalm/?method=get_lldp_neighbors_detail in your browser see the response.)

inetman28 commented 4 years ago

remote_port with double quotes )

         "Ethernet49/1": [
            {
                "parent_interface": "Ethernet49/1",
                "remote_port": "\"Ethernet49/1\"",
                "remote_port_description": "SOMETHING DESCRIPTION",
                "remote_system_name": "DC1-SW4",
                "remote_system_description": "Arista Networks EOS version 4.22.3M running on an Arista Networks DCS-7060SX2-48YC6",
                "remote_chassis_id": "98:5D:82:62:BD:ВВ",
                "remote_system_capab": [
                    "bridge",
                    "router"
                ],
                "remote_system_enable_capab": [
                    "bridge",
                    "router"
                ]
            }
        ],
jeremystretch commented 4 years ago

That makes sense, then. NetBox is merely a proxy for the data returned by the NAPALM driver. Seems like a bug in the NAPALM driver to me, though it might also be something oddly platform-specific. In any case, it's not something we can fix in NetBox unfortunately.

inetman28 commented 4 years ago

thanks you. I opened new issue in napalm repo: https://github.com/napalm-automation/napalm/issues/1153

asergeant01 commented 4 years ago

I have it that this will be addressed by Arista.....

LLDP thing is fixed under Bug 480042 so it should start making it to releases in the next few weeks One caveat though is that to preserve existing behaviour (to stop changes from potentially breaking existing automation deployments) we are adding "interfaceId_v2": "Ethernet1 rather then changing interfaceId