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":