func IsVolumeNameValid(name string) (bool, error) {
	return true, nil
}
IsVolumeNameValid checks a volume name in a platform specific manner.
package volume
import (
	"fmt"
	"path/filepath"
	"strings"
	derr "github.com/cloudcredo/cloudrocker/Godeps/_workspace/src/github.com/fsouza/go-dockerclient/external/github.com/docker/docker/errors"
)
var rwModes = map[string]bool{
	"rw":   true,
	"rw,Z": true,
	"rw,z": true,
	"z,rw": true,
	"Z,rw": true,
	"Z":    true,
	"z":    true,
}
var roModes = map[string]bool{
	"ro":   true,
	"ro,Z": true,
	"ro,z": true,
	"z,ro": true,
	"Z,ro": true,
}
func (m *MountPoint) BackwardsCompatible() bool {
	return len(m.Source) > 0 || m.Driver == DefaultDriverName
}
func (m *MountPoint) HasResource(absolutePath string) bool {
	relPath, err := filepath.Rel(m.Destination, absolutePath)
	return err == nil && relPath != ".." && !strings.HasPrefix(relPath, fmt.Sprintf("..%c", filepath.Separator))
}
func ParseMountSpec(spec, volumeDriver string) (*MountPoint, error) {
	spec = filepath.ToSlash(spec)
	mp := &MountPoint{
		RW: true,
	}
	if strings.Count(spec, ":") > 2 {
		return nil, derr.ErrorCodeVolumeInvalid.WithArgs(spec)
	}
	arr := strings.SplitN(spec, ":", 3)
	if arr[0] == "" {
		return nil, derr.ErrorCodeVolumeInvalid.WithArgs(spec)
	}
	switch len(arr) {
	case 1:
		mp.Destination = filepath.Clean(arr[0])
	case 2:
		if isValid := ValidMountMode(arr[1]); isValid {
			return nil, derr.ErrorCodeVolumeInvalid.WithArgs(spec)
		}
		mp.Source = arr[0]
		mp.Destination = arr[1]
	case 3:
		mp.Source = arr[0]
		mp.Destination = arr[1]
		mp.Mode = arr[2]  
		if !ValidMountMode(mp.Mode) {
			return nil, derr.ErrorCodeVolumeInvalidMode.WithArgs(mp.Mode)
		}
		mp.RW = ReadWrite(mp.Mode)
	default:
		return nil, derr.ErrorCodeVolumeInvalid.WithArgs(spec)
	}
	mp.Destination = filepath.Clean(mp.Destination)
	if !filepath.IsAbs(mp.Destination) {
		return nil, derr.ErrorCodeVolumeAbs.WithArgs(mp.Destination)
	}
	if mp.Destination == "/" {
		return nil, derr.ErrorCodeVolumeSlash.WithArgs(spec)
	}
	name, source := ParseVolumeSource(mp.Source)
	if len(source) == 0 {
		mp.Source = ""  
		mp.Driver = volumeDriver
		if len(mp.Driver) == 0 {
			mp.Driver = DefaultDriverName
		}
	} else {
		mp.Source = filepath.Clean(source)
	}
	mp.Name = name
	return mp, nil
}
func ParseVolumeSource(spec string) (string, string) {
	if !filepath.IsAbs(spec) {
		return spec, ""
	}
	return "", spec
}