fix(rest-api): keep ExpectedMachine BMC IPs synchronized#3701
Conversation
REST's `ExpectedMachine` view now follows BMC IP changes made directly through Core on the normal inventory pass. Setting, changing, or clearing an address no longer needs a same-value REST PATCH to update the REST view. Primary callouts are: - `UpdateExpectedMachinesInDB` now passes `BmcIpAddress` through Core-originated creates and includes it in existing-record comparisons. - Core-reported addresses use `ExpectedMachineDAO.Update`; removals use `ExpectedMachineDAO.Clear`, with the clear and accompanying update sharing one per-machine transaction. - Tests cover create, set, change, clear, preservation of the REST-only `Name`, and rollback when the accompanying update fails. Tests added! This supports NVIDIA#3696 Signed-off-by: Chet Nichols III <chetn@nvidia.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (2)
Summary by CodeRabbit
Walkthrough
ChangesExpectedMachine BMC IP reconciliation
Estimated code review effort: 3 (Moderate) | ~20 minutes Possibly related issues
Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
|
@coderabbitai full_review, thanks! |
|
🐇🔍 ✅ Action performedFull review finished. |
🔐 TruffleHog Secret Scan✅ No secrets or credentials found! Your code has been scanned for 700+ types of secrets and credentials. All clear! 🎉 🕐 Last updated: 2026-07-17 22:52:47 UTC | Commit: e6996ab |
REST's
ExpectedMachineview now follows BMC IP changes made directly through Core on the normal inventory pass. Setting, changing, or clearing an address no longer needs a same-value REST PATCH to update the REST view.Primary callouts are:
UpdateExpectedMachinesInDBnow passesBmcIpAddressthrough Core-originated creates and includes it in existing-record comparisons.ExpectedMachineDAO.Update; removals useExpectedMachineDAO.Clear, with the clear and accompanying update sharing one per-machine transaction.Name, and rollback when the accompanying update fails.Tests added!
This supports #3696