Skip to content

Commit

Permalink
fix: variable definition position
Browse files Browse the repository at this point in the history
Signed-off-by: hlts2 <[email protected]>
  • Loading branch information
hlts2 committed Dec 11, 2024
1 parent 2901c38 commit d12f0e8
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions pkg/driver/controller_server.go
Original file line number Diff line number Diff line change
Expand Up @@ -589,23 +589,22 @@ func (d *Driver) ControllerGetCapabilities(context.Context, *csi.ControllerGetCa
// CreateSnapshot is part of implementing Snapshot & Restore functionality, but we don't support that
func (d *Driver) CreateSnapshot(ctx context.Context, req *csi.CreateSnapshotRequest) (*csi.CreateSnapshotResponse, error) {
return nil, status.Error(codes.Unimplemented, "")

// TODO: Uncomment after client implementation is complete.
// snapshotName := req.GetName()
// sourceVolID := req.GetSourceVolumeId()
//
// log.Info().
// Str("snapshot_name", req.GetName()).
// Str("source_volume_id", req.GetSourceVolumeId()).
// Str("snapshot_name", snapshotName).
// Str("source_volume_id", sourceVolID).
// Msg("Request: CreateSnapshot")
//
// if len(req.GetName()) == 0 {
// if len(snapshotName) == 0 {
// return nil, status.Error(codes.InvalidArgument, "Snapshot name is required")
// }
// if len(req.GetSourceVolumeId()) == 0 {
// if len(sourceVolID) == 0 {
// return nil, status.Error(codes.InvalidArgument, "SourceVolumeId is required")
// }
//
// snapshotName := req.GetName()
// sourceVolID := req.GetSourceVolumeId()
//
// log.Debug().
// Str("source_volume_id", sourceVolID).
// Msg("Finding current snapshot in Civo API")
Expand Down

0 comments on commit d12f0e8

Please sign in to comment.