linuxutils

package
v1.6.2 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockWrapDataDiscover

type MockWrapDataDiscover struct {
	mock.Mock
}

MockWrapDataDiscover is a mock implementation of WrapDataDiscover interface from datadiscover package

func (*MockWrapDataDiscover) DiscoverData

func (m *MockWrapDataDiscover) DiscoverData(device, serialNumber string) (*types.DiscoverResult, error)

DiscoverData is a mock implementations

type MockWrapFS

type MockWrapFS struct {
	mock.Mock
}

MockWrapFS is a mock implementation of WrapFS interface from fs package

func (*MockWrapFS) CreateFS

func (m *MockWrapFS) CreateFS(fsType fs.FileSystem, device, uuid string) error

CreateFS is a mock implementations

func (*MockWrapFS) CreateFileWithSizeInMB added in v1.4.0

func (m *MockWrapFS) CreateFileWithSizeInMB(filePath string, sizeMB int) error

CreateFileWithSizeInMB is a mock implementation

func (*MockWrapFS) CreateLoopDevice added in v1.4.0

func (m *MockWrapFS) CreateLoopDevice(src string) (string, error)

CreateLoopDevice is a mock implementation

func (*MockWrapFS) FindMountPoint

func (m *MockWrapFS) FindMountPoint(target string) (string, error)

FindMountPoint is a mock implementations

func (*MockWrapFS) GetFSSpace

func (m *MockWrapFS) GetFSSpace(src string) (int64, error)

GetFSSpace is a mock implementations

func (*MockWrapFS) GetFSType

func (m *MockWrapFS) GetFSType(device string) (string, error)

GetFSType is a mock implementations

func (*MockWrapFS) GetFSUUID added in v1.3.0

func (m *MockWrapFS) GetFSUUID(device string) (string, error)

GetFSUUID is a mock implementations

func (*MockWrapFS) IsMounted

func (m *MockWrapFS) IsMounted(src string) (bool, error)

IsMounted is a mock implementations

func (*MockWrapFS) MkDir

func (m *MockWrapFS) MkDir(src string) error

MkDir is a mock implementations

func (*MockWrapFS) MkFile

func (m *MockWrapFS) MkFile(src string) error

MkFile is a mock implementations

func (*MockWrapFS) Mount

func (m *MockWrapFS) Mount(src, dst string, opts ...string) error

Mount is a mock implementations

func (*MockWrapFS) ReadLoopDevice added in v1.4.0

func (m *MockWrapFS) ReadLoopDevice(device string) (string, error)

ReadLoopDevice is a mock implementation

func (*MockWrapFS) RemoveLoopDevice added in v1.4.0

func (m *MockWrapFS) RemoveLoopDevice(device string) error

RemoveLoopDevice is a mock implementation

func (*MockWrapFS) RmDir

func (m *MockWrapFS) RmDir(src string) error

RmDir is a mock implementations

func (*MockWrapFS) Unmount

func (m *MockWrapFS) Unmount(src string) error

Unmount is a mock implementations

func (*MockWrapFS) WipeFS

func (m *MockWrapFS) WipeFS(device string) error

WipeFS is a mock implementations

type MockWrapLVM

type MockWrapLVM struct {
	mock.Mock
}

MockWrapLVM is a mock implementation of WrapLVM interface from lvm package

func (*MockWrapLVM) ExpandLV

func (m *MockWrapLVM) ExpandLV(lvName string, requiredSize int64) error

ExpandLV is a mock implementations

func (*MockWrapLVM) GetAllPVs

func (m *MockWrapLVM) GetAllPVs() ([]string, error)

GetAllPVs is a mock implementations

func (*MockWrapLVM) GetLVsInVG

func (m *MockWrapLVM) GetLVsInVG(vgName string) ([]string, error)

GetLVsInVG is a mock implementations

func (*MockWrapLVM) GetVGNameByPVName

func (m *MockWrapLVM) GetVGNameByPVName(pvName string) (string, error)

GetVGNameByPVName is a mock implementations

func (*MockWrapLVM) GetVgFreeSpace

func (m *MockWrapLVM) GetVgFreeSpace(vgName string) (int64, error)

GetVgFreeSpace is a mock implementations

func (*MockWrapLVM) IsVGContainsLVs

func (m *MockWrapLVM) IsVGContainsLVs(vgName string) bool

IsVGContainsLVs is a mock implementations

func (*MockWrapLVM) LVCreate

func (m *MockWrapLVM) LVCreate(name, size, vgName string) error

LVCreate is a mock implementations

func (*MockWrapLVM) LVRemove

func (m *MockWrapLVM) LVRemove(fullLVName string) error

LVRemove is a mock implementations

func (*MockWrapLVM) PVCreate

func (m *MockWrapLVM) PVCreate(dev string) error

PVCreate is a mock implementations

func (*MockWrapLVM) PVRemove

func (m *MockWrapLVM) PVRemove(name string) error

PVRemove is a mock implementations

func (*MockWrapLVM) RemoveOrphanPVs

func (m *MockWrapLVM) RemoveOrphanPVs() error

RemoveOrphanPVs is a mock implementations

func (*MockWrapLVM) VGCreate

func (m *MockWrapLVM) VGCreate(name string, pvs ...string) error

VGCreate is a mock implementations

func (*MockWrapLVM) VGReactivate

func (m *MockWrapLVM) VGReactivate(name string) error

VGReactivate is a mock implementation

func (*MockWrapLVM) VGRemove

func (m *MockWrapLVM) VGRemove(name string) error

VGRemove is a mock implementations

func (*MockWrapLVM) VGScan

func (m *MockWrapLVM) VGScan(name string) (bool, error)

VGScan is a mock implementation

type MockWrapLsblk

type MockWrapLsblk struct {
	mock.Mock
}

MockWrapLsblk is a mock implementation of WrapLsblk interface from lsblk package

func GetMockWrapLsblk

func GetMockWrapLsblk(everytimePath string) *MockWrapLsblk

GetMockWrapLsblk retruns MockWrapLsblk that perform each method without any error everytimePath is a path that will be returning for each "SearchDrivePath" call

func (*MockWrapLsblk) GetBlockDevices

func (m *MockWrapLsblk) GetBlockDevices(device string) ([]lsblk.BlockDevice, error)

GetBlockDevices is a mock implementations

func (*MockWrapLsblk) SearchDrivePath

func (m *MockWrapLsblk) SearchDrivePath(drive *api.Drive) (string, error)

SearchDrivePath is a mock implementations

type MockWrapLsscsi

type MockWrapLsscsi struct {
	mock.Mock
}

MockWrapLsscsi is a mock implementation of WrapLsscsi interface from lsscsi package

func (*MockWrapLsscsi) GetSCSIDevices

func (m *MockWrapLsscsi) GetSCSIDevices() ([]*lsscsi.SCSIDevice, error)

GetSCSIDevices is a mock implementations

type MockWrapNvmecli

type MockWrapNvmecli struct {
	mock.Mock
}

MockWrapNvmecli is a mock implementation of WrapNvmecli interface from nvmee package

func (*MockWrapNvmecli) GetNVMDevices

func (m *MockWrapNvmecli) GetNVMDevices() ([]nvmecli.NVMDevice, error)

GetNVMDevices is a mock implementations

type MockWrapPartition

type MockWrapPartition struct {
	mock.Mock
}

MockWrapPartition is a mock implementation of WrapPartition interface from partitionhelper package

func (*MockWrapPartition) CreatePartition

func (m *MockWrapPartition) CreatePartition(device, label, partUUID string) (err error)

CreatePartition is a mock implementations

func (*MockWrapPartition) CreatePartitionTable

func (m *MockWrapPartition) CreatePartitionTable(device, partTableType string) (err error)

CreatePartitionTable is a mock implementations

func (*MockWrapPartition) DeletePartition

func (m *MockWrapPartition) DeletePartition(device, partNum string) (err error)

DeletePartition is a mock implementations

func (*MockWrapPartition) DeviceHasPartitionTable

func (m *MockWrapPartition) DeviceHasPartitionTable(device string) (bool, error)

DeviceHasPartitionTable is a mock implementations

func (*MockWrapPartition) DeviceHasPartitions

func (m *MockWrapPartition) DeviceHasPartitions(device string) (bool, error)

DeviceHasPartitions is a mock implementations

func (*MockWrapPartition) GetPartitionNameByUUID

func (m *MockWrapPartition) GetPartitionNameByUUID(device, partUUID string) (string, error)

GetPartitionNameByUUID is a mock implementations

func (*MockWrapPartition) GetPartitionTableType

func (m *MockWrapPartition) GetPartitionTableType(device string) (ptType string, err error)

GetPartitionTableType is a mock implementations

func (*MockWrapPartition) GetPartitionUUID

func (m *MockWrapPartition) GetPartitionUUID(device, partNum string) (string, error)

GetPartitionUUID is a mock implementations

func (*MockWrapPartition) IsPartitionExists

func (m *MockWrapPartition) IsPartitionExists(device, partNum string) (exists bool, err error)

IsPartitionExists is a mock implementations

func (*MockWrapPartition) SyncPartitionTable

func (m *MockWrapPartition) SyncPartitionTable(device string) (string, string, error)

SyncPartitionTable is a mock implementations

type MockWrapSmartctl

type MockWrapSmartctl struct {
	mock.Mock
}

MockWrapSmartctl is a mock implementation of WrapSmartctl interface from smartctl package

func (*MockWrapSmartctl) GetDriveInfoByPath

func (m *MockWrapSmartctl) GetDriveInfoByPath(path string) (*smartctl.DeviceSMARTInfo, error)

GetDriveInfoByPath is a mock implementations

type MockWrapWbt

type MockWrapWbt struct {
	mock.Mock
}

MockWrapWbt is a mock implementation of WrapWbt

func (*MockWrapWbt) RestoreDefault

func (m *MockWrapWbt) RestoreDefault(device string) error

RestoreDefault is a mock implementations

func (*MockWrapWbt) SetValue

func (m *MockWrapWbt) SetValue(device string, value uint32) error

SetValue is a mock implementations

Jump to

Keyboard shortcuts

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