Updating client to reflect changes made on the Monitor's side

This commit is contained in:
Renan DelValle 2017-10-04 14:34:47 -07:00
parent 922e8d6b5a
commit fa7833a749

View file

@ -548,16 +548,15 @@ func main() {
} }
// Monitor change to DRAINING and DRAINED mode // Monitor change to DRAINING and DRAINED mode
nontransitioned, err := monitor.HostMaintenance( hostsResult, err := monitor.HostMaintenance(
hosts, hosts,
[]aurora.MaintenanceMode{aurora.MaintenanceMode_NONE}, []aurora.MaintenanceMode{aurora.MaintenanceMode_NONE},
5, 5,
10) 10)
if err != nil { if err != nil {
// Check whether the call was partially successful fmt.Println("Partial success:")
if len(nontransitioned) != 0 { for host, ok := range hostsResult {
fmt.Println("Partial success:") if !ok {
for host, _ := range nontransitioned {
fmt.Printf("Host %s did not transtion into desired mode(s)\n", host) fmt.Printf("Host %s did not transtion into desired mode(s)\n", host)
} }
} }