Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Issue 415 cdp #480

Merged
merged 16 commits into from
Oct 23, 2019
Merged

Issue 415 cdp #480

merged 16 commits into from
Oct 23, 2019

Conversation

mullaneywt
Copy link
Contributor

ISSUE TYPE
  • Bugfix Pull Request
COMPONENT

cisco_ios_show_cdp_neighbors

SUMMARY

@bouchardh reported a problem in issue #415 that CDP was not being handled correctly if the platform does not have a space in it. In some cases the platform will have a - instead of a space, or otherwise be a single word. This fixed #415 with new regular expressions.

New templates are added to existing ones to ensure that the old use cases still return the correct results.

@mullaneywt mullaneywt marked this pull request as ready for review October 1, 2019 08:43
AP000000001 Gig 1/0/46 173 T B I AIR-CAP35 Gig 0
WAAS0000000 Gig 1/0/1 138 T OE474 InlinePort 1/1/lan
WAAS0000000 Gig 1/0/40 138 H OE474 Gig 1/0
router.domain.local
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I assume these should be on the same line?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was looking at something else and noticed this may be the way the output is provided back. We would need to account for this within the template to make sure the data is what we need.

I will find the example and post it back, but I think it may have been a similar template to this, but different OS.

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

^\s+${LOCAL_INTERFACE}\s+\d+\s+${CAPABILITY}\s*?${PLATFORM}\s+${NEIGHBOR_INTERFACE} -> Record
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you change from \s+ to \s* for L12? If you look at the line with router.domain.local, it isn't captured properly.

After that, I think everything looks good to go.

@mullaneywt
Copy link
Contributor Author

mullaneywt commented Oct 17, 2019 via email

Copy link
Contributor

@jmcgill298 jmcgill298 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the BugFix

@jmcgill298 jmcgill298 merged commit 12a0bb3 into networktocode:master Oct 23, 2019
thomasblass pushed a commit to thomasblass/ntc-templates that referenced this pull request Oct 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug changes_requested Waiting on user to address feedback Internal Review Requested
Projects
None yet
Development

Successfully merging this pull request may close these issues.

wrong info returned when not space between interface name and number from show cdp neighbor
3 participants