-
Notifications
You must be signed in to change notification settings - Fork 726
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New Template: cisco_nxos_show_forwarding_adjacency (#722)
- Loading branch information
Showing
8 changed files
with
482 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# Nexus 7k have multiple slots | ||
Value Filldown SLOT (\d+) | ||
Value Required NEXTHOP ((?:\d{1,3}\.){3}\d{1,3}) | ||
Value Required REWRITE (\S+) | ||
Value Required INTERFACE (\S+) | ||
Value ORIGIN_AS (\S+) | ||
Value PEER_AS (\S+) | ||
Value NEIGHBOR (\S+) | ||
|
||
Start | ||
# Extract slot #, if available (Nexus 7k) | ||
^slot\s+${SLOT} | ||
^==== | ||
# Match headers | ||
^IPv4\s+adjacency\s+information | ||
^next-hop\s+rewrite\s+info\s+interface\s*$$ -> Entries | ||
^next-hop\s+rewrite\s+info\s+interface\s+Origin\s+AS\s+Peer\s+AS\s+Neighbor -> EntriesDetail | ||
# Empty and unknowns lines | ||
^\s*$$ | ||
^. -> Error | ||
|
||
Entries | ||
# Ignore delimiter | ||
^-------- | ||
# Match single adjacency entry (brief view) | ||
^${NEXTHOP}\s+${REWRITE}\s+${INTERFACE} -> Record | ||
# New slot? | ||
^slot\s+${SLOT} -> Start | ||
# Empty and unknowns lines | ||
^\s*$$ | ||
^. -> Error | ||
|
||
EntriesDetail | ||
# Ignore delimiter | ||
^-------- | ||
# Match single adjacency entry (detailed view) | ||
^${NEXTHOP}\s+${REWRITE}\s+${INTERFACE}\s*(?:${ORIGIN_AS}\s+${PEER_AS}\s+${NEIGHBOR})? -> Record | ||
# New slot? | ||
^slot\s+${SLOT} -> Start | ||
# Empty and unknowns lines | ||
^\s*$$ | ||
^. -> Error |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
tests/cisco_nxos/show_forwarding_adjacency/cisco_nxos_show_forwarding_adjacency_1.raw
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
IPv4 adjacency information | ||
|
||
next-hop rewrite info interface Origin AS Peer AS Neighbor | ||
-------------- --------------- ------------- ---------- --------- -------------- | ||
10.111.1.3 cc16.7c1f.9852 Vlan10 | ||
10.111.1.4 cc16.7c1f.6900 Vlan10 | ||
10.111.1.5 84b8.025a.f786 Vlan10 | ||
10.111.1.6 a89d.2121.bc7b Vlan10 | ||
10.5.111.213 0050.528c.5b4c Vlan182 | ||
10.5.111.221 002a.6312.6ac1 Vlan182 | ||
10.111.254.6 002a.6312.6ac1 Vlan254 | ||
10.6.140.234 000e.b6b2.ff01 Ethernet1/16 | ||
10.6.140.238 54a2.72da.b651 Ethernet1/16 |
65 changes: 65 additions & 0 deletions
65
tests/cisco_nxos/show_forwarding_adjacency/cisco_nxos_show_forwarding_adjacency_1.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
--- | ||
parsed_sample: | ||
- slot: "" | ||
nexthop: "10.111.1.3" | ||
rewrite: "cc16.7c1f.9852" | ||
interface: "Vlan10" | ||
origin_as: "" | ||
peer_as: "" | ||
neighbor: "" | ||
- slot: "" | ||
nexthop: "10.111.1.4" | ||
rewrite: "cc16.7c1f.6900" | ||
interface: "Vlan10" | ||
origin_as: "" | ||
peer_as: "" | ||
neighbor: "" | ||
- slot: "" | ||
nexthop: "10.111.1.5" | ||
rewrite: "84b8.025a.f786" | ||
interface: "Vlan10" | ||
origin_as: "" | ||
peer_as: "" | ||
neighbor: "" | ||
- slot: "" | ||
nexthop: "10.111.1.6" | ||
rewrite: "a89d.2121.bc7b" | ||
interface: "Vlan10" | ||
origin_as: "" | ||
peer_as: "" | ||
neighbor: "" | ||
- slot: "" | ||
nexthop: "10.5.111.213" | ||
rewrite: "0050.528c.5b4c" | ||
interface: "Vlan182" | ||
origin_as: "" | ||
peer_as: "" | ||
neighbor: "" | ||
- slot: "" | ||
nexthop: "10.5.111.221" | ||
rewrite: "002a.6312.6ac1" | ||
interface: "Vlan182" | ||
origin_as: "" | ||
peer_as: "" | ||
neighbor: "" | ||
- slot: "" | ||
nexthop: "10.111.254.6" | ||
rewrite: "002a.6312.6ac1" | ||
interface: "Vlan254" | ||
origin_as: "" | ||
peer_as: "" | ||
neighbor: "" | ||
- slot: "" | ||
nexthop: "10.6.140.234" | ||
rewrite: "000e.b6b2.ff01" | ||
interface: "Ethernet1/16" | ||
origin_as: "" | ||
peer_as: "" | ||
neighbor: "" | ||
- slot: "" | ||
nexthop: "10.6.140.238" | ||
rewrite: "54a2.72da.b651" | ||
interface: "Ethernet1/16" | ||
origin_as: "" | ||
peer_as: "" | ||
neighbor: "" |
13 changes: 13 additions & 0 deletions
13
tests/cisco_nxos/show_forwarding_adjacency/cisco_nxos_show_forwarding_adjacency_2.raw
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
IPv4 adjacency information | ||
|
||
next-hop rewrite info interface | ||
-------------- --------------- ------------- | ||
10.111.1.3 cc16.7c1f.9852 Vlan10 | ||
10.111.1.4 cc16.7c1f.6900 Vlan10 | ||
10.111.1.5 84b8.025a.f786 Vlan10 | ||
10.111.1.6 a89d.2121.bc7b Vlan10 | ||
10.5.111.213 0050.528c.5b4c Vlan182 | ||
10.5.111.221 002a.6312.6ac1 Vlan182 | ||
10.111.254.6 002a.6312.6ac1 Vlan254 | ||
10.6.140.234 000e.b6b2.ff01 Ethernet1/16 | ||
10.6.140.238 54a2.72da.b651 Ethernet1/16 |
65 changes: 65 additions & 0 deletions
65
tests/cisco_nxos/show_forwarding_adjacency/cisco_nxos_show_forwarding_adjacency_2.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
--- | ||
parsed_sample: | ||
- slot: "" | ||
nexthop: "10.111.1.3" | ||
rewrite: "cc16.7c1f.9852" | ||
interface: "Vlan10" | ||
origin_as: "" | ||
peer_as: "" | ||
neighbor: "" | ||
- slot: "" | ||
nexthop: "10.111.1.4" | ||
rewrite: "cc16.7c1f.6900" | ||
interface: "Vlan10" | ||
origin_as: "" | ||
peer_as: "" | ||
neighbor: "" | ||
- slot: "" | ||
nexthop: "10.111.1.5" | ||
rewrite: "84b8.025a.f786" | ||
interface: "Vlan10" | ||
origin_as: "" | ||
peer_as: "" | ||
neighbor: "" | ||
- slot: "" | ||
nexthop: "10.111.1.6" | ||
rewrite: "a89d.2121.bc7b" | ||
interface: "Vlan10" | ||
origin_as: "" | ||
peer_as: "" | ||
neighbor: "" | ||
- slot: "" | ||
nexthop: "10.5.111.213" | ||
rewrite: "0050.528c.5b4c" | ||
interface: "Vlan182" | ||
origin_as: "" | ||
peer_as: "" | ||
neighbor: "" | ||
- slot: "" | ||
nexthop: "10.5.111.221" | ||
rewrite: "002a.6312.6ac1" | ||
interface: "Vlan182" | ||
origin_as: "" | ||
peer_as: "" | ||
neighbor: "" | ||
- slot: "" | ||
nexthop: "10.111.254.6" | ||
rewrite: "002a.6312.6ac1" | ||
interface: "Vlan254" | ||
origin_as: "" | ||
peer_as: "" | ||
neighbor: "" | ||
- slot: "" | ||
nexthop: "10.6.140.234" | ||
rewrite: "000e.b6b2.ff01" | ||
interface: "Ethernet1/16" | ||
origin_as: "" | ||
peer_as: "" | ||
neighbor: "" | ||
- slot: "" | ||
nexthop: "10.6.140.238" | ||
rewrite: "54a2.72da.b651" | ||
interface: "Ethernet1/16" | ||
origin_as: "" | ||
peer_as: "" | ||
neighbor: "" |
57 changes: 57 additions & 0 deletions
57
tests/cisco_nxos/show_forwarding_adjacency/cisco_nxos_show_forwarding_adjacency_3.raw
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
|
||
slot 1 | ||
======= | ||
|
||
|
||
IPv4 adjacency information | ||
|
||
next-hop rewrite info interface Origin AS Peer AS Neighbor | ||
-------------- --------------- ------------- ---------- --------- -------------- | ||
172.17.1.2 001c.b0c9.6b80 Ethernet1/1 | ||
100.120.0.2 00de.fb5a.2c47 Ethernet1/2 | ||
100.64.1.6 00a3.8eb7.6f29 Ethernet1/4 | ||
100.100.59.10 286f.7feb.1947 Ethernet1/7 | ||
100.111.0.2 00de.fb5a.2c46 Ethernet1/11 | ||
100.100.59.2 286f.7feb.1940 Ethernet1/14 | ||
100.89.1.6 b4de.3141.af12 Ethernet1/15 | ||
100.99.1.2 84b2.61d4.357f Ethernet1/22 | ||
100.99.1.10 2cab.eb4f.2f46 Ethernet1/23 | ||
100.100.59.14 00d7.8f7f.edcb Ethernet2/7 | ||
100.100.59.6 00d7.8f7f.edc4 Ethernet2/14 | ||
100.89.1.2 b4de.3141.af10 Ethernet2/15 | ||
100.126.255.2 00a3.d186.4141 Ethernet2/16 | ||
100.99.1.6 84b2.61d4.357f Ethernet2/22 | ||
100.99.1.14 2cab.eb4f.2f48 Ethernet2/23 | ||
100.127.253.1 00de.fb5a.2c45 Ethernet2/24 | ||
|
||
slot 2 | ||
======= | ||
|
||
|
||
IPv4 adjacency information | ||
|
||
next-hop rewrite info interface Origin AS Peer AS Neighbor | ||
-------------- --------------- ------------- ---------- --------- -------------- | ||
172.17.1.2 001c.b0c9.6b80 Ethernet1/1 | ||
100.120.0.2 00de.fb5a.2c47 Ethernet1/2 | ||
100.64.1.6 00a3.8eb7.6f29 Ethernet1/4 | ||
100.100.59.10 286f.7feb.1947 Ethernet1/7 | ||
100.111.0.2 00de.fb5a.2c46 Ethernet1/11 | ||
100.100.59.2 286f.7feb.1940 Ethernet1/14 | ||
100.89.1.6 b4de.3141.af12 Ethernet1/15 | ||
100.99.1.2 84b2.61d4.357f Ethernet1/22 | ||
100.99.1.10 2cab.eb4f.2f46 Ethernet1/23 | ||
100.100.59.14 00d7.8f7f.edcb Ethernet2/7 | ||
100.100.59.6 00d7.8f7f.edc4 Ethernet2/14 | ||
100.89.1.2 b4de.3141.af10 Ethernet2/15 | ||
100.126.255.2 00a3.d186.4141 Ethernet2/16 | ||
100.99.1.6 84b2.61d4.357f Ethernet2/22 | ||
100.99.1.14 2cab.eb4f.2f48 Ethernet2/23 | ||
100.127.253.1 00de.fb5a.2c45 Ethernet2/24 | ||
|
||
slot 5 | ||
======= | ||
|
||
|
||
slot 6 | ||
======= |
Oops, something went wrong.