Updating client to reflect changes made on the Monitor's side
This commit is contained in:
parent
922e8d6b5a
commit
fa7833a749
1 changed files with 4 additions and 5 deletions
|
@ -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)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue