Skip to content

Commit

Permalink
Added suggested fixes and reorganized a bit for consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
kwrobert committed Jan 29, 2020
1 parent b74858b commit f67d05c
Show file tree
Hide file tree
Showing 5 changed files with 1,249 additions and 117 deletions.
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
Value NEIGHBOR_IP (\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})
Value NEIGHBOR (\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})
Value REMOTE_AS (\d+)
Value PEER_GROUP (\w+)
Value REMOTE_ROUTER_ID (\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})
Value BGP_STATE (\w+)
Value LOCAL_HOST (\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})
Value LOCAL_PORT (\d+)
Value FOREIGN_HOST (\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})
Value FOREIGN_PORT (\d+)
Value LOCALHOST_IP (\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})
Value LOCALHOST_PORT (\d+)
Value REMOTE_IP (\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3})
Value REMOTE_PORT (\d+)

Start
# Capture first line, which shows the BGP neighor and remote AS number
^BGP\s+neighbor\s+is\s+${NEIGHBOR_IP},\s+remote\s+AS\s+${REMOTE_AS} -> Bgp_neighbor
^BGP\s+neighbor\s+is -> Continue.Record
^BGP\s+neighbor\s+is\s+${NEIGHBOR},\s+remote\s+AS\s+${REMOTE_AS} -> Bgp_neighbor

Bgp_neighbor
# Capture BGP peer group
Expand All @@ -28,9 +29,9 @@ Bgp_neighbor
#
# Match local host and port
# Example: 'Local host: 10.10.255.13, Local port: 39443'
^Local\s+host:\s+${LOCAL_HOST},\s+Local\s+port:\s+${LOCAL_PORT}
^Local\s+host:\s+${LOCALHOST_IP},\s+Local\s+port:\s+${LOCALHOST_PORT}
#
# Match local host and port
# Example: 'Local host: 10.10.255.13, Local port: 39443'
^Foreign\s+host:\s+${FOREIGN_HOST},\s+Foreign\s+port:\s+${FOREIGN_PORT} -> Next.Record Start
^Foreign\s+host:\s+${REMOTE_IP},\s+Foreign\s+port:\s+${REMOTE_PORT} -> Start
#^.+ -> Error
2 changes: 1 addition & 1 deletion templates/index
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ cisco_ios_show_mac-address-table.textfsm, .*, cisco_ios, sh[[ow]] m[[ac-address-
cisco_ios_show_ip_ospf_database.textfsm, .*, cisco_ios, sh[[ow]] ip ospf data[[base]]
cisco_ios_show_ip_ospf_neighbor.textfsm, .*, cisco_ios, sh[[ow]] ip ospf nei[[ghbor]]
cisco_ios_show_ip_access-lists.textfsm, .*, cisco_ios, sh[[ow]] ip acce[[ss-lists]]
cisco_ios_show_ip_bgp_neighbor.textfsm, .*, cisco_ios, sh[[ow]] ip bgp nei[[ghbor]]
cisco_ios_show_ip_bgp_neighbors.textfsm, .*, cisco_ios, sh[[ow]] ip bgp nei[[ghbors]]
cisco_ios_show_power_available.textfsm, .*, cisco_ios, sh[[ow]] pow[[er]] a[[vailable]]
cisco_ios_show_ip_bgp_summary.textfsm, .*, cisco_ios, sh[[ow]] ip bgp sum[[mary]]
cisco_ios_show_ip_prefix-list.textfsm, .*, cisco_ios, sh[[ow]] ip pre[[fix-list]]
Expand Down

This file was deleted.

This file was deleted.

Loading

0 comments on commit f67d05c

Please sign in to comment.