Skip to content
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

cRPD JSON formatting doesn't work #1208

Open
topranks opened this issue Sep 11, 2022 · 0 comments
Open

cRPD JSON formatting doesn't work #1208

topranks opened this issue Sep 11, 2022 · 0 comments

Comments

@topranks
Copy link

topranks commented Sep 11, 2022

Hi,

This is less an issue with PyEz and more with cRPD, however I am only trial user so I do not think I can report issue to JTAC for cRPD.

Problem is fairly simple. cRPD (I am using trial version 19.4R1.10) returns the following for facts.get("version_info"):

junos.version_info(major=(0, 0), type=I, minor=0, build=0)

This value is used by device.py here, to determine if the JunOS version is recent enough to support JSON formatting. Because crpd returns 0 for the version info the 'if' evaluates to false, so the JSON commands are skipped and we get this error:

/usr/local/lib/python3.9/dist-packages/junos_eznc-2.6.5-py3.9.egg/jnpr/junos/device.py:886: RuntimeWarning: Native JSON support is only from 14.2 onwards
  warnings.warn(

I'm just messing with this in the lab, so it's easy enough for make a small change to devices.py to force it to work. It might be worth incorporating such a work-around at this point for crpd, or possibly ask the crpd dev team to fix the problem whereby the version_info returns with zeros.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants