forked from networktocode/ntc-templates
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bugfix: DESTINATION to list and account for Eth1/1 format - arista_eo…
…s_show_mac_address-table.textfsm (networktocode#756)
- Loading branch information
Showing
3 changed files
with
109 additions
and
29 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 |
---|---|---|
@@ -1,10 +1,40 @@ | ||
Value MAC_ADDRESS (\w+?\.\w+?\.\w+?|\w+?\:\w+?\:\w+?\:\w+?\:\w+?\:\w+?) | ||
Value TYPE (\w+?) | ||
Value VLAN (\d+?) | ||
Value DESTINATION_PORT (\w+\s\w+\s\w+\s\w+|\w+\s\w+\s\w+|\w+\s\w+|\w+?) | ||
Value MOVES (\d+?) | ||
Value MAC_ADDRESS (\w+\.\w+\.\w+|\w+\:\w+\:\w+\:\w+\:\w+\:\w+) | ||
Value TYPE (\w+) | ||
Value VLAN (\d+) | ||
Value List DESTINATION_PORT ((\w+\/\w+)|\w+) | ||
Value MOVES (\d+) | ||
Value LAST_MOVE (.+) | ||
|
||
Start | ||
^\s*${VLAN}\s+?${MAC_ADDRESS}\s+?${TYPE}\s+?${DESTINATION_PORT}\s+?${MOVES}\s+${LAST_MOVE}\sago$$ -> Record | ||
^\s*${VLAN}\s+?${MAC_ADDRESS}\s+?${TYPE}\s+?${DESTINATION_PORT}$$ -> Record | ||
^\s*Vlan\s+(M|m)ac\sAddress\s+Type\s+Ports\s+Moves\s+Last\sMove\s*$$ -> MAT | ||
^\s*Vlan\s+(M|m)ac\sAddress\s+Type\s+Ports\s*$$ -> MMAT | ||
^\s*$$ | ||
^\s*(M|m)ac\sAddress\sTable\s*$$ | ||
^\s*Multicast\s(M|m)ac\sAddress\sTable\s*$$ | ||
^-*$$ | ||
# ^(-*\s*)*$$ | ||
^. -> Error | ||
|
||
MAT | ||
# capture the mac address table | ||
^\s*${VLAN}\s+${MAC_ADDRESS}\s+${TYPE}\s+${DESTINATION_PORT}\s*$$ -> Record | ||
^\s*${VLAN}\s+${MAC_ADDRESS}\s+${TYPE}\s+${DESTINATION_PORT}\s+${MOVES}\s+${LAST_MOVE}\sago$$ -> Record | ||
^\s*Total\s+mac -> Start | ||
^\s*-+\s+.*-*$$ | ||
^\s*$$ | ||
^. -> Error | ||
|
||
MMAT | ||
# capture the multicast mac address table | ||
# key on the record | ||
^\s*\d+\s+(\w+\.\w+\.\w+|\w+\:\w+\:\w+\:\w+\:\w+\:\w+)\s+\w+\s*.*$$ -> Continue.Record | ||
# match the record with one to five destination ports more. | ||
^\s*${VLAN}\s+${MAC_ADDRESS}\s+${TYPE}\s+${DESTINATION_PORT}$$ -> Record | ||
^\s*${VLAN}\s+${MAC_ADDRESS}\s+${TYPE}\s+${DESTINATION_PORT}\s -> Continue | ||
^\s*\d+\s+(\w+\.\w+\.\w+|\w+\:\w+\:\w+\:\w+\:\w+\:\w+)\s+\w+\s+((\w+\/\w+|\w+)\s){1}${DESTINATION_PORT}\s* -> Continue | ||
^\s*\d+\s+(\w+\.\w+\.\w+|\w+\:\w+\:\w+\:\w+\:\w+\:\w+)\s+\w+\s+((\w+\/\w+|\w+)\s){2}${DESTINATION_PORT}\s* -> Continue | ||
^\s*\d+\s+(\w+\.\w+\.\w+|\w+\:\w+\:\w+\:\w+\:\w+\:\w+)\s+\w+\s+((\w+\/\w+|\w+)\s){3}${DESTINATION_PORT}\s* -> Continue | ||
^\s*\d+\s+(\w+\.\w+\.\w+|\w+\:\w+\:\w+\:\w+\:\w+\:\w+)\s+\w+\s+((\w+\/\w+|\w+)\s){4}${DESTINATION_PORT}$$ -> Continue | ||
^\s*Total\s+mac -> Start | ||
^\s*-+\s+.*-*$$ | ||
^\s*$$ |
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
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