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

Cisco NXoS template for "show forwarding ipv4 route" #489

Merged
merged 4 commits into from
Oct 14, 2019
Merged
Show file tree
Hide file tree
Changes from 2 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
22 changes: 22 additions & 0 deletions templates/cisco_nxos_show_forwarding_ipv4_route.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
Value PREFIX (\d+\.\d+\.\d+\.+\d+\/\d+)
Value Required,List NEXTHOP (Drop|Receive|Attached|\d+\.\d+\.\d+\.\d+)
Value List INTERFACE (\S+)

Start
^Prefix.*Partial\s+Install\s*$$ -> FIB
nnaukwal marked this conversation as resolved.
Show resolved Hide resolved

FIB
# Start Record on encountering a Prefix, don't substitute any values yet
^\*?(\d+\.\d+\.\d+\.+\d+\/\d+) -> Continue.Record
# Match lines with all Values present, some entries can start with * (for multiple entries in RIB, one in FIB prefixes)
^\*?${PREFIX}\s+${NEXTHOP}\s+${INTERFACE}\s*$$
# Match lines which do not have an interface, strange but can exists
^\*?${PREFIX}\s+${NEXTHOP}\s*$$
# Match lines which have Nexthop and interface, and fill in the list; these are for prefixes which have multiple equal cost paths
^\s+${NEXTHOP}\s+${INTERFACE}\s*$$
# Match other lines before erroring out on unknown input lines
^\s*$$
^[-+]*$$
^. -> Error

EOF
1 change: 1 addition & 0 deletions templates/index
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ cisco_nxos_show_l2rib_internal_permanently-frozen-list.template, .*, cisco_nxos,
cisco_nxos_show_configuration_session_summary.template, .*, cisco_nxos, sh[[ow]] configu[[ration]] s[[ession]] su[[mmary]]
cisco_nxos_show_interface_transceiver_details.template, .*, cisco_nxos, sh[[ow]] int[[erface]] tra[[nsceiver]] de[[tails]]
cisco_nxos_show_environment_temperature.template, .*, cisco_nxos, sh[[ow]] env[[ironment]] t[[emperature]]
cisco_nxos_show_forwarding_ipv4_route.template, .*, cisco_nxos, sh[[ow]] fo[[rwarding]] ipv4 ro[[ute]]
cisco_nxos_show_interfaces_switchport.template, .*, cisco_nxos, sh[[ow]] int[[erfaces]] sw[[itchport]]
cisco_nxos_show_ip_dhcp_relay_address.template, .*, cisco_nxos, sh[[ow]] ip dh[[cp]] r[[elay]] a[[ddress]]
cisco_nxos_show_lldp_neighbors_detail.template, .*, cisco_nxos, sh[[ow]] ll[[dp]] nei[[ghbors]] d[[etail]]
Expand Down
Loading