Skip to content

Parse disconnected cables in IOS XE stack-port detail output - #1011

Open
mangeshraut712 wants to merge 2 commits into
CiscoTestAutomation:mainfrom
mangeshraut712:fix/iosxe-stack-port-no-cable
Open

mangeshraut712 wants to merge 2 commits into
CiscoTestAutomation:mainfrom
mangeshraut712:fix/iosxe-stack-port-no-cable

Conversation

@mangeshraut712

Copy link
Copy Markdown

Fixes #996. On a disconnected stack port, IOS XE can report Cable Length No cable Neighbor NONE. The previous match expected a single word for the cable length and skipped the entire line. Capture the length up to the Neighbor field. The fixture covers the disconnected case alongside existing numeric length and neighbor values.

Before the change the updated fixture failed. On the patched revision the repository’s full IOS XE file-based suite passed all 8,585 tests with zero errors. The tests used recorded CLI output and did not require a switch.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 29, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-29T11:15:35.206140Z 57178ef PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@mangeshraut712

Copy link
Copy Markdown
Author

Follow-up at 7714853: I checked a synthetic variant of the disconnected stack-port fixture with additional padding after Cable Length and Neighbor. At 57178ef the parser omitted the cable fields. The updated match accepts that padding and returns the same unpadded field values.

I ran ShowSwitchStackPortsDetail.cli directly on the original and padded fixture and compared the full JSON-shaped result against the expected fixture. Both passed after the fix. This was a focused parser check with a stand-in schema base, without a switch. The earlier full IOS XE run in the PR description was on the previous head.

@mangeshraut712

Copy link
Copy Markdown
Author

Full IOS XE follow-up on 7714853: I ran the repository's pyATS file-based runner with Python 3.11 and the iosxe filter (python tests/folder_parsing_job.py -o iosxe, with PYTHONPATH pointing at this checkout's src). All 8,585 fixtures passed, with zero failures and zero errors. The run includes the padded ShowSwitchStackPortsDetail fixture and used recorded CLI output without a switch.

@Sripadvallabh Sripadvallabh left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Reviewed the current changes and repository context; no blocking findings.

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.

"show switch stack-ports detail" not accounting for No Cable Scenario

2 participants