2015-05-20 21:53:53 +00:00
|
|
|
// +build experimental
|
|
|
|
|
|
|
|
package daemon
|
|
|
|
|
|
|
|
import (
|
2015-05-21 17:57:59 +00:00
|
|
|
"path/filepath"
|
|
|
|
|
2015-05-20 21:53:53 +00:00
|
|
|
"github.com/docker/docker/volume"
|
|
|
|
"github.com/docker/docker/volume/drivers"
|
|
|
|
)
|
|
|
|
|
|
|
|
func getVolumeDriver(name string) (volume.Driver, error) {
|
|
|
|
if name == "" {
|
|
|
|
name = volume.DefaultDriverName
|
|
|
|
}
|
|
|
|
return volumedrivers.Lookup(name)
|
|
|
|
}
|
2015-05-21 17:57:59 +00:00
|
|
|
|
2015-05-28 20:44:55 +00:00
|
|
|
func parseVolumeSource(spec string) (string, string, error) {
|
2015-05-21 17:57:59 +00:00
|
|
|
if !filepath.IsAbs(spec) {
|
|
|
|
return spec, "", nil
|
|
|
|
}
|
|
|
|
|
|
|
|
return "", spec, nil
|
|
|
|
}
|