rollcall ipam sync: print the device report
CI / agent (push) Successful in 3s
CI / site (push) Successful in 3s
CI / go (push) Successful in 42s

The previous commit's message promised this; the edit had not applied.

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:08:39 +01:00
1 parent c3032683ab
commit 2e1a2176cd
1 file changed
+14
+14
View File
@@ -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":