Skip to content

Commit

Permalink
Merge pull request #357 from banzaicloud/fix-delete-cluster-cli-log
Browse files Browse the repository at this point in the history
fix: split cluster delete log to different levels
  • Loading branch information
akijakya authored Nov 4, 2021
2 parents 6d031b6 + c2c7397 commit afb54dc
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions internal/cli/command/cluster/delete.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,12 @@ func runDelete(banzaiCli cli.Cli, options deleteOptions, args []string) error {
return errors.New("deletion cancelled")
}
}
if cluster, err := client.ClustersApi.DeleteCluster(context.Background(), orgId, id, &pipeline.DeleteClusterOpts{Force: optional.NewBool(options.force)}); err != nil {
if resp, err := client.ClustersApi.DeleteCluster(context.Background(), orgId, id, &pipeline.DeleteClusterOpts{Force: optional.NewBool(options.force)}); err != nil {
cli.LogAPIError("delete cluster", err, id)
return errors.WrapIf(err, "failed to delete cluster")
} else {
log.Printf("Deleting cluster %v", cluster)
log.Info("deleting cluster")
log.Debug(resp)
}
if cluster, _, err := client.ClustersApi.GetCluster(context.Background(), orgId, id); err != nil {
cli.LogAPIError("get cluster", err, id)
Expand Down

0 comments on commit afb54dc

Please sign in to comment.