Skip to content

Commit

Permalink
EFS volume id extractor added for compatibility with docker-compose
Browse files Browse the repository at this point in the history
  • Loading branch information
hyperius committed Oct 10, 2016
1 parent a72b5d1 commit c3f4656
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions netshare/drivers/efs.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"github.com/docker/go-plugins-helpers/volume"
"os"
"strings"
"regexp"
)

const (
Expand Down Expand Up @@ -100,6 +101,9 @@ func (e efsDriver) Unmount(r volume.UnmountRequest) volume.Response {
}

func (e efsDriver) fixSource(name, id string) string {
reg, _ := regexp.Compile("(fs-[0-9a-f]+)$")
name = reg.FindString(name)

if e.mountm.HasOption(name, ShareOpt) {
name = e.mountm.GetOption(name, ShareOpt)
}
Expand Down

0 comments on commit c3f4656

Please sign in to comment.