Skip to content

Commit

Permalink
New Template: cisco_nxos_show_ip_adjacency (#704)
Browse files Browse the repository at this point in the history
  • Loading branch information
Yakuza-UA authored May 21, 2020
1 parent d9fc3c7 commit 034b7fc
Show file tree
Hide file tree
Showing 4 changed files with 93 additions and 0 deletions.
27 changes: 27 additions & 0 deletions templates/cisco_nxos_show_ip_adjacency.textfsm
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
Value Required IPADDRESS (\S+)
Value Required MAC (\S+)
Value Required PREF (\d+)
Value Required SOURCE (\S+)
Value Required INTERFACE (\S+)
# Flags:
# # - Adjacencies Throttled for Glean
# G - Adjacencies of vPC peer with G/W bit
Value FLAGS ([G#]*)

Start
# Ignore headers
^.*?-\s+Adjacencies
^IP\s+Adjacency\s+Table
^Total\s+number\s+of\s+entries:
# Jump to a list of entries:
^Address\s+MAC\s+Address\s+Pref\s+Source\s+Interface -> Entries
# Process empty and unknown lines
^\s*$$
^. -> Error

Entries
# Entry with optional flags
^${IPADDRESS}\s+${MAC}\s+${PREF}\s+${SOURCE}\s+${INTERFACE}\s*${FLAGS}$$ -> Record
# Process empty and unknown lines
^\s*$$
^. -> Error
1 change: 1 addition & 0 deletions templates/index
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,7 @@ cisco_nxos_show_processes_cpu.textfsm, .*, cisco_nxos, sh[[ow]] proc[[esses]] c[
cisco_nxos_show_vrf_interface.textfsm, .*, cisco_nxos, sh[[ow]] vrf int[[erface]]
cisco_nxos_show_access-lists.textfsm, .*, cisco_nxos, sh[[ow]] acc[[ess-lists]]
cisco_nxos_show_environments.textfsm, .*, cisco_nxos, sh[[ow]] envi[[ronments]]
cisco_nxos_show_ip_adjacency.textfsm, .*, cisco_nxos, sh[[ow]] ip ad[[jacency]]
cisco_nxos_show_interface.textfsm, .*, cisco_nxos, sh[[ow]] inte[[rface]]
cisco_nxos_show_inventory.textfsm, .*, cisco_nxos, sh[[ow]] inv[[entory]]
cisco_nxos_show_route-map.textfsm, .*, cisco_nxos, sh[[ow]] route-m[[ap]]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@

Flags: # - Adjacencies Throttled for Glean
G - Adjacencies of vPC peer with G/W bit

IP Adjacency Table for VRF default
Total number of entries: 8
Address MAC Address Pref Source Interface
10.110.100.142 002a.6a11.62c1 50 arp Vlan1800 G
10.110.100.178 78bc.1af1.ca61 50 arp Vlan1801
10.110.100.179 002a.6a11.62c1 50 arp Vlan1801 G
10.100.1.22 002a.6a11.62c1 50 arp Vlan10 G
10.100.1.24 0040.9d99.f6f6 50 arp Vlan10
10.100.150.3 0050.5694.bb20 50 arp Vlan150
10.100.150.5 002a.6a11.62c1 50 arp Vlan150 G
10.100.150.6 0050.568c.2110 50 arp Vlan150
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
---
parsed_sample:
- ipaddress: "10.110.100.142"
mac: "002a.6a11.62c1"
pref: "50"
source: "arp"
interface: "Vlan1800"
flags: "G"
- ipaddress: "10.110.100.178"
mac: "78bc.1af1.ca61"
pref: "50"
source: "arp"
interface: "Vlan1801"
flags: ""
- ipaddress: "10.110.100.179"
mac: "002a.6a11.62c1"
pref: "50"
source: "arp"
interface: "Vlan1801"
flags: "G"
- ipaddress: "10.100.1.22"
mac: "002a.6a11.62c1"
pref: "50"
source: "arp"
interface: "Vlan10"
flags: "G"
- ipaddress: "10.100.1.24"
mac: "0040.9d99.f6f6"
pref: "50"
source: "arp"
interface: "Vlan10"
flags: ""
- ipaddress: "10.100.150.3"
mac: "0050.5694.bb20"
pref: "50"
source: "arp"
interface: "Vlan150"
flags: ""
- ipaddress: "10.100.150.5"
mac: "002a.6a11.62c1"
pref: "50"
source: "arp"
interface: "Vlan150"
flags: "G"
- ipaddress: "10.100.150.6"
mac: "0050.568c.2110"
pref: "50"
source: "arp"
interface: "Vlan150"
flags: ""

0 comments on commit 034b7fc

Please sign in to comment.