Estimated time
10-15 minutes
Exact files to change
python/cluster_info.py (the cluster info logging block)
Expected outcome
The cluster log line additionally prints contact=<contact> and
location=<location>, taken from
GET /cluster?fields=version,contact,location. Empty values display as
the em-dash placeholder — (already used elsewhere in the script).
How to test
cd python
python cluster_info.py
The cluster line includes contact= and location= segments. If those
fields are not set on the cluster, both show — rather than crashing.
ONTAP concepts touched
Cluster. See docs/ontap-in-5-minutes.md#cluster.
Hints / gotchas
Single-file change, ~5 lines of code. Just extend the fields= argument
on the existing client.get("/cluster", ...) call and add two more
cluster.get(...) lookups with "—" defaults.
Estimated time
10-15 minutes
Exact files to change
python/cluster_info.py(the cluster info logging block)Expected outcome
The cluster log line additionally prints
contact=<contact>andlocation=<location>, taken fromGET /cluster?fields=version,contact,location. Empty values display asthe em-dash placeholder
—(already used elsewhere in the script).How to test
cd python python cluster_info.pyThe cluster line includes
contact=andlocation=segments. If thosefields are not set on the cluster, both show
—rather than crashing.ONTAP concepts touched
Cluster. See docs/ontap-in-5-minutes.md#cluster.
Hints / gotchas
Single-file change, ~5 lines of code. Just extend the
fields=argumenton the existing
client.get("/cluster", ...)call and add two morecluster.get(...)lookups with"—"defaults.