Documentation
¶
Index ¶
- Constants
- Variables
- type ConnectivityIdentifierStorageTargetNotFoundError
- type ErrorNotFoundArrayIdentifiers
- type ErrorNothingWasWrittenToScanFileError
- type MultipathDeviceNotFoundForLunError
- type MultipleDeviceNotFoundError
- type MultipleDmDevicesError
- type OsDeviceConnectivityFc
- func (r OsDeviceConnectivityFc) EnsureLogin(_ map[string][]string)
- func (r OsDeviceConnectivityFc) FlushMultipathDevice(mpathDevice string) error
- func (r OsDeviceConnectivityFc) GetMpathDevice(volumeId string, lunId int, arrayIdentifiers []string) (string, error)
- func (r OsDeviceConnectivityFc) RemovePhysicalDevice(sysDevices []string) error
- func (r OsDeviceConnectivityFc) RescanDevices(lunId int, arrayIdentifiers []string) error
- type OsDeviceConnectivityHelperGeneric
- func (o OsDeviceConnectivityHelperGeneric) GetHostsIdByArrayIdentifier(arrayIdentifier string) ([]int, error)
- func (o OsDeviceConnectivityHelperGeneric) GetMultipathDisk(path string) (string, error)
- func (o OsDeviceConnectivityHelperGeneric) WaitForPathToExist(devicePath string, maxRetries int, intervalSeconds int) ([]string, bool, error)
- type OsDeviceConnectivityHelperInterface
- type OsDeviceConnectivityHelperScsiGeneric
- func (r OsDeviceConnectivityHelperScsiGeneric) FlushMultipathDevice(mpathDevice string) error
- func (r OsDeviceConnectivityHelperScsiGeneric) GetMpathDevice(volumeId string, lunId int, arrayIdentifiers []string, connectivityType string) (string, error)
- func (r OsDeviceConnectivityHelperScsiGeneric) RemovePhysicalDevice(sysDevices []string) error
- func (r OsDeviceConnectivityHelperScsiGeneric) RescanDevices(lunId int, arrayIdentifiers []string) error
- type OsDeviceConnectivityHelperScsiGenericInterface
- type OsDeviceConnectivityInterface
- type OsDeviceConnectivityIscsi
- func (r OsDeviceConnectivityIscsi) EnsureLogin(allPortalsByTarget map[string][]string)
- func (r OsDeviceConnectivityIscsi) FlushMultipathDevice(mpathDevice string) error
- func (r OsDeviceConnectivityIscsi) GetMpathDevice(volumeId string, lunId int, arrayIdentifiers []string) (string, error)
- func (r OsDeviceConnectivityIscsi) RemovePhysicalDevice(sysDevices []string) error
- func (r OsDeviceConnectivityIscsi) RescanDevices(lunId int, arrayIdentifiers []string) error
- type WaitForMpathResult
Constants ¶
View Source
const ( DevPath = "/dev" ConnectionTypeISCSI = "iscsi" ConnectionTypeFC = "fc" WaitForMpathRetries = 5 WaitForMpathWaitIntervalSec = 1 FC_HOST_SYSFS_PATH = "/sys/class/fc_remote_ports/rport-*/port_name" IscsiHostRexExPath = "/sys/class/iscsi_host/host*/device/session*/iscsi_session/session*/targetname" GetMpahDevErrorsSep = "," )
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
func (e *ConnectivityIdentifierStorageTargetNotFoundError) Error() string
type ErrorNotFoundArrayIdentifiers ¶ added in v0.9.0
type ErrorNotFoundArrayIdentifiers struct {
// contains filtered or unexported fields
}
func (*ErrorNotFoundArrayIdentifiers) Error ¶ added in v0.9.0
func (e *ErrorNotFoundArrayIdentifiers) Error() string
type ErrorNothingWasWrittenToScanFileError ¶
type ErrorNothingWasWrittenToScanFileError struct {
// contains filtered or unexported fields
}
func (*ErrorNothingWasWrittenToScanFileError) Error ¶
func (e *ErrorNothingWasWrittenToScanFileError) Error() string
type MultipathDeviceNotFoundForLunError ¶ added in v1.2.0
func (*MultipathDeviceNotFoundForLunError) Error ¶ added in v1.2.0
func (e *MultipathDeviceNotFoundForLunError) Error() string
type MultipleDeviceNotFoundError ¶
func (*MultipleDeviceNotFoundError) Error ¶
func (e *MultipleDeviceNotFoundError) Error() string
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) EnsureLogin ¶ added in v1.1.0
func (r OsDeviceConnectivityFc) EnsureLogin(_ map[string][]string)
func (OsDeviceConnectivityFc) FlushMultipathDevice ¶ added in v0.9.0
func (r OsDeviceConnectivityFc) FlushMultipathDevice(mpathDevice string) error
func (OsDeviceConnectivityFc) GetMpathDevice ¶ added in v0.9.0
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
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 (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 {
EnsureLogin(ipsByArrayIdentifier map[string][]string) // For iSCSI login
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
func NewOsDeviceConnectivityIscsi ¶
func NewOsDeviceConnectivityIscsi(executer executer.ExecuterInterface) OsDeviceConnectivityInterface
type OsDeviceConnectivityIscsi ¶
type OsDeviceConnectivityIscsi struct {
Executer executer.ExecuterInterface
HelperScsiGeneric OsDeviceConnectivityHelperScsiGenericInterface
}
func (OsDeviceConnectivityIscsi) EnsureLogin ¶ added in v1.1.0
func (r OsDeviceConnectivityIscsi) EnsureLogin(allPortalsByTarget map[string][]string)
func (OsDeviceConnectivityIscsi) FlushMultipathDevice ¶
func (r OsDeviceConnectivityIscsi) FlushMultipathDevice(mpathDevice string) error
func (OsDeviceConnectivityIscsi) GetMpathDevice ¶
func (OsDeviceConnectivityIscsi) RemovePhysicalDevice ¶
func (r OsDeviceConnectivityIscsi) RemovePhysicalDevice(sysDevices []string) error
func (OsDeviceConnectivityIscsi) RescanDevices ¶
func (r OsDeviceConnectivityIscsi) RescanDevices(lunId int, arrayIdentifiers []string) error
type WaitForMpathResult ¶ added in v1.2.0
type WaitForMpathResult struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.