2015-05-20 17:53:53 -04:00
|
|
|
// +build experimental
|
|
|
|
|
|
|
|
package daemon
|
|
|
|
|
|
|
|
import (
|
2015-05-21 13:57:59 -04:00
|
|
|
"path/filepath"
|
|
|
|
|
2015-05-20 17:53:53 -04: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 13:57:59 -04:00
|
|
|
|
2015-05-28 16:44:55 -04:00
|
|
|
func parseVolumeSource(spec string) (string, string, error) {
|
2015-05-21 13:57:59 -04:00
|
|
|
if !filepath.IsAbs(spec) {
|
|
|
|
return spec, "", nil
|
|
|
|
}
|
|
|
|
|
|
|
|
return "", spec, nil
|
|
|
|
}
|