Merge pull request #5398 from markturansky/volume_access_modes

Add GetAccessModes to volume plugin interface
This commit is contained in:
Tim Hockin
2015-03-24 15:16:01 -07:00
12 changed files with 152 additions and 1 deletions

View File

@@ -109,6 +109,18 @@ type VolumeSource struct {
NFS *NFSVolumeSource `json:"nfs" description:"NFS volume that will be mounted in the host machine "`
}
// used by VolumeSources to describe their mounting/access modes
type AccessModeType string
const (
// can be mounted read/write mode to exactly 1 host
ReadWriteOnce AccessModeType = "ReadWriteOnce"
// can be mounted in read-only mode to many hosts
ReadOnlyMany AccessModeType = "ReadOnlyMany"
// can be mounted in read/write mode to many hosts
ReadWriteMany AccessModeType = "ReadWriteMany"
)
// HostPathVolumeSource represents bare host directory volume.
type HostPathVolumeSource struct {
Path string `json:"path" description:"path of the directory on the host"`