NAPALM LLDP neighbors view breaks when LLDP hostname value is null #2049

Closed
opened 2025-12-29 17:21:45 +01:00 by adam · 0 comments
Owner

Originally created by @mwheckmann on GitHub (Oct 5, 2018).

NAPALM LLDP neighbors view breaks when LLDP hostname value is null. Where "breaks" means that the Ajax spinning wheel spins forever and the view never returns anything.

For example, when the NAPALM JSON output contains:

    "swp27s1": [
      {
        "hostname": null,
        "port": "Embedded, Port 1"
      }
    ],

This happens with connected hosts that have Intel X710 NICs that do LLDP in firmware. Most people will disable LLDP in firmware for practical use but we will always have servers in a not-yet deployed state that will be like this.

NOTE: There is also likely a bug in the NAPALM driver which is returning "null", but either way, IMO the view should not break because of this.

I will submit an MR to fix this.

Environment

  • Python version: 3.6.5
  • NetBox version: 2.4.5

Steps to Reproduce

Setup NAPALM drivers and platform mapping correctly then test w/ LLDP data that has null instead of a string in the hostname.

Expected Behavior

A view should be returned w/ empty hostname data for the port.

Observed Behavior

View stuck forever in spinning wheel.

Originally created by @mwheckmann on GitHub (Oct 5, 2018). NAPALM LLDP neighbors view breaks when LLDP hostname value is null. Where "breaks" means that the Ajax spinning wheel spins forever and the view never returns anything. For example, when the NAPALM JSON output contains: ``` "swp27s1": [ { "hostname": null, "port": "Embedded, Port 1" } ], ``` This happens with connected hosts that have Intel X710 NICs that do LLDP in firmware. Most people will disable LLDP in firmware for practical use but we will always have servers in a not-yet deployed state that will be like this. NOTE: There is also likely a bug in the NAPALM driver which is returning "null", but either way, IMO the view should not break because of this. I will submit an MR to fix this. ### Environment * Python version: 3.6.5 * NetBox version: 2.4.5 ### Steps to Reproduce Setup NAPALM drivers and platform mapping correctly then test w/ LLDP data that has null instead of a string in the hostname. <!-- What did you expect to happen? --> ### Expected Behavior A view should be returned w/ empty hostname data for the port. <!-- What happened instead? --> ### Observed Behavior View stuck forever in spinning wheel.
adam added the type: bugstatus: accepted labels 2025-12-29 17:21:45 +01:00
adam closed this issue 2025-12-29 17:21:45 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#2049