Skip to content

Conversation

jamiereid
Copy link

Description

Resolves #723

Adjust regex to include the ap neighbor IP as it is output on 9800 platform v17.x

Motivation and Context

The parser fails as it's not able to match when the ap cdp neighbor IP is in the same line as the other information.

@jamiereid jamiereid requested a review from a team as a code owner June 11, 2025 07:19
@jamiereid jamiereid requested review from ThomasJRyan and Taarini June 11, 2025 07:19
Copy link
Collaborator

@ThomasJRyan ThomasJRyan left a comment

Choose a reason for hiding this comment

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

Thank you for your contribution.

A few things

  1. Please include a unittest for this change. You can find existing unittests for this parser here

  2. While I won't hold it against you, since you're updating this parser anyways I would appreciate if you could update line 1152 from Optional("neighbor_ip_addresses"): list to Optional("neighbor_ip_addresses"): ListOf(str) as it's a bit out of date for what we expect from a parser these days

@jamiereid
Copy link
Author

Thank you @ThomasJRyan, and apologies for the delay in response. I have pushed some additional commits that (hopefully correctly) addresses your feedback. Please let me know :)

@jamiereid jamiereid requested a review from ThomasJRyan June 17, 2025 04:12
@ThomasJRyan
Copy link
Collaborator

Looks like your changes are causing existing unittests to fail.

image

This will need to be fixed up before we can merge. You can run the unittests locally by going into the tests folder and running the folder_parsing_job.py file

@jamiereid
Copy link
Author

Apologies for the delay in replying. I fully intend to get this fixed up so it can be merged. Thank you for the tip on how to run the tests locally!, I hadn't spend enough time to figure that out yet.

@jamiereid
Copy link
Author

I've looked into these most recent failures a little more but it's not clear to me the fix.

When I run the tests "directly" by changing into the tests directory and executing python folder_parsing_job.py they complete and all pass. Digging further into the way github is setup to run the tests though, I see it runs them through pyats pyats run job folder_parsing_job.py --no-mail --no-archive. This is failing locally for me as well, with the same VersionConflict error as github.

pkg_resources.VersionConflict: (genie.libs.parser 25.5 (/home/runner/work/genieparser/genieparser/src), Requirement.parse('genie.libs.parser<25.7.0,>=25.6.0'))

Are you able to advise, @ThomasJRyan?

Copy link
Contributor

@Taarini Taarini left a comment

Choose a reason for hiding this comment

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

Your branch is not up to date with main. Please merge with the latest.

Resolves CiscoTestAutomation#723

Adjust regex to include the ap neighbor IP as it is output on 9800
platform v17.x
@jamiereid
Copy link
Author

jamiereid commented Sep 10, 2025

rebased on top of main (dc5e9db).

created a clean venv using python 3.12.6
pip installed pyats[full]
ran make develop

pyats run job folder_parsing_job.py --no-mail --no-archive still fails with

pkg_resources.VersionConflict: (genie.libs.parser 25.8 (/home/user/src/genieparser/src), Requirement.parse('genie.libs.parser<25.6.0,>=25.5.0'))

cd into tests, running python folder_parsing_job.py all tests pass.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

iosxe - show ap cdp neighbor not working
3 participants