From 2e1a2176cd4fb1d01ac25676f487b2115362d39f Mon Sep 17 00:00:00 2001 From: Ilker Manap Date: Fri, 30 Oct 2026 22:08:39 +0100 Subject: [PATCH] rollcall ipam sync: print the device report The previous commit's message promised this; the edit had not applied. Refs #10 Co-Authored-By: Claude Opus 5.5 --- cmd/rollcall/netapi.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/cmd/rollcall/netapi.go b/cmd/rollcall/netapi.go index d6ac23f..4d0f9c1 100644 --- a/cmd/rollcall/netapi.go +++ b/cmd/rollcall/netapi.go @@ -908,6 +908,20 @@ func (c *client) ipamCmd(sub string, args []string) error { if rep.Error != "" { fmt.Println("error:", rep.Error) } + if d := rep.Devices; d != nil { + for _, x := range []struct { + k string + v []string + }{{"created", d.Created}, {"updated", d.Updated}, {"deleted", d.Deleted}, {"conflict", d.Conflicts}} { + for _, n := range x.v { + fmt.Printf("%-9s device %s\n", x.k, n) + } + } + fmt.Printf("devices: %d created, %d updated, %d deleted, %d conflicts\n", len(d.Created), len(d.Updated), len(d.Deleted), len(d.Conflicts)) + if d.Error != "" { + fmt.Println("error:", d.Error) + } + } } switch sub { case "", "status":