Documentation
¶
Index ¶
- Constants
- func CreateTestClient() *fake.Clientset
- func CreateTestPlugin() []volume.VolumePlugin
- func GetTestVolumeSpec(volumeName string, diskName v1.UniqueVolumeName) *volume.Spec
- func NewNFSPV(pvName, volumeName string) *v1.PersistentVolume
- func NewPV(pvName, volumeName string) *v1.PersistentVolume
- func NewPod(uid, name string) *v1.Pod
- func NewPodWithVolume(podName, volumeName, nodeName string) *v1.Pod
- func NewVolumeAttachment(vaName, pvName, nodeName string, status bool) *storagev1.VolumeAttachment
- type TestPlugin
- func (plugin *TestPlugin) CanAttach(spec *volume.Spec) (bool, error)
- func (plugin *TestPlugin) CanDeviceMount(spec *volume.Spec) (bool, error)
- func (plugin *TestPlugin) CanSupport(spec *volume.Spec) bool
- func (plugin *TestPlugin) ConstructVolumeSpec(volumeName, mountPath string) (volume.ReconstructedVolume, error)
- func (plugin *TestPlugin) GetAttachedVolumes() map[string][]string
- func (plugin *TestPlugin) GetDetachedVolumes() map[string][]string
- func (plugin *TestPlugin) GetDeviceMountRefs(deviceMountPath string) ([]string, error)
- func (plugin *TestPlugin) GetErrorEncountered() bool
- func (plugin *TestPlugin) GetPluginName() string
- func (plugin *TestPlugin) GetVolumeName(spec *volume.Spec) (string, error)
- func (plugin *TestPlugin) Init(host volume.VolumeHost) error
- func (plugin *TestPlugin) NewAttacher() (volume.Attacher, error)
- func (plugin *TestPlugin) NewDetacher() (volume.Detacher, error)
- func (plugin *TestPlugin) NewDeviceMounter() (volume.DeviceMounter, error)
- func (plugin *TestPlugin) NewDeviceUnmounter() (volume.DeviceUnmounter, error)
- func (plugin *TestPlugin) NewMounter(spec *volume.Spec, podRef *v1.Pod, opts volume.VolumeOptions) (volume.Mounter, error)
- func (plugin *TestPlugin) NewUnmounter(name string, podUID types.UID) (volume.Unmounter, error)
- func (plugin *TestPlugin) RequiresRemount(spec *volume.Spec) bool
- func (plugin *TestPlugin) SupportsBulkVolumeVerification() bool
- func (plugin *TestPlugin) SupportsMountOption() bool
- func (plugin *TestPlugin) SupportsSELinuxContextMount(spec *volume.Spec) (bool, error)
Constants ¶
View Source
const TestPluginName = "kubernetes.io/testPlugin"
Variables ¶
This section is empty.
Functions ¶
func CreateTestClient ¶
func CreateTestPlugin ¶
func CreateTestPlugin() []volume.VolumePlugin
func GetTestVolumeSpec ¶
func GetTestVolumeSpec(volumeName string, diskName v1.UniqueVolumeName) *volume.Spec
GetTestVolumeSpec returns a test volume spec
func NewNFSPV ¶
func NewNFSPV(pvName, volumeName string) *v1.PersistentVolume
Returns an NFS PV. This can be used for an in-tree volume that is not migrated (unlike NewPV, which uses the GCE persistent disk).
func NewPV ¶
func NewPV(pvName, volumeName string) *v1.PersistentVolume
Returns a persistentVolume object
func NewPodWithVolume ¶
NewPodWithVolume returns a test pod object
func NewVolumeAttachment ¶
func NewVolumeAttachment(vaName, pvName, nodeName string, status bool) *storagev1.VolumeAttachment
Returns a volumeAttachment object
Types ¶
type TestPlugin ¶
type TestPlugin struct { ErrorEncountered bool // contains filtered or unexported fields }
func (*TestPlugin) CanDeviceMount ¶
func (plugin *TestPlugin) CanDeviceMount(spec *volume.Spec) (bool, error)
func (*TestPlugin) CanSupport ¶
func (plugin *TestPlugin) CanSupport(spec *volume.Spec) bool
func (*TestPlugin) ConstructVolumeSpec ¶
func (plugin *TestPlugin) ConstructVolumeSpec(volumeName, mountPath string) (volume.ReconstructedVolume, error)
func (*TestPlugin) GetAttachedVolumes ¶
func (plugin *TestPlugin) GetAttachedVolumes() map[string][]string
func (*TestPlugin) GetDetachedVolumes ¶
func (plugin *TestPlugin) GetDetachedVolumes() map[string][]string
func (*TestPlugin) GetDeviceMountRefs ¶
func (plugin *TestPlugin) GetDeviceMountRefs(deviceMountPath string) ([]string, error)
func (*TestPlugin) GetErrorEncountered ¶
func (plugin *TestPlugin) GetErrorEncountered() bool
func (*TestPlugin) GetPluginName ¶
func (plugin *TestPlugin) GetPluginName() string
func (*TestPlugin) GetVolumeName ¶
func (plugin *TestPlugin) GetVolumeName(spec *volume.Spec) (string, error)
func (*TestPlugin) Init ¶
func (plugin *TestPlugin) Init(host volume.VolumeHost) error
func (*TestPlugin) NewAttacher ¶
func (plugin *TestPlugin) NewAttacher() (volume.Attacher, error)
func (*TestPlugin) NewDetacher ¶
func (plugin *TestPlugin) NewDetacher() (volume.Detacher, error)
func (*TestPlugin) NewDeviceMounter ¶
func (plugin *TestPlugin) NewDeviceMounter() (volume.DeviceMounter, error)
func (*TestPlugin) NewDeviceUnmounter ¶
func (plugin *TestPlugin) NewDeviceUnmounter() (volume.DeviceUnmounter, error)
func (*TestPlugin) NewMounter ¶
func (plugin *TestPlugin) NewMounter(spec *volume.Spec, podRef *v1.Pod, opts volume.VolumeOptions) (volume.Mounter, error)
func (*TestPlugin) NewUnmounter ¶
func (*TestPlugin) RequiresRemount ¶
func (plugin *TestPlugin) RequiresRemount(spec *volume.Spec) bool
func (*TestPlugin) SupportsBulkVolumeVerification ¶
func (plugin *TestPlugin) SupportsBulkVolumeVerification() bool
func (*TestPlugin) SupportsMountOption ¶
func (plugin *TestPlugin) SupportsMountOption() bool
func (*TestPlugin) SupportsSELinuxContextMount ¶
func (plugin *TestPlugin) SupportsSELinuxContextMount(spec *volume.Spec) (bool, error)
Click to show internal directories.
Click to hide internal directories.