Documentation ¶
Index ¶
- type Driver
- func (m *Driver) CreateCluster(numNodes int) error
- func (m Driver) GetNodes() ([]*storkvolume.NodeInfo, error)
- func (m Driver) GetPodVolumes(pod *v1.Pod) ([]*storkvolume.Info, error)
- func (m *Driver) GetSnapshotPlugin() snapshotVolume.Plugin
- func (m *Driver) GetStorageClassName() string
- func (m Driver) Init(_ interface{}) error
- func (m Driver) InspectVolume(volumeID string) (*storkvolume.Info, error)
- func (m *Driver) NewPVC(volumeName string) *v1.PersistentVolumeClaim
- func (m *Driver) ProvisionVolume(volumeName string, replicaIndexes []int, size uint64) error
- func (m *Driver) SetInterfaceError(err error)
- func (m Driver) String() string
- func (m *Driver) UpdateNodeStatus(nodeIndex int, nodeStatus storkvolume.NodeStatus) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Driver ¶
type Driver struct {
// contains filtered or unexported fields
}
Driver Mock driver for tests
func (*Driver) CreateCluster ¶
CreateCluster Creates a cluster with specified number of nodes
func (Driver) GetNodes ¶
func (m Driver) GetNodes() ([]*storkvolume.NodeInfo, error)
GetNodes Get info about the nodes where the driver is running
func (Driver) GetPodVolumes ¶
GetPodVolumes Get the Volumes in the Pod that use the mock driver
func (*Driver) GetSnapshotPlugin ¶
func (m *Driver) GetSnapshotPlugin() snapshotVolume.Plugin
GetSnapshotPlugin Returns nil since snapshot is not supported in the mock driver
func (*Driver) GetStorageClassName ¶
GetStorageClassName Returns the storageclass name to be used by tests
func (Driver) InspectVolume ¶
func (m Driver) InspectVolume(volumeID string) (*storkvolume.Info, error)
InspectVolume Return information for a given volume
func (*Driver) NewPVC ¶
func (m *Driver) NewPVC(volumeName string) *v1.PersistentVolumeClaim
NewPVC Create a new PVC reference
func (*Driver) ProvisionVolume ¶
ProvisionVolume Provision a volume in the mock driver
func (*Driver) SetInterfaceError ¶
SetInterfaceError to the specified error. Used for negative testing
func (*Driver) UpdateNodeStatus ¶
func (m *Driver) UpdateNodeStatus( nodeIndex int, nodeStatus storkvolume.NodeStatus, ) error
UpdateNodeStatus Update status for a node
Click to show internal directories.
Click to hide internal directories.