feat(site-explorer): create switches and power shelves by default#3276
feat(site-explorer): create switches and power shelves by default#3276chet wants to merge 1 commit into
Conversation
Explored switches and power shelves that match an `expected_switch` / `expected_power_shelf` record are now ingested out of the box, the same way machines already are -- `create_switches`, `create_power_shelves`, and `explore_power_shelves_from_static_ip` default to true instead of false. The expected-hardware records remain the per-device gate, so these defaults only ever ingest hardware an operator has declared, and the flags stay available as site-wide kill switches. Primary callouts are: - The three `[site_explorer]` creation defaults flip to true, matching `create_machines` (which has defaulted to true all along). - The two default paths now agree by construction: `Default::default()` delegates to the serde default fns, and `SiteExplorerConfig`'s `PartialEq` now compares every field so the `site_explorer_serde_defaults_match_core_defaults` test genuinely enforces the agreement. Previously a config with no `[site_explorer]` section at all ran with these flags on while a config with the section got false -- and the parity test couldn't see it because `PartialEq` skipped the creation flags. - Site explorer now says why nothing was created: an info log when explored switches / power shelves are skipped because the creation flag is off, and a per-endpoint log when an explored switch has no `expected_switch` record (power shelves and machines already logged this case). - Docs follow: the configurability book page and the config reference README record the new defaults, plus a stale `explore_mode` default in the reference (it said `libredfish`; the code default is `nv-redfish`). Upgrade note: a site that declares `expected_switch` / `expected_power_shelf` records but never set the creation flags starts ingesting that declared hardware on upgrade. Setting the flags to false keeps ingestion off, exactly as before. Tests added! This supports NVIDIA#3152 Signed-off-by: Chet Nichols III <chetn@nvidia.com>
|
@coderabbitai full_review, thanks! |
|
Warning Review limit reached
Next review available in: 4 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (6)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
🐇✨ ✅ Action performedFull review finished. Your plan includes PR reviews subject to rate limits. More reviews will be available in 4 minutes. |
🔍 Container Scan Summary
Per-CVE detail lives in the per-service |
Note: This will go in after #3280 gets merged.
Explored switches and power shelves that match an
expected_switch/expected_power_shelfrecord are now ingested out of the box, the same way machines already are --create_switches,create_power_shelves, andexplore_power_shelves_from_static_ipdefault to true instead of false. The expected-hardware records remain the per-device gate, so these defaults only ever ingest hardware an operator has declared, and the flags stay available as site-wide kill switches.Primary callouts are:
[site_explorer]creation defaults flip to true, matchingcreate_machines(which has defaulted to true all along).Default::default()delegates to the serde default fns, andSiteExplorerConfig'sPartialEqnow compares every field so thesite_explorer_serde_defaults_match_core_defaultstest genuinely enforces the agreement. Previously a config with no[site_explorer]section at all ran with these flags on while a config with the section got false -- and the parity test couldn't see it becausePartialEqskipped the creation flags.expected_switchrecord (power shelves and machines already logged this case).explore_modedefault in the reference (it saidlibredfish; the code default isnv-redfish).Upgrade note: a site that declares
expected_switch/expected_power_shelfrecords but never set the creation flags starts ingesting that declared hardware on upgrade. Setting the flags to false keeps ingestion off, exactly as before.Tests added!
This supports #3152