Skip to content

Commit

Permalink
New Template - EOS - show vrf (#524)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcgill298 authored Oct 30, 2019
1 parent d37f6ae commit f1f1678
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 0 deletions.
20 changes: 20 additions & 0 deletions templates/arista_eos_show_vrf.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Value VRF (\S+)
Value RD (\d\S+|<.+>)

Start
^\s+Vrf\s+RD\s+Protocols\s+State\s+Interfaces -> VRF
^Maximum
^\s*$$
^. -> Error

VRF
^\s+${VRF}\s+${RD} -> Record
# Match second line with Status e.x. v6:routing
^\s+\S+:\S+
# Match multiline interface with last line having a single interface
^\s+\S+\s*$$
# Match multilin interface with multiple interfaces on the line
^(?:\s+\S+?,){1,5}(?:\s+\S+)?\s*$$
^\s*-+\s+-+
^\s*$$
^. -> Error
1 change: 1 addition & 0 deletions templates/index
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ arista_eos_show_clock.template, .*, arista_eos, sh[[ow]] clo[[ck]]
arista_eos_dir_flash.template, .*, arista_eos, dir fl[[ash:]]
arista_eos_show_mlag.template, .*, arista_eos, sh[[ow]] ml[[ag]]
arista_eos_show_vlan.template, .*, arista_eos, sh[[ow]] vl[[an]]
arista_eos_show_vrf.template, .*, arista_eos, sh[[ow]] vrf

aruba_os_show_ipv6_interface_brief.template, .*, aruba_os, sh[[ow]] ipv6 in[[terface]] b[[rief]]
aruba_os_show_ip_interface_brief.template, .*, aruba_os, sh[[ow]] ip in[[terface]] b[[rief]]
Expand Down
12 changes: 12 additions & 0 deletions tests/arista_eos/show_vrf/arista_eos_show_vrf.parsed
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
parsed_sample:
- vrf: "blue"
rd: "10.125.253.15:1"
- vrf: "green"
rd: "<not set>"
- vrf: "yellow"
rd: '10.125.253.15:4'
- vrf: "red"
rd: "10.125.253.15:6"
- vrf: "black"
rd: "999:999"
14 changes: 14 additions & 0 deletions tests/arista_eos/show_vrf/arista_eos_show_vrf.raw
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
Vrf RD Protocols State Interfaces
--------- -------- --------------- ----------- ----------
blue 10.125.253.15:1 ipv4,ipv6 v4:routing, Vlan1006, Vlan2230, Vlan2231,
v6:no routing Vlan2232, Vlan2233, Vlan2234,
Vlan2235, Vlan2236, Vlan2237,
Vlan2238, Vlan2239, Vlan2240
green <not set> ipv4,ipv6 v4:routing, Vlan1015, Vlan1016, Vlan1017,
v6:no routing Vlan1018, Vlan1019, Vlan1020,
Vlan1021
yellow 10.125.253.15:4 ipv4,ipv6 v4:routing, Vlan1009
v6:no routing
red 10.125.253.15:6 ipv4,ipv6 v4:routing,
v6:no routing
black 999:999 ipv4,ipv6 v4:no routing Management1

0 comments on commit f1f1678

Please sign in to comment.