Skip to content

fix(rest-api): keep ExpectedMachine BMC IPs synchronized #3696

Description

@chet

Keep REST's ExpectedMachine view in sync when a BMC IP is set, changed, or cleared directly through Core. The existing inventory reconciliation already treats Core as the source of truth, so REST should reflect the value on the next inventory pass without needing a same-value REST PATCH.

What this involves

  • Include BmcIpAddress when UpdateExpectedMachinesInDB creates an ExpectedMachine from Core inventory.
  • Compare and update the field for existing records, using ExpectedMachineDAO.Clear when Core reports no address because nil update inputs preserve the current value.
  • Cover create, set, change, and clear transitions in the ExpectedMachine workflow activity tests.
  • Keep the scope to BMC IP synchronization; broader inventory field parity can be handled separately.

Related to #3630.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Fields

No fields configured for Bug.

Projects

Status
In Progress

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions