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 <noreply@anthropic.com>
This commit is contained in:
1 parent
c3032683ab
commit
2e1a2176cd
1 file changed
+14
@@ -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":
|
||||
|
||||
Reference in new issue
Block a user