Skip to content

Commit

Permalink
fix: tweak
Browse files Browse the repository at this point in the history
Signed-off-by: hlts2 <[email protected]>
  • Loading branch information
hlts2 committed Nov 25, 2024
1 parent 5fcd720 commit d752973
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions pkg/driver/controller_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -605,17 +605,18 @@ func (d *Driver) DeleteSnapshot(ctx context.Context, req *csi.DeleteSnapshotRequ
Str("snapshot_id", snapshotID).
Msg("Deleting snapshot in Civo API")

// _, err := d.CivoClient.DeleteSnapshot(req.GetSnapshotId())
// _, err := d.CivoClient.DeleteVolumeSnapshot(snapshotID)
// if err != nil {
// if strings.Contains(err.Error(), "") {
// if strings.Contains(err.Error(), "DatabaseVolumeSnapshotNotFoundError") {
// log.Info().
// Str("volume_id", snapshotID).
// Msg("Snapshot already deleted from Civo API")
// return &csi.DeleteSnapshotResponse{}, nil
// }
// return nil, status.Errorf(codes.Internal, "failed to delete snapshot %q, err: %s", snapshotID, err)
// }
return &csi.DeleteSnapshotResponse{}, nil
// return &csi.DeleteSnapshotResponse{}, nil
return nil, status.Error(codes.Unimplemented, "")
}

// ListSnapshots is part of implementing Snapshot & Restore functionality, but we don't support that
Expand Down

0 comments on commit d752973

Please sign in to comment.