homelabby/internal/netbox
Mikkel Georgsen 1f9621fcaa feat(01-04): quality gate state machine, tag sync, catalog updater
- CatalogStatus type with forward-only state machine (draft→indexed→…→complete)
- Transition() enforces valid transitions, returns error with 'invalid transition' message
- ParseCatalogStatus() validates known status strings
- HardwareRecord domain type composing netbox.Device with quality gate state
- CatalogUpdater.UpdateCatalogStatus() validates transition then PatchCustomFields
- SyncTags() normalizes tags (slug form) and ensures they exist in NetBox
- normalizeTags deduplicates across case/whitespace/space-vs-hyphen variants
- ensureTag uses go-netbox v4 NewTagRequest(name, slug) / ExtrasTagsCreate
- All 12 state machine table-driven tests pass
2026-04-10 05:22:22 +00:00
..
client.go feat(01-02): NetBox client wrapper with device CRUD (NB-01) 2026-04-10 05:16:17 +00:00
client_test.go feat(01-02): NetBox client wrapper with device CRUD (NB-01) 2026-04-10 05:16:17 +00:00
custom_fields.go feat(01-02): custom field read/write wrappers (NB-02) 2026-04-10 05:17:11 +00:00
custom_fields_test.go feat(01-02): custom field read/write wrappers (NB-02) 2026-04-10 05:17:11 +00:00
hwid.go feat(01-04): HW-XXXXX sequential ID allocation 2026-04-10 05:20:41 +00:00
hwid_test.go feat(01-04): HW-XXXXX sequential ID allocation 2026-04-10 05:20:41 +00:00
tags.go feat(01-04): quality gate state machine, tag sync, catalog updater 2026-04-10 05:22:22 +00:00
tags_test.go feat(01-04): quality gate state machine, tag sync, catalog updater 2026-04-10 05:22:22 +00:00
types.go feat(01-02): NetBox client wrapper with device CRUD (NB-01) 2026-04-10 05:16:17 +00:00