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

Fixed regex for fortinet bgp template and added new template standards #592

Merged
merged 2 commits into from
Feb 9, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions templates/fortinet_fortios_get_router_info_bgp_summary.textfsm
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
Value BGP_NEIGH (\d+?\.\d+?\.\d+?\.\d+?)
Value NEIGH_AS (\d+)
Value UP_DOWN (\w+)
Value UP_DOWN (\S+)
Value STATE_PFXRCD (\w+)

Start
^BGP\s+router\s+identifier\s+\d+?\.\d+?\.\d+?\.\d+?,\s+local\s+AS\s+number\s+\d+\s*$$
^BGP\s+table\s+version\s+is\s+\d+?$$
^\d+\s+BGP\s+AS-PATH\s+entries\s*$$
^\d+\s+BGP\s+community\s+entries\s*$$
^Neighbor\s+V\s+AS\s+MsgRcvd\s+MsgSent\s+TblVer\s+InQ\s+OutQ\s+Up\/Down\s+State\/PfxRcd.*$$
^${BGP_NEIGH}\s+\S+\s+${NEIGH_AS}(?:\s+\S+\s+){5}${UP_DOWN}\s+${STATE_PFXRCD}\s*$$ -> Record

EOF
^Total number\s+of\s+neighbors\s+\d*\s*$$
^\s*$$
^. -> Error
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ BGP table version is 13

Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
10.204.35.84 4 65302 43173 43182 0 0 0 09w3d01h Active
10.205.35.95 4 65302 107081 107168 12 0 0 04w5d09h 1
10.205.35.95 4 65302 107081 107168 12 0 0 05:48:47 1
169.132.250.17 4 4224 0 0 0 0 0 never Idle
169.132.250.21 4 4224 0 0 0 0 0 never Idle

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ parsed_sample:
- bgp_neigh: "10.205.35.95"
neigh_as: "65302"
state_pfxrcd: "1"
up_down: "04w5d09h"
up_down: "05:48:47"
- bgp_neigh: "169.132.250.17"
neigh_as: "4224"
state_pfxrcd: "Idle"
Expand Down