Skip to content

Commit

Permalink
Enhancement - IOS - show mac-address - add data validation and tests (n…
Browse files Browse the repository at this point in the history
  • Loading branch information
jmcgill298 authored and thomasblass committed Oct 25, 2020
1 parent c64aa07 commit 7845852
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 3 deletions.
22 changes: 21 additions & 1 deletion templates/cisco_ios_show_mac-address-table.template
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,32 @@ Start

TYPE1
^${DESTINATION_ADDRESS}\s+${TYPE}\s+${VLAN}\s+${DESTINATION_PORT} -> Record
^-+\s+-+
^Displaying\s+entries
^Destination\s+Address\s+Address\s+Type\s+VLAN\s+Destination\s+Port
^\s*$$
^. -> Error

TYPE2
^[\*|\s]\s+${VLAN}\s+${DESTINATION_ADDRESS}\s+${TYPE}\s+\S+\s+\S+\s+${DESTINATION_PORT} -> Record
^[\*|\s]\s*${VLAN}\s+${DESTINATION_ADDRESS}\s+${TYPE}\s+\S+\s+\S+\s+${DESTINATION_PORT} -> Record
^-+\+-+
^Displaying\s+entries
^\s+vlan\s+mac address\s+type\s+learn\s+age\s+ports
^\s*$$
^. -> Error

TYPE3
^\s*${VLAN}\s+${DESTINATION_ADDRESS}\s+${TYPE}\s+\S+\s+${DESTINATION_PORT} -> Record
^-+\+-+
^Displaying\s+entries
^\s+vlan\s+mac address\s+type\s+protocols\s+port
^\s*$$
^. -> Error

TYPE4
^\s*${VLAN}\s+${DESTINATION_ADDRESS}\s+${TYPE}\s+${DESTINATION_PORT} -> Record
^-+\s+-+
^Displaying\s+entries
^Vlan\s+Mac Address\s+Type\s+Ports
^\s*$$
^. -> Error
Original file line number Diff line number Diff line change
Expand Up @@ -41,3 +41,7 @@ parsed_sample:
type: dynamic
vlan: '669'

- destination_address: 30a3.30a3.5a22
destination_port: Te3/20
type: dynamic
vlan: '2000'
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ Legend: * - primary entry
667 30a3.30a3.daf5 dynamic Yes 0 Te3/20
668 30a3.30a3.e401 dynamic Yes 600 Po6
669 30a3.30a3.5a22 dynamic Yes 300 Te3/20

2000 30a3.30a3.5a22 dynamic Yes 300 Te3/20
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,7 @@ parsed_sample:
type: dynamic
vlan: '99'

- destination_address: 30a3.30a3.a1ca
destination_port: "Port-channel1"
type: dynamic
vlan: '2000'
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ Unicast Entries
99 30a3.30a3.a1c8 dynamic ip,ipx,assigned,other Port-channel1
99 30a3.30a3.a1c9 dynamic ip,ipx,assigned,other Port-channel1
99 30a3.30a3.a1ca dynamic ip,ipx,assigned,other Port-channel1
2000 30a3.30a3.a1ca dynamic ip,ipx,assigned,other Port-channel1
Original file line number Diff line number Diff line change
Expand Up @@ -82,3 +82,8 @@ parsed_sample:
type: DYNAMIC
vlan: '99'

- destination_address: 30a3.30a3.a1cd
destination_port: Po6
type: DYNAMIC
vlan: '2000'

Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ Vlan Mac Address Type Ports
99 30a3.30a3.a1cb DYNAMIC Te1/1/3
99 30a3.30a3.a1cc STATIC Vl99
99 30a3.30a3.a1cd DYNAMIC Po6

2000 30a3.30a3.a1cd DYNAMIC Po6

0 comments on commit 7845852

Please sign in to comment.