Skip to content

Commit

Permalink
update odim-controller to handle subscription deletion
Browse files Browse the repository at this point in the history
  • Loading branch information
akshata-s-banoshi committed Sep 12, 2023
1 parent 39f2622 commit d66b25d
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions controllers/odim/odim_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -260,9 +260,13 @@ func removeEventsSubscription(ctx context.Context, restClient restclient.RestCli
l.LogWithFields(ctx).Errorf("error while deleting subscription for bmc operator: %s", err.Error())
return false
}
if resp.StatusCode == http.StatusOK {
l.LogWithFields(ctx).Infof("deleted events subscription with ID %s", subs)
return true
if resp.StatusCode == http.StatusAccepted {
commonUtil := common.GetCommonUtils(restClient)
done, _ := commonUtil.MoniteringTaskmon(resp.Header, ctx, common.DELETEEVENTSUBSCRIPTION, "BmcOperatorSubscription")
if done {
l.LogWithFields(ctx).Infof("deleted events subscription with ID %s", subs)
return true
}
}
}
}
Expand Down

0 comments on commit d66b25d

Please sign in to comment.