-
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
Fixed regex for fortinet bgp template and added new template standards #592
Conversation
@@ -1,9 +1,15 @@ | |||
Value BGP_NEIGH (\d+?\.\d+?\.\d+?\.\d+?) | |||
Value NEIGH_AS (\d+) | |||
Value UP_DOWN (\w+) | |||
Value UP_DOWN ((?:\w|:)*) |
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.
Would it be worth it to change to \S+ to capture anything non-whitespace? This should hopefully prevent us from having to worry too much about any format changes for it.
Value STATE_PFXRCD (\w+) | ||
|
||
Start | ||
^BGP router identifier.*$$ |
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.
Do you mind changing the static spaces to \s+?
@FragmentedPacket, thank you for your feedback. I have made the requested changes. Please let me know if there's anything else that may need improvement. |
@ccorvese Thanks for another contribution! |
ISSUE TYPE
COMPONENT
fortinet_fortios_get_router_info_bgp_summary.textfsm
Fortinet FortiOS
get router info bgp summary
SUMMARY
This fixes an issue with some of the output returned from the
get router info bgp summary
command onfortinet fortios
. Sometimes time returned output from the device has ":" in the UP_DOWN portion (i.e. 05:48:47). The previous regex did not account for the ":" character. I have updated that with this PRAdditionally, I have updated the template to account for all potential lines of output from the command, finishing on an error state if a line is presented without a regex match.