device_connectivity

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2019 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	IscsiHostRexExPath = "/sys/class/iscsi_host/host*/device/session*/iscsi_session/session*/targetname"
)

Variables

View Source
var (
	TimeOutMultipathFlashCmd = 4 * 1000
)

Functions

This section is empty.

Types

type ConnectivityIscsiStorageTargetNotFoundError

type ConnectivityIscsiStorageTargetNotFoundError struct {
	StorageTargetName string
	DirectoryPath     string
}

func (*ConnectivityIscsiStorageTargetNotFoundError) Error

type ErrorNothingWasWrittenToScanFileError

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

func (*ErrorNothingWasWrittenToScanFileError) Error

type MultipleDeviceNotFoundError

type MultipleDeviceNotFoundError struct {
	DiskByPathDevice     string
	LinkToPhysicalDevice string
}

func (*MultipleDeviceNotFoundError) Error

type MultipleDeviceNotFoundForLunError

type MultipleDeviceNotFoundForLunError struct {
	VolumeId string
	LunId    int
	ArrayIqn string
}

func (*MultipleDeviceNotFoundForLunError) Error

type MultipleDmDevicesError

type MultipleDmDevicesError struct {
	VolumeId            string
	LunId               int
	ArrayIqn            string
	MultipathDevicesMap map[string]bool
}

func (*MultipleDmDevicesError) Error

func (e *MultipleDmDevicesError) Error() string

type OsDeviceConnectivityHelperIscsi

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

func (OsDeviceConnectivityHelperIscsi) GetIscsiSessionHostsForArrayIQN

func (o OsDeviceConnectivityHelperIscsi) GetIscsiSessionHostsForArrayIQN(arrayIdentifier string) ([]int, error)

func (OsDeviceConnectivityHelperIscsi) GetMultipathDisk

func (o OsDeviceConnectivityHelperIscsi) GetMultipathDisk(path string) (string, error)

func (OsDeviceConnectivityHelperIscsi) WaitForPathToExist

func (o OsDeviceConnectivityHelperIscsi) WaitForPathToExist(devicePath string, maxRetries int, intervalSeconds int) ([]string, bool, error)

type OsDeviceConnectivityHelperIscsiInterface

type OsDeviceConnectivityHelperIscsiInterface interface {
	/*
		This is helper interface for OsDeviceConnectivityIscsi.
		Mainly for writting clean unit testing, so we can Mock this interface in order to unit test OsDeviceConnectivityIscsi logic.
	*/
	WaitForPathToExist(devicePath string, maxRetries int, intervalSeconds int) ([]string, bool, error)
	GetMultipathDisk(path string) (string, error)
	GetIscsiSessionHostsForArrayIQN(arrayIdentifier string) ([]int, error)
}

type OsDeviceConnectivityInterface

type OsDeviceConnectivityInterface interface {
	RescanDevices(lunId int, arrayIdentifier string) error // For NVME lunID will be namespace ID.
	GetMpathDevice(volumeId string, lunId int, arrayIdentifier string) (string, error)
	FlushMultipathDevice(mpathDevice string) error
	RemovePhysicalDevice(sysDevices []string) error
}

type OsDeviceConnectivityIscsi

type OsDeviceConnectivityIscsi struct {
	Executer        executer.ExecuterInterface
	MutexMultipathF *sync.Mutex
	Helper          OsDeviceConnectivityHelperIscsiInterface
}

func (OsDeviceConnectivityIscsi) FlushMultipathDevice

func (r OsDeviceConnectivityIscsi) FlushMultipathDevice(mpathDevice string) error

func (OsDeviceConnectivityIscsi) GetMpathDevice

func (r OsDeviceConnectivityIscsi) GetMpathDevice(volumeId string, lunId int, arrayIdentifier string) (string, error)

func (OsDeviceConnectivityIscsi) RemovePhysicalDevice

func (r OsDeviceConnectivityIscsi) RemovePhysicalDevice(sysDevices []string) error

func (OsDeviceConnectivityIscsi) RescanDevices

func (r OsDeviceConnectivityIscsi) RescanDevices(lunId int, arrayIdentifier string) error

Jump to

Keyboard shortcuts

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