Skip to content

[good-first-issue] Show cluster contact and location in cluster_info.py #36

@hvinn

Description

@hvinn

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions