Skip to content

Commit

Permalink
SnapshotDelete implementation for EFS (#6098)
Browse files Browse the repository at this point in the history
  • Loading branch information
Hakan Memisoglu authored and Ilya Kislenko committed Jul 19, 2019
1 parent 89b3566 commit 931c257
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions pkg/blockstorage/awsefs/awsefs.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ type efs struct {
var _ blockstorage.Provider = (*efs)(nil)

const (
k10BackupVaultName = "k10vault"

dummyMarker = ""
)

Expand Down Expand Up @@ -103,8 +105,13 @@ func (e *efs) SnapshotCreateWaitForCompletion(context.Context, *blockstorage.Sna
return errors.New("Not implemented")
}

func (e *efs) SnapshotDelete(context.Context, *blockstorage.Snapshot) error {
return errors.New("Not implemented")
func (e *efs) SnapshotDelete(ctx context.Context, snapshot *blockstorage.Snapshot) error {
req := &backup.DeleteRecoveryPointInput{}
req.SetBackupVaultName(k10BackupVaultName)
req.SetRecoveryPointArn(snapshot.ID)

_, err := e.DeleteRecoveryPointWithContext(ctx, req)
return err
}

func (e *efs) SnapshotGet(ctx context.Context, id string) (*blockstorage.Snapshot, error) {
Expand Down

0 comments on commit 931c257

Please sign in to comment.