-
Notifications
You must be signed in to change notification settings - Fork 735
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
cisco_ios_show_interfaces_description.textfsm fails to parse #866
Comments
@itdependsnetworks @jmcgill298 can you please help |
It appears the command is in the output you're providing the parse_output command. What does your merino code look like for this call? |
|
@sakabio, to better debug add print(show_int_desc) before parse_output my guess is that the command is included in show_int_desc e.g. "show interface description" and this is tripping up textfsm. |
You either want to strip command and strip prompt to true or remove them from the output prior via regex or string manipulation |
@FragmentedPacket thanks this worked like a charm. |
ISSUE TYPE
TEMPLATE USING
SAMPLE COMMAND OUTPUT
SUMMARY
Parser does not work when the data is passed to it.
textfsm.parser.TextFSMError: State Error raised. Rule Line: 12. Input Line: show interfaces description
show_int_desc_parsed = parse_output(platform="cisco_ios", command="show interfaces description", data=show_int_desc)
STEPS TO REPRODUCE
Connect to cisco device using Netmiko and run the command "show interfaces description" and pass the output into parse_output
EXPECTED RESULTS
Using textfsm=True should return a JSON data structure
ACTUAL RESULTS
The text was updated successfully, but these errors were encountered: