driver

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BeegfsDriver

type BeegfsDriver struct {
	// contains filtered or unexported fields
}

BeegfsDriver is an exported driver that implements the storageframework.TestDriver, storageframework.DynamicPVTestDriver, storageframework.PreprovisionedVolumeTestDriver, and storageframework.PreprovisionedPVTestDriver interfaces. It is intended to be used in all beegfs-csi-driver specific tests.

func InitBeegfsDriver

func InitBeegfsDriver(dynamicVolDirBasePathBeegfsRoot, staticVolDirBasePathBeegfsRoot,
	staticVolDirName string) *BeegfsDriver

InitBeegfsDriver returns a pointer to a BeegfsDriver.

func (*BeegfsDriver) CreateVolume

CreateVolume is part of the storageframework.PreprovisionedVolumeTestDriver interface. CreateVolume returns a storageframework.TestVolume that appropriately references a pre-created directory on a BeeGFS file system known to the driver. Tests can use SetFSIndex and SetStaticDirName to modify its behavior.

func (BeegfsDriver) GetDriverInfo

func (d BeegfsDriver) GetDriverInfo() *storageframework.DriverInfo

GetDriverInfo is part of the storageframework.TestDriver interface.

func (BeegfsDriver) GetDynamicProvisionStorageClass

func (d BeegfsDriver) GetDynamicProvisionStorageClass(ctx context.Context, config *storageframework.PerTestConfig,
	fsType string) *storagev1.StorageClass

GetDynamicProvisionStorageClass is part of the storageframework.DynamicPVTestDriver interface.

func (BeegfsDriver) GetNumFS

func (d BeegfsDriver) GetNumFS() int

GetNumFS returns the maximum fsIndex that should be used with setFSIndex. It may also be useful in skipping certain beegfs-csi-driver specific tests (e.g. a test that requires two different file systems should be skipped if GetNumFS returns 1.

func (*BeegfsDriver) GetPersistentVolumeSource

func (d *BeegfsDriver) GetPersistentVolumeSource(readOnly bool, fsType string,
	testVolume storageframework.TestVolume) (*corev1.PersistentVolumeSource, *corev1.VolumeNodeAffinity)

GetPersistentVolumeSource is part of the storageframework.PreprovisionedPVTestDriver interface. GetPersistentVolumeSource returns a PersistentVolumeSource that appropriately references a pre-created directory on a BeeGFS file system known to the driver.

func (BeegfsDriver) PrepareTest

func (d BeegfsDriver) PrepareTest(ctx context.Context, f *e2eframework.Framework) *storageframework.PerTestConfig

PrepareTest is part of the storageframework.TestDriver interface.

func (BeegfsDriver) SetFSIndex

func (d BeegfsDriver) SetFSIndex(fsIndex int)

SetFSIndex determines which PerFSConfig will be used for various volume provisioning related tasks. It intentionally has no internal error correction. Use GetNumFS to determine the maximum fsIndex to set. If you set fsIndex above the maximum, tests will fail.

func (BeegfsDriver) SetFSIndexForRDMA

func (d BeegfsDriver) SetFSIndexForRDMA() bool

SetFSIndexForRDMA looks for an RDMA capable file system and sets fsIndex to refer to the first one it finds. It returns false if there are no RDMA capable file systems.

func (BeegfsDriver) SetPerFSConfigs

func (d BeegfsDriver) SetPerFSConfigs(perFSConfigs []beegfsv1.FileSystemSpecificConfig)

SetPerFSConfigs sets perFSConfigs from a slice of beegfs.FileSystemSpecificConfigs.

func (BeegfsDriver) SetStorageClassParams

func (d BeegfsDriver) SetStorageClassParams(extraSCParams map[string]string)

SetStorageClassParams injects additional parameters into the driver. These parameters will appear in all generated StorageClasses until UnsetStorageClassParams() is called.

func (BeegfsDriver) SkipUnsupportedTest

func (d BeegfsDriver) SkipUnsupportedTest(pattern storageframework.TestPattern)

SkipUnsupportedTest is part of the storageframework.TestDriver interface.

func (BeegfsDriver) UnsetStorageClassParams

func (d BeegfsDriver) UnsetStorageClassParams()

UnsetStorageClassParams reverses SetStorageClassParams.

type BeegfsDynamicDriver

type BeegfsDynamicDriver struct {
	// contains filtered or unexported fields
}

BeegfsDynamicDriver is an exported driver that implements the storageframework.TestDriver and storageframework.DynamicPVTestDriver interfaces. It intentionally does not implement the storageframework.PreprovisionedVolumeTestDriver and storageframework.PreprovisionedPVTestDriver interfaces. It is intended to be used for K8s built-in tests, which may use the pre-provisioned interface in unanticipated ways if allowed.

func InitBeegfsDynamicDriver

func InitBeegfsDynamicDriver(dynamicVolDirBasePathBeegfsRoot string) *BeegfsDynamicDriver

InitBeegfsDynamicDriver returns a pointer to a BeegfsDynamicDriver.

func (BeegfsDynamicDriver) GetDriverInfo

func (d BeegfsDynamicDriver) GetDriverInfo() *storageframework.DriverInfo

GetDriverInfo is part of the storageframework.TestDriver interface.

func (BeegfsDynamicDriver) GetDynamicProvisionStorageClass

func (d BeegfsDynamicDriver) GetDynamicProvisionStorageClass(ctx context.Context, config *storageframework.PerTestConfig,
	fsType string) *storagev1.StorageClass

GetDynamicProvisionStorageClass is part of the storageframework.DynamicPVTestDriver interface.

func (BeegfsDynamicDriver) GetNumFS

func (d BeegfsDynamicDriver) GetNumFS() int

GetNumFS returns the maximum fsIndex that should be used with setFSIndex. It may also be useful in skipping certain beegfs-csi-driver specific tests (e.g. a test that requires two different file systems should be skipped if GetNumFS returns 1.

func (BeegfsDynamicDriver) PrepareTest

func (d BeegfsDynamicDriver) PrepareTest(ctx context.Context, f *e2eframework.Framework) *storageframework.PerTestConfig

PrepareTest is part of the storageframework.TestDriver interface.

func (BeegfsDynamicDriver) SetFSIndex

func (d BeegfsDynamicDriver) SetFSIndex(fsIndex int)

SetFSIndex determines which PerFSConfig will be used for various volume provisioning related tasks. It intentionally has no internal error correction. Use GetNumFS to determine the maximum fsIndex to set. If you set fsIndex above the maximum, tests will fail.

func (BeegfsDynamicDriver) SetFSIndexForRDMA

func (d BeegfsDynamicDriver) SetFSIndexForRDMA() bool

SetFSIndexForRDMA looks for an RDMA capable file system and sets fsIndex to refer to the first one it finds. It returns false if there are no RDMA capable file systems.

func (BeegfsDynamicDriver) SetPerFSConfigs

func (d BeegfsDynamicDriver) SetPerFSConfigs(perFSConfigs []beegfsv1.FileSystemSpecificConfig)

SetPerFSConfigs sets perFSConfigs from a slice of beegfs.FileSystemSpecificConfigs.

func (BeegfsDynamicDriver) SetStorageClassParams

func (d BeegfsDynamicDriver) SetStorageClassParams(extraSCParams map[string]string)

SetStorageClassParams injects additional parameters into the driver. These parameters will appear in all generated StorageClasses until UnsetStorageClassParams() is called.

func (BeegfsDynamicDriver) SkipUnsupportedTest

func (d BeegfsDynamicDriver) SkipUnsupportedTest(pattern storageframework.TestPattern)

SkipUnsupportedTest is part of the storageframework.TestDriver interface.

func (BeegfsDynamicDriver) UnsetStorageClassParams

func (d BeegfsDynamicDriver) UnsetStorageClassParams()

UnsetStorageClassParams reverses SetStorageClassParams.

Jump to

Keyboard shortcuts

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