Closed jamesboswell closed 6 years ago
We can probably do either optics['input_power'].replace(' ', '')
in line 1879 or add a second constant. Do you want to try and submit a PR?
@dbarrosop #521 submitted. I put the replace before the intf_optics
dict, and only if input_power
is a str
I've changed my proposed fix to a new constant instead of a str replace, see #521
Description of Issue/Question
get_optics
fails on some JUNOS versions, including 12.3 and 11.4 (admittedly < 12.1 supported).This is due to a simple space inserted in the output for Infinite light levels.
A simple change to L61 in constants.py to add a space fixes this issue in my environment. However, I realize this may not be universally true.
_Perhaps this should be a regex instead of list membership tests in junos.py?_
Local workaround
Did you follow the steps from https://github.com/napalm-automation/napalm#faq
[X] Yes [ ] No
napalm version
(Paste verbatim output from
pip freeze | grep napalm
between quotes below)Network device software version
(Paste verbatim output from
show version
(or equivalent on your platform) between quotes below)Steps to Reproduce the Issue
Call
get_optics
on a JUNOS MX960 running 12.3R2.5Juniper CLI OUTPUT
Error Traceback
(Paste the complete traceback of the exception between quotes below)
Trace captured