8000 Populate source field in -unique aggregated output · Issue #13 · dominikzorgnotti/esx-hcl-check · GitHub
[go: up one dir, main page]

Skip to content

Populate source field in -unique aggregated output #13

Closed

Description

@dominikzorgnotti

Summary

In -unique mode, aggregateUnique collapses all hosts into one synthetic HostComponents and fills placeholder values for datacenter/cluster/hostname, but leaves source empty — so omitempty drops the field and the aggregated output is inconsistent with per-host output (which does carry source).

Fix

  • Collect the set of distinct source values across all scanned hosts, sort them, and join with ", "
  • Set that as the source of the aggregated result
  • Single vCenter -> "vcsa.example.com"; multi-vCenter -> "vc1.example.com, vc2.example.com"

Non-breaking: only populates a field that was previously absent. Also future-proofs the multi-vCenter roadmap (#13/#next).

Acceptance criteria

  • -unique -json output includes a populated source field
  • With a single vCenter it shows that host; the value is deterministic (sorted)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      0