@@ -253,10 +253,9 @@ func (e *EMLB) DeleteLoadBalancer(ctx context.Context, clusterScope *scope.Clust
253
253
if err != nil {
254
254
if resp .StatusCode == http .StatusNotFound {
255
255
return nil
256
- } else {
257
- log .Error (err , "LB Delete Failed" , "EMLB ID" , lbID , "Response Body" , resp .Body )
258
- return err
259
256
}
257
+ log .Error (err , "LB Delete Failed" , "EMLB ID" , lbID , "Response Body" , resp .Body )
258
+ return err
260
259
}
261
260
262
261
return nil
@@ -281,10 +280,9 @@ func (e *EMLB) DeleteLoadBalancerOrigin(ctx context.Context, machineScope *scope
281
280
if err != nil {
282
281
if resp .StatusCode != http .StatusNotFound {
283
282
return nil
284
- } else {
285
- log .Error (err , "LB Pool Delete Failed" , "Pool ID" , lbPoolID , "Response Body" , resp .Body )
286
- return err
287
283
}
284
+ log .Error (err , "LB Pool Delete Failed" , "Pool ID" , lbPoolID , "Response Body" , resp .Body )
285
+ return err
288
286
}
289
287
290
288
return nil
@@ -306,14 +304,6 @@ func (e *EMLB) getLoadBalancerPort(ctx context.Context, id string, portNumber in
306
304
return LoadBalancerPort , err
307
305
}
308
306
309
- // getLoadBalancerPool Returns a Load Balancer Pool object given an id.
310
- func (e * EMLB ) getLoadBalancerPool (ctx context.Context , id string ) (* lbaas.LoadBalancerPool , * http.Response , error ) {
311
- ctx = context .WithValue (ctx , lbaas .ContextOAuth2 , e .tokenExchanger )
312
-
313
- LoadBalancerPool , resp , err := e .client .PoolsApi .GetLoadBalancerPool (ctx , id ).Execute ()
314
- return LoadBalancerPool , resp , err
315
- }
316
-
317
307
// EnsureLoadBalancerOrigin takes the devices list of IP addresses in a Load Balancer Origin Pool and ensures an origin
318
308
// for the first IPv4 address in the list exists.
319
309
func (e * EMLB ) ensureLoadBalancerOrigin (ctx context.Context , originID , poolID , lbName string , deviceAddr []corev1.NodeAddress ) (* lbaas.LoadBalancerPoolOrigin , error ) {
0 commit comments