Last active
January 15, 2019 22:24
-
-
Save spdkils/dd86d72868df78cba2d45432eab68684 to your computer and use it in GitHub Desktop.
TextFSM showcdpneighbordetail
This file contains hidden or 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
Value REMOTE_DEVICE_ID (.*) | |
Value List REMOTE_ENTRY_ADDRESSES (.*) | |
Value REMOTE_PLATFORM ([^,]+) | |
Value REMOTE_SYSTEM_CAPAB (.*) | |
Value LOCAL_INTERFACE ([^,]+) | |
Value REMOTE_PORT (.*) | |
Value REMOTE_HOLDTIME (\d+) | |
Value REMOTE_SYSTEM_VERSION (.+) | |
Value REMOTE_CDP_VERSION (.+) | |
Value REMOTE_DUPLEX (.+) | |
Value List REMOTE_MGMT_ADDRESSES (.*) | |
Start | |
# A line of hyphens delimits neighbor records | |
^------+ -> Record | |
^Device ID\s*[:-]\s+${REMOTE_DEVICE_ID} | |
^Entry address\(es\)\s*[:-] -> Entry | |
Description | |
# Capture the entire line and go back to Neighbor state | |
^${REMOTE_SYSTEM_VERSION} -> Entry | |
Entry | |
^.*IP address[:-]\s*${REMOTE_ENTRY_ADDRESSES} | |
^Platform\s*[:-]\s+${REMOTE_PLATFORM}\s*?Capabilities\s*[:-]\s+${REMOTE_SYSTEM_CAPAB}\s | |
^Interface\s*[:-]\s+${LOCAL_INTERFACE}\s*?Port ID \(outgoing port\)\s*?[:-]\s+${REMOTE_PORT} | |
^Holdtime\s*[:-]\s+${REMOTE_HOLDTIME} | |
^Version\s*: -> Description | |
^advertisement version\s*?[:-]\s+${REMOTE_CDP_VERSION} | |
^Duplex\s*[:-]\s*${REMOTE_DUPLEX} | |
^Management address\(es\): -> Bottom | |
^------+ -> Record Start | |
Bottom | |
^.*IP address[:-]\s*${REMOTE_MGMT_ADDRESSES} | |
^------+ -> Record Start |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment