Skip to content

Update cisco_ios_show_interface_link.textfsm #2128

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

Conversation

Malvin3197
Copy link
Contributor

@Malvin3197 Malvin3197 commented May 8, 2025

Issue: "State Error raised. Rule Line: 32. Input Line: Te1/0/1 1y1w"

Fix:
Make "d" character optional.
Example:
Port Name Down Time Up Time
Te1/0/1 1y1w
Te1/0/2 1y1w
Te1/0/3 1y1w

image

@mjbear
Copy link
Collaborator

mjbear commented May 8, 2025

@Malvin3197
Thank you for your pull request!

We also need test data added to this PR. Do not replace the existing test data, but it is ok to either add to an existing file OR in some cases it is better to add a new file.

As long as you put the raw data in the correct spot, you can use helper scripts to generate the structured data (yaml).

The test data is necessary so that we can make sure the template is backwards compatible in the future when more changes are needed.

🎯 Please respond back if there are any questions. Thank you!

@mjbear mjbear added status: action required This issue requires additional information to be actionable WIP Work in Progress labels May 8, 2025
Make "d" character optional.
Example:
Port           Name               Down Time      Up Time
Te1/0/1                           1y1w
Te1/0/2                           1y1w
Te1/0/3                           1y1w

added tests

update to allow #y#w format

updated uptime also
@Malvin3197 Malvin3197 force-pushed the update_cisco_ios_show_interface_link_day_optional branch from cb01025 to d2ceac9 Compare May 9, 2025 05:01
@Malvin3197
Copy link
Contributor Author

Hi @mjbear , Test Data added.

Also ran tests locally and passed.
image

Thank you so much for the help!

mjbear added 2 commits May 9, 2025 13:53
The square brackets are not needed for the optional pattern
since there is only a single optional character within them.
@mjbear mjbear removed the status: action required This issue requires additional information to be actionable label May 16, 2025
@mjbear
Copy link
Collaborator

mjbear commented Jun 9, 2025

I walked back on my thought about a separate PR. Since the couple of refactors are simple they can land in this PR.

  • change the optional s regex
  • remove the downtime 00:00:00 since it can be matched with an existing numeric regex

@mjbear mjbear removed the WIP Work in Progress label Jun 12, 2025
@mjbear mjbear merged commit 1104753 into networktocode:master Jun 24, 2025
10 checks passed
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.

2 participants