Skip to content

Fix LLDP neighbors detail retrieval on ASR9K devices #2208

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

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

Kani999
Copy link
Contributor

@Kani999 Kani999 commented Apr 2, 2025

The original implementation of the get_lldp_neighbors_detail method fails with an XMLCLIError exception when used on Cisco ASR9K devices. This is due to the ASR9K requiring a more specific XML path in the RPC call.

Added a try/except block that:

  1. First attempts the generic LLDP query
  2. If that fails with XMLCLIError, tries a more specific query that includes the exact node path (Rack 0, Slot 0, Instance CPU0)
  3. Also added an informative log message to indicate when fallback occurs

This change maintains backward compatibility with standard IOS-XR devices while adding support for ASR9K devices.

Closes #2207

The original implementation of the get_lldp_neighbors_detail method fails with
an XMLCLIError exception when used on Cisco ASR9K devices. This is due to
the ASR9K requiring a more specific XML path in the RPC call.

Added a try/except block that:
1. First attempts the generic LLDP query
2. If that fails with XMLCLIError, tries a more specific query that includes the
   exact node path (Rack 0, Slot 0, Instance CPU0)
3. Also added an informative log message to indicate when fallback occurs

This change maintains backward compatibility with standard IOS-XR devices
while adding support for ASR9K devices.
@Kani999 Kani999 force-pushed the iosxr_lldp_rpc_problem branch from cc6ddc1 to 5f67f3e Compare April 2, 2025 08:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix LLDP neighbors detail retrieval on ASR9K devices
1 participant