()
| 362 | } |
| 363 | |
| 364 | func (api *API) DeleteAllDataplanes() { |
| 365 | _, servers, err := api.client.Configuration.GetServers(DataplaneBackend, "") |
| 366 | if err != nil { |
| 367 | fmt.Println(err.Error()) |
| 368 | } |
| 369 | |
| 370 | for _, s := range servers { |
| 371 | api.RemoveDataplane(s.Address, int(*s.Port), false) |
| 372 | } |
| 373 | |
| 374 | api.RestartHAProxy() |
| 375 | } |
| 376 | |
| 377 | func (api *API) ReviseHAProxyConfiguration(args *proto.HAProxyConfig) (*proto.ActionStatus, error) { |
| 378 | dpChanges := api.ReviseDataplanes(args.Dataplanes) |