Skip to content

fix: admin cli: display Associated Switch in ew show#2280

Open
sydneyl-nvidia wants to merge 2 commits into
NVIDIA:mainfrom
sydneyl-nvidia:sydneyl/ew_associated_switch
Open

fix: admin cli: display Associated Switch in ew show#2280
sydneyl-nvidia wants to merge 2 commits into
NVIDIA:mainfrom
sydneyl-nvidia:sydneyl/ew_associated_switch

Conversation

@sydneyl-nvidia
Copy link
Copy Markdown
Contributor

forge-admin-cli ew show (expected-switch show) will show "Unlinked" as Associated Machine for every expected switch in normal circumstances, even when switches are fully discovered and ingested. This is due to a CLI lookup bug.

Root cause is the code that determines the content of Associated Machine is trying to lookup machines with a bmc MAC, and this will never return a thing. We should be looking up switches instead with this mac.

Also, changing the label from Associated Machine to Associated Switch since it is more accurate label for what is being displayed.

Description

Type of Change

  • Add - New feature or capability
  • Change - Changes in existing functionality
  • Fix - Bug fixes
  • Remove - Removed features or deprecated functionality
  • Internal - Internal changes (refactoring, tests, docs, etc.)

Related Issues (Optional)

Breaking Changes

  • This PR contains breaking changes

Testing

  • Unit tests added/updated
  • Integration tests added/updated
  • Manual testing performed
  • No testing required (docs, internal refactor, etc.)

Additional Notes

forge-admin-cli ew show (expected-switch show) will show "Unlinked" as Associated Machine for
every expected switch in normal circumstances, even when switches are fully discovered and
ingested. This is due to a CLI lookup bug.

Root cause is the code that determines the content of Associated Machine is trying to lookup
machines with a bmc MAC, and this will never return a thing. We should be looking up switches
instead with this mac.

Also, changing the label from Associated Machine to Associated Switch since it is more accurate
label for what is being displayed.

Signed-off-by: Syd Logan <sydneyl@nvidia.com>
@sydneyl-nvidia sydneyl-nvidia requested a review from a team as a code owner June 6, 2026 00:43
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jun 6, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 1cc96bbe-1ac4-4b8d-a26b-658bb7653a31

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands and usage tips.

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