-
Notifications
You must be signed in to change notification settings - Fork 563
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
get_network_instances
does not return expected results
#1922
Comments
Per docs, we still support back to 4.15F, which does not have the JSON version of "show vrf". We'd have to have a deeper discussion to break that backwards compatibility / promise, and most likely target a major release for it. It might make more sense just to treat the VRF output as a variable fixed-width table, and parse the width of each column by looking at the dasher line, rather than relying on regexes. |
I have a working fixed-width parser, but it's breaking on https://github.com/napalm-automation/napalm/blob/develop/test/eos/mocked_data/test_get_network_instances/issue-509/show_vrf.text |
Wow, the output is even weirder in newer cEOS deploys:
|
Gross. Is it worth approaching the use of a text parser vs. the json parser similar to how the cli selector is deterministic based on the software version running on the box? |
Ugh. I'd prefer not to use a |
At least |
Originally posted by @bewing in #1919 (comment)
So a couple of things going on here, I think.
get_network_instances()
output differs from what is expected:I don't know for sure, but I suspect newer versions of EOS have changed the formatting of the
show vrfs
such thattextfsm_extractor()
templates aren't catching on.However, newer versions of EOS support
json
encoding forshow vrf
now, which could make these differences easier to deal with (and is the output I included above, not the text version).napalm/napalm/eos/eos.py
Lines 2121 to 2185 in cb4845c
The text was updated successfully, but these errors were encountered: