Closed bugdealer closed 7 years ago
Hi @bugdealer - get_lldp_neighbors
and get_lldp_neighbors_detail
work very different (that's a very special case on Juniper). Also from the CLI, if you need to details you need to execute show lldp neighbors interface <interface name>
.
This is the request failing in that case. Would you be able to provide the output of show lldp neighbors interface <interface name> | display xml rpc
(any interface lldp enabled)? Thanks!
Hi @mirceaulinic, the output is
show lldp neighbors interface xe-0/0/3 | display xml rpc
<rpc-reply xmlns:junos="http://xml.juniper.net/junos/14.1X53/junos">
<rpc>
<get-lldp-interface-neighbors-information>
<interface-name>xe-0/0/3.0</interface-name>
</get-lldp-interface-neighbors-information>
</rpc>
<cli>
<banner></banner>
</cli>
</rpc-reply>
Hi, @mirceaulinic according to https://apps.juniper.net/xmlapi/operTags.jsp (Junos 13.1 and later)
and https://www.juniper.net/documentation/en_US/junos12.3/information-products/topic-collections/junos-xml-ref-oper/index.html (Junos 12.3)
get lldp neighbor by interface rpc for EX Series, QFX Series, J Series and SRX Series would always be get-lldp-interface-neighbors-information
, and rpc for M, MX, and T Series would always be get-lldp-interface-neighbors
Bug fixed and tested on MX, QFX and EX devices.
Will create pull request and please help approve.
Found out some older JunOS release(11.4R7 in my case ) does not support get-lldp-interface-neighbors-information
rpc...
How can we support such devices?
Hi @bugdealer - If if doesn't support get-lldp-interface-neighbors-information
, what's the RPC in that case?
show lldp neighbors interface xe-0/0/38.0 | display xml rpc
<rpc-reply xmlns:junos="http://xml.juniper.net/junos/11.4R7/junos">
<message>
xml rpc equivalent of this command is not available.
</message>
<cli>
<banner>{master:0}</banner>
</cli>
</rpc-reply>
@mirceaulinic :(
guess we can call napalm cli
api and manually parse text output to corresponding return format
Yea, that's bad... we can't do more than that so let's use the cli
method.
Description of Issue/Question
I was tryring out
get_lldp_neighbors_detail
API on a Juniper EX switch but got following error. I also triedget_lldp_neighbors
and it works fine. It seems like a PyEz problem but I'm not sure of that.Did you follow the steps from https://github.com/napalm-automation/napalm#faq
[x ] Yes [ ] No
Setup
napalm-junos version
(Paste verbatim output from
pip freeze | grep napalm-junos
between quotes below)JunOS version
(Paste verbatim output from
show version and haiku
between quotes below)Error Traceback
(Paste the complete traceback of the exception between quotes below)