Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Handle out-of-bound case where IOS splits lines #168

Closed
wants to merge 4 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions templates/cisco_ios_show_cdp_neighbors.template
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
Value NEIGHBOR (\S+)
Value LOCAL_INTERFACE (\S+\s\S+)
Value CAPABILITY ([\w\s]+?)
Value CAPABILITY (([A-Za-z]\s)*?[A-Za-z]?)
Value PLATFORM (\S+\s\S+|\S+)
Value NEIGHBOR_INTERFACE (\S+\s\S+)

Start
^Device.*ID -> CDP

CDP
^${NEIGHBOR}\s+${LOCAL_INTERFACE}\s+\d+\s+${CAPABILITY}\s{2}\s+${PLATFORM}\s+${NEIGHBOR_INTERFACE} -> Record
^${NEIGHBOR}$$ -> CDP2
^${NEIGHBOR}\s+${LOCAL_INTERFACE}\s+\d+\s+${CAPABILITY}\s\s+${PLATFORM}\s+${NEIGHBOR_INTERFACE} -> Record

CDP2
^\s+${LOCAL_INTERFACE}\s+\d+\s+${CAPABILITY}\s\s+${PLATFORM}\s+${NEIGHBOR_INTERFACE} -> Record CDP