Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 14 additions & 1 deletion napalm/iosxr/iosxr.py
Original file line number Diff line number Diff line change
Expand Up @@ -879,7 +879,20 @@ def get_lldp_neighbors_detail(self, interface=""):
"</Operational></Get>"
)

result_tree = ETREE.fromstring(self.device.make_rpc_call(rpc_command))
try:
result_tree = ETREE.fromstring(self.device.make_rpc_call(rpc_command))
except napalm.pyIOSXR.exceptions.XMLCLIError:
logger.info(
"Attempting more specific ASR9K rpc call for LLDP neighbors query"
)
rpc_command = (
"<Get><Operational>"
"<LLDP><NodeTable><Node><Naming><NodeName>"
"<Rack>0</Rack><Slot>0</Slot><Instance>CPU0</Instance>"
"</NodeName></Naming></Node></NodeTable></LLDP>"
"</Operational></Get>"
)
result_tree = ETREE.fromstring(self.device.make_rpc_call(rpc_command))

for neighbor in result_tree.xpath(".//Neighbors/DetailTable/Detail/Entry"):
interface_name = napalm.base.helpers.convert(
Expand Down