fix(python): request cluster name field in cluster_info#43
Merged
hvinn merged 1 commit intoMay 22, 2026
Merged
Conversation
|
Test Report missing or unfilled. This PR touches This is a soft gate - your CI checks are unaffected - but reviewers will not approve until the report is filled in. |
There was a problem hiding this comment.
Thanks for your first PR to Pace — welcome aboard.
Quick orientation:
- CI runs in ~2 minutes. If anything fails, check the Actions tab — most failures have a one-line fix in
docs/troubleshooting.md. - If your PR touches
python/,ansible/, orterraform/, you'll be asked for a Test Report. It's worth the effort — reviewers rely on it. - Make sure the NetApp CCLA is on file before review.
- Stuck? Comment on this PR and a maintainer will jump in. We aim to respond as soon as possible.
For background, see CONTRIBUTING.md.
hvinn
approved these changes
May 22, 2026
The /cluster GET requested only fields=version, so ONTAP omitted name from the response and the script logged 'Cluster: unknown'. Include name alongside version so the cluster identity prints correctly.
4c82ff2 to
8884ae9
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The /cluster GET requested only fields=version, so ONTAP omitted name from the response and the script logged 'Cluster: unknown'. Include name alongside version so the cluster identity prints correctly.
Summary
python/cluster_info.pywas loggingCluster: unknownfor every clusterbecause the
/clusterGET requested only theversionfield. ONTAP'sREST API returns only the fields listed in
?fields=...(plus a minimaldefault set), so
namewas absent from the response and the.get("name", "unknown")fallback kicked in.Change
Request both fields:
Before
After
Why
The script reads
cluster["name"]andcluster["version"]["full"], soboth keys must be listed in the
fieldsselector. This is the standardONTAP REST pattern — projection is opt-in to keep payloads small.
Testing
python python/cluster_info.pyagainst a 2-node ONTAP 9.19.1simulator; cluster name now renders correctly.
make lintpasses (ruff check + format).Risk
Minimal — single-line change to a read-only example script. No public
API or behaviour change beyond the corrected log line.
Checklist
make lintpasses