Skip to content

feat(python): list aggregates in cluster_info output#52

Open
KrP77 wants to merge 1 commit into
NetApp:mainfrom
KrP77:feature/list-aggregates-cluster-info
Open

feat(python): list aggregates in cluster_info output#52
KrP77 wants to merge 1 commit into
NetApp:mainfrom
KrP77:feature/list-aggregates-cluster-info

Conversation

@KrP77
Copy link
Copy Markdown

@KrP77 KrP77 commented May 30, 2026

Summary

Extend the Python cluster_info.py example to retrieve and display aggregate information in addition to cluster version and node details.

This provides a more complete cluster overview by including aggregate state and capacity utilization while keeping the example read-only.

Changes

  • Added a third API call to GET /storage/aggregates
  • Display aggregate name, state, and used capacity percentage
  • Handle missing aggregate capacity values safely to avoid division-by-zero errors
  • Updated cluster_info.py documentation and workflow steps
  • Updated python/README.md to document aggregate output

Checklist

General

  • No secrets, credentials, or API tokens in code or config
  • Updated catalog.yaml and tool README

If touching python/

  • Scripts compile (python -m py_compile python/*.py)
  • Lint passes (ruff check python/)

Test Report

Environment: Not available
Platform version: Not tested
Style touched:

First run

$ ruff check python/
All checks passed!

Idempotency / re-run

The example is read-only and does not modify cluster state. Re-running the script is expected to retrieve and display the current cluster, node, and aggregate information without side effects.

Cleanup / teardown

No cleanup required. The example performs read-only API operations.

Cannot run on a cluster?

I do not currently have access to an ONTAP cluster or simulator to perform end-to-end validation.

The change was validated locally using Ruff linting. A maintainer with cluster access may perform runtime verification if required.

Related issues

Fixes #34

@KrP77 KrP77 requested a review from hvinn as a code owner May 30, 2026 04:16
@github-actions
Copy link
Copy Markdown

Test Report looks present - thanks. Reviewers will verify the captured output and idempotency evidence.

@github-actions github-actions Bot added python Pull requests that update python code docs labels May 30, 2026
Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

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

Thanks for your first PR to Pace — welcome aboard.

Quick orientation:

  1. CI runs in ~2 minutes. If anything fails, check the Actions tab — most failures have a one-line fix in docs/troubleshooting.md.
  2. If your PR touches python/, ansible/, or terraform/, you'll be asked for a Test Report. It's worth the effort — reviewers rely on it.
  3. Make sure the NetApp CCLA is on file before review.
  4. Stuck? Comment on this PR and a maintainer will jump in. We aim to respond as soon as possible.

For background, see CONTRIBUTING.md.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs python Pull requests that update python code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[good-first-issue] List aggregates in cluster_info.py output

1 participant