driver

package
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 19, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EncodeTestPatternName added in v0.8.0

func EncodeTestPatternName(volType storageframework.TestVolType, volMode v1.PersistentVolumeMode, scp StorageClassParameters) string

func New

func New(name, csiDriverName string, fsTypes []string, scManifests map[string]string, parameters map[string]string) storageframework.TestDriver

Types

type CSIDriver added in v0.9.0

type CSIDriver interface {
	GetCSIDriverName(config *storageframework.PerTestConfig) string
}

CSIDriver exposes the CSI driver name, something that is normally hidden.

type DynamicDriver added in v0.8.0

type DynamicDriver interface {
	storageframework.TestDriver

	// WithStorageClassNameSuffix sets a suffix which gets added
	// to the name of all future storage classes that
	// GetDynamicProvisionStorageClass creates. Can be used to
	// create more than one class per test.
	WithStorageClassNameSuffix(suffix string) DynamicDriver

	// WithParameters sets parameters that are used in future
	// storage classes and CSI inline volumes.
	WithParameters(parameters map[string]string) DynamicDriver
}

DynamicDriver has the ability to return a modified copy of itself with additional options set.

type StorageClassParameters added in v0.8.0

type StorageClassParameters struct {
	FSType     string
	Parameters map[string]string
}

StorageClassParameters can be used in combination with DynamicDriver to implement test patterns that encode additional parameters in the test pattern name. This is a workaround for the fixed content of the original test pattern struct.

func DecodeTestPatternName added in v0.8.0

func DecodeTestPatternName(name string) (volType storageframework.TestVolType, volMode v1.PersistentVolumeMode, scp *StorageClassParameters, err error)

func (*StorageClassParameters) Decode added in v0.8.0

func (scp *StorageClassParameters) Decode(parameters string) error

func (*StorageClassParameters) Encode added in v0.8.0

func (scp *StorageClassParameters) Encode() (string, error)

func (*StorageClassParameters) MustEncode added in v0.8.0

func (scp *StorageClassParameters) MustEncode() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL