device_connectivity

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2019 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FC_HOST_SYSFS_PATH = "/sys/class/fc_remote_ports/rport-*/port_name"
	IscsiHostRexExPath = "/sys/class/iscsi_host/host*/device/session*/iscsi_session/session*/targetname"
)
View Source
const (
	DevPath = "/dev"
)

Variables

View Source
var (
	TimeOutMultipathFlashCmd = 4 * 1000
)

Functions

This section is empty.

Types

type ConnectivityIdentifierStorageTargetNotFoundError added in v0.9.0

type ConnectivityIdentifierStorageTargetNotFoundError struct {
	StorageTargetName string
	DirectoryPath     string
}

func (*ConnectivityIdentifierStorageTargetNotFoundError) Error added in v0.9.0

type ErrorNotFoundArrayIdentifiers added in v0.9.0

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

func (*ErrorNotFoundArrayIdentifiers) Error added in v0.9.0

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
	ArrayIqns []string
}

func (*MultipleDeviceNotFoundForLunError) Error

type MultipleDmDevicesError

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

func (*MultipleDmDevicesError) Error

func (e *MultipleDmDevicesError) Error() string

type OsDeviceConnectivityFc added in v0.9.0

type OsDeviceConnectivityFc struct {
	Executer          executer.ExecuterInterface
	HelperScsiGeneric OsDeviceConnectivityHelperScsiGenericInterface
}

func (OsDeviceConnectivityFc) FlushMultipathDevice added in v0.9.0

func (r OsDeviceConnectivityFc) FlushMultipathDevice(mpathDevice string) error

func (OsDeviceConnectivityFc) GetMpathDevice added in v0.9.0

func (r OsDeviceConnectivityFc) GetMpathDevice(volumeId string, lunId int, arrayIdentifiers []string) (string, error)

func (OsDeviceConnectivityFc) RemovePhysicalDevice added in v0.9.0

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

func (OsDeviceConnectivityFc) RescanDevices added in v0.9.0

func (r OsDeviceConnectivityFc) RescanDevices(lunId int, arrayIdentifiers []string) error

type OsDeviceConnectivityHelperGeneric added in v0.9.0

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

func (OsDeviceConnectivityHelperGeneric) GetHostsIdByArrayIdentifier added in v0.9.0

func (o OsDeviceConnectivityHelperGeneric) GetHostsIdByArrayIdentifier(arrayIdentifier string) ([]int, error)

func (OsDeviceConnectivityHelperGeneric) GetMultipathDisk added in v0.9.0

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

func (OsDeviceConnectivityHelperGeneric) WaitForPathToExist added in v0.9.0

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

type OsDeviceConnectivityHelperInterface added in v0.9.0

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

func NewOsDeviceConnectivityHelperGeneric added in v0.9.0

func NewOsDeviceConnectivityHelperGeneric(executer executer.ExecuterInterface) OsDeviceConnectivityHelperInterface

type OsDeviceConnectivityHelperScsiGeneric added in v0.9.0

type OsDeviceConnectivityHelperScsiGeneric struct {
	Executer        executer.ExecuterInterface
	Helper          OsDeviceConnectivityHelperInterface
	MutexMultipathF *sync.Mutex
}

func (OsDeviceConnectivityHelperScsiGeneric) FlushMultipathDevice added in v0.9.0

func (r OsDeviceConnectivityHelperScsiGeneric) FlushMultipathDevice(mpathDevice string) error

func (OsDeviceConnectivityHelperScsiGeneric) GetMpathDevice added in v0.9.0

func (r OsDeviceConnectivityHelperScsiGeneric) GetMpathDevice(volumeId string, lunId int, arrayIdentifiers []string, connectivityType string) (string, error)

func (OsDeviceConnectivityHelperScsiGeneric) RemovePhysicalDevice added in v0.9.0

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

func (OsDeviceConnectivityHelperScsiGeneric) RescanDevices added in v0.9.0

func (r OsDeviceConnectivityHelperScsiGeneric) RescanDevices(lunId int, arrayIdentifiers []string) error

type OsDeviceConnectivityHelperScsiGenericInterface added in v0.9.0

type OsDeviceConnectivityHelperScsiGenericInterface interface {
	/*
		This is helper interface for OsDeviceConnectivityHelperScsiGenericInterface.
		Mainly for writing clean unit testing, so we can Mock this interface in order to unit test logic.
	*/
	RescanDevices(lunId int, arrayIdentifiers []string) error
	GetMpathDevice(volumeId string, lunId int, arrayIdentifiers []string, connectivityType string) (string, error)
	FlushMultipathDevice(mpathDevice string) error
	RemovePhysicalDevice(sysDevices []string) error
}

func NewOsDeviceConnectivityHelperScsiGeneric added in v0.9.0

func NewOsDeviceConnectivityHelperScsiGeneric(executer executer.ExecuterInterface) OsDeviceConnectivityHelperScsiGenericInterface

type OsDeviceConnectivityInterface

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

func NewOsDeviceConnectivityFc added in v0.9.0

func NewOsDeviceConnectivityFc(executer executer.ExecuterInterface) OsDeviceConnectivityInterface

type OsDeviceConnectivityIscsi

type OsDeviceConnectivityIscsi struct {
	Executer          executer.ExecuterInterface
	HelperScsiGeneric OsDeviceConnectivityHelperScsiGenericInterface
}

func (OsDeviceConnectivityIscsi) FlushMultipathDevice

func (r OsDeviceConnectivityIscsi) FlushMultipathDevice(mpathDevice string) error

func (OsDeviceConnectivityIscsi) GetMpathDevice

func (r OsDeviceConnectivityIscsi) GetMpathDevice(volumeId string, lunId int, arrayIdentifiers []string) (string, error)

func (OsDeviceConnectivityIscsi) RemovePhysicalDevice

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

func (OsDeviceConnectivityIscsi) RescanDevices

func (r OsDeviceConnectivityIscsi) RescanDevices(lunId int, arrayIdentifiers []string) error

Jump to

Keyboard shortcuts

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