Declare openings and a refusal-only guard on an adopted node in place of the filter (hq ADR 0100)

This commit is contained in:
2026-09-22 17:21:44 +02:00
parent a86a6c2974
commit c3b1617693
6 changed files with 526 additions and 13 deletions
+2 -6
View File
@@ -41,16 +41,12 @@ func (s sendable) Body() ([]byte, error) {
}
// adoptionOf is the envelope for a node, nil when it is converged.
func adoptionOf(ctx context.Context, inv *inventory.Inventory, node string,
func adoptionOf(ctx context.Context, inv *inventory.Inventory, record inventory.Node,
plan catalogue.Resolution, composed catalogue.Composed) (*adoptionEnvelope, error) {
record, err := inv.NodeByName(ctx, node)
if err != nil {
return nil, err
}
if !record.Adopted {
return nil, nil
}
taken, err := inv.Taken(ctx, node)
taken, err := inv.Taken(ctx, record.Name)
if err != nil {
return nil, err
}