cisco_nxos_show_ip_bgp does not account for status empty
Closed this issue · 0 comments
chuckysap commented
ISSUE TYPE
- Template Issue with error and raw data
- Bug Report with the library
- Feature - This is only relevant to the library, not templates
- Documentation Report
TEMPLATE USING
Value STATUS ([bceEisS*>#?])
Value PATH_SELECTION ([bceEisS*>#? ])
Value ROUTE_SOURCE ([bceEisS*>#? ])
Value NETWORK (\S+)
Value NEXT_HOP (\S+)
Value METRIC (\S+)
Value LOCAL_PREF (\S+)
Value WEIGHT (\S+)
Value AS_PATH (.*?)
Value ORIGIN ([ie\?])
Start
# Since using mostly position, play it safe and ensure we see header first
^AS Path Attributes.+ -> Bgp_table
Bgp_table
# Example:
# * 0.0.0.0/0 100.100.10.226 0 350 0 65000 65000 65000 64810 64800 i
^\s${STATUS}${PATH_SELECTION}${ROUTE_SOURCE}\s+${NETWORK}\s+${NEXT_HOP}\s+${METRIC}\s+${LOCAL_PREF}\s+${WEIGHT}\s+${AS_PATH}\s+${ORIGIN}$$ -> Record
EOF
SAMPLE COMMAND OUTPUT
n/a
SUMMARY
When the status is empty on an entry in the BGP table, that entry/prefix is missed in the output of the template.
STEPS TO REPRODUCE
When there is no status as shown below in prefix (2.2.2.2/32), that line is not matched.
Network Next Hop Metric LocPrf Weight Path
l0.0.0.0/0 0.0.0.0 100 32768 i
- i 10.1.2.8 10000 0 27565 101 i
- i 14.10.1.3 10000 0 27565 101 i
*>e 1.2.6.2 10000 0 27565 101 i
l2.2.2.2/32 0.0.0.0 3000 100 32768 i
EXPECTED RESULTS
Prefix 2.2.2.2/32 (above) should be matched on and returned.
ACTUAL RESULTS
Prefix 2.2.2.2/32 is skipped.