Location changes kick the IPAM reconcile
CI / agent (push) Successful in 3s
CI / site (push) Successful in 2s
CI / go (push) Successful in 42s

A machine's NetBox device follows a move at once, not at the next pass.

Refs #10

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Ilker ManapandClaude Opus 5.5 committed 2026-10-30 22:11:38 +01:00
1 parent 2e1a2176cd
commit dc6eb55b26
1 file changed
+2
+2
View File
@@ -136,6 +136,7 @@ func (a *App) handleLocation(w http.ResponseWriter, r *http.Request) {
_ = a.store.AddEvent(r.Context(), m.ID, "location", l.String())
m, _ = a.store.Get(r.Context(), m.ID)
a.retag(r.Context(), []*Machine{m}) // rules may look at the rack
a.kickIPAM() // the NetBox device follows (ipam.device_sync)
writeJSON(w, 200, obj{"id": m.ID, "location": m.Location})
}
@@ -302,6 +303,7 @@ func (a *App) handleLocationImport(w http.ResponseWriter, r *http.Request) {
}
if !dry {
a.retag(r.Context(), nil)
a.kickIPAM()
}
if matched == nil {
matched = []obj{}