-
Notifications
You must be signed in to change notification settings - Fork 742
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
ping template for Cisco IOS XR devices #1564
ping template for Cisco IOS XR devices #1564
Conversation
Added a ping template for Cisco IOS XR devices. These devices begin the ping output with an extra line with a timestamp. That line would fail if testes against the cisco_ios_ping.textfsm template
Please add test cases and update the index. |
I don't know how to properly test the templates, I apprecciate any directions. What I did was validating against https://textfsm.nornir.tech/ Also I did a collection of input files with ping outputs for each case (success, fail, unreachable, quench and mix) and a small program that test these inputs against a given template, The ping output command in Cisco IOS XR devices starts with a timestamp on the first line, so cisco_ios_ping.textfsm would fail to test these outputs, like this: PS C:\python> python .\test_template.py I modified slightly the template to use with IOS XR devices. below are the bodies of the input files, the program and the outputs, first with the unmodified template cisco_xr_ping.textfsm and next with the modified template cisco_xr_ping_xr_mod.textfsm. Let me know if this is enough. ping_xr_success.txt: ping_xr_fail.txt: ping_xr_unreachable.txt: ping_xr_quench.txt: ping_xr_mix.txt:
Testing with the original template: PS C:\python> python .\test_template.py Testing with the modified template: PS C:\python> python .\test_template.py Printing input file ping_xr_fail.txt Printing input file ping_xr_unreachable.txt Printing input file ping_xr_quench.txt Printing input file ping_xr_mix.txt PS C:\python> |
Added U and Q response to RESPONSE STREAM Cisco has four valid outputs for ping: . (fail) ! (success) U (unreachable) Q (quench) U and Q where missing. Testing an output that carried these values would generate an error.
Added a ping template for Cisco IOS XR devices. These devices begin the ping output with an extra line with a timestamp. That line would fail if tested against the cisco_ios_ping.textfsm template
Added test cases (yml and raw fles) and updated index in jorlandobr-patch-3 |
Testes nos branchs master e patch33
Added U and Q response to RESPONSE STREAM Cisco has four valid outputs for ping: . (fail) ! (success) U (unreachable) Q (quench) U and Q were missing. Testing an output that carried these values would generate an error.
Added U and Q response to RESPONSE STREAM Cisco has four valid outputs for ping: . (fail) ! (success) U (unreachable) Q (quench) U and Q were missing. Testing an output that carried these values would generate an error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes applied.
LGTM ,TY |
Added a ping template for Cisco IOS XR devices. These devices begin the ping output with an extra line with a timestamp. That line would fail if tested against the cisco_ios_ping.textfsm template