Skip to content

Commit

Permalink
chore(lint): fix lint errors
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Privitere <23177737+cprivitere@users.noreply.github.com>
  • Loading branch information
cprivitere committed Jun 17, 2024
1 parent 70b4b26 commit 0817226
Showing 1 changed file with 4 additions and 14 deletions.
18 changes: 4 additions & 14 deletions internal/emlb/emlb.go
Original file line number Diff line number Diff line change
Expand Up @@ -253,10 +253,9 @@ func (e *EMLB) DeleteLoadBalancer(ctx context.Context, clusterScope *scope.Clust
if err != nil {
if resp.StatusCode == http.StatusNotFound {
return nil
} else {
log.Error(err, "LB Delete Failed", "EMLB ID", lbID, "Response Body", resp.Body)
return err
}
log.Error(err, "LB Delete Failed", "EMLB ID", lbID, "Response Body", resp.Body)
return err
}

return nil
Expand All @@ -281,10 +280,9 @@ func (e *EMLB) DeleteLoadBalancerOrigin(ctx context.Context, machineScope *scope
if err != nil {
if resp.StatusCode != http.StatusNotFound {
return nil
} else {
log.Error(err, "LB Pool Delete Failed", "Pool ID", lbPoolID, "Response Body", resp.Body)
return err
}
log.Error(err, "LB Pool Delete Failed", "Pool ID", lbPoolID, "Response Body", resp.Body)
return err
}

return nil
Expand All @@ -306,14 +304,6 @@ func (e *EMLB) getLoadBalancerPort(ctx context.Context, id string, portNumber in
return LoadBalancerPort, err
}

// getLoadBalancerPool Returns a Load Balancer Pool object given an id.
func (e *EMLB) getLoadBalancerPool(ctx context.Context, id string) (*lbaas.LoadBalancerPool, *http.Response, error) {
ctx = context.WithValue(ctx, lbaas.ContextOAuth2, e.tokenExchanger)

LoadBalancerPool, resp, err := e.client.PoolsApi.GetLoadBalancerPool(ctx, id).Execute()
return LoadBalancerPool, resp, err
}

// EnsureLoadBalancerOrigin takes the devices list of IP addresses in a Load Balancer Origin Pool and ensures an origin
// for the first IPv4 address in the list exists.
func (e *EMLB) ensureLoadBalancerOrigin(ctx context.Context, originID, poolID, lbName string, deviceAddr []corev1.NodeAddress) (*lbaas.LoadBalancerPoolOrigin, error) {
Expand Down

0 comments on commit 0817226

Please sign in to comment.