Estimated time
20-25 minutes
Exact files to change
python/cluster_info.py (add a Step 3 block after the existing nodes loop)
python/README.md (the Cluster Info example output block)
Expected outcome
After listing nodes, the script also lists each aggregate fetched from
GET /storage/aggregates?fields=name,state,space.block_storage. Each row
shows aggregate name, state, and used percentage. README example output
is updated to match.
How to test
cd python
python cluster_info.py
Output ends with an Aggregates in cluster: N line followed by one row per
aggregate showing name, state, and used %.
ONTAP concepts touched
Aggregate. See docs/ontap-in-5-minutes.md#aggregate.
Hints / gotchas
Mirror the existing nodes loop. The path is /storage/aggregates. The
space-used percentage is space.block_storage.used / space.block_storage.size * 100.
Handle missing fields with .get(..., 0) to avoid KeyError on empty aggregates.
Estimated time
20-25 minutes
Exact files to change
python/cluster_info.py(add a Step 3 block after the existing nodes loop)python/README.md(the Cluster Info example output block)Expected outcome
After listing nodes, the script also lists each aggregate fetched from
GET /storage/aggregates?fields=name,state,space.block_storage. Each rowshows aggregate name, state, and used percentage. README example output
is updated to match.
How to test
cd python python cluster_info.pyOutput ends with an
Aggregates in cluster: Nline followed by one row peraggregate showing name, state, and used %.
ONTAP concepts touched
Aggregate. See docs/ontap-in-5-minutes.md#aggregate.
Hints / gotchas
Mirror the existing nodes loop. The path is
/storage/aggregates. Thespace-used percentage is
space.block_storage.used / space.block_storage.size * 100.Handle missing fields with
.get(..., 0)to avoid KeyError on empty aggregates.