Skip to content

Commit

Permalink
EFS volume delete implementation (#6083)
Browse files Browse the repository at this point in the history
  • Loading branch information
Hakan Memisoglu authored and Ilya Kislenko committed Jul 18, 2019
1 parent d4267a9 commit ad33ef7
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 @@ -68,8 +68,15 @@ func (e *efs) VolumeCreateFromSnapshot(ctx context.Context, snapshot blockstorag
return nil, errors.New("Not implemented")
}

func (e *efs) VolumeDelete(context.Context, *blockstorage.Volume) error {
return errors.New("Not implemented")
func (e *efs) VolumeDelete(ctx context.Context, volume *blockstorage.Volume) error {
req := &awsefs.DeleteFileSystemInput{}
req.SetFileSystemId(volume.ID)

_, err := e.DeleteFileSystemWithContext(ctx, req)
if isVolumeNotFound(err) {
return nil
}
return err
}

func (e *efs) VolumeGet(ctx context.Context, id string, zone string) (*blockstorage.Volume, error) {
Expand Down

0 comments on commit ad33ef7

Please sign in to comment.