Documentation
¶
Index ¶
- Constants
- Variables
- func ConvertScsiIdToNguid(scsiId string) string
- type ConnectivityIdentifierStorageTargetNotFoundError
- type ErrorNoRegexWwnMatchInScsiInq
- type ErrorNotFoundArrayIdentifiers
- type ErrorNothingWasWrittenToScanFileError
- type ErrorWrongDeviceFound
- type GetDmsPathHelperGeneric
- type GetDmsPathHelperInterface
- type MultipathDeviceNotFoundForVolumeError
- 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) (string, error)
- func (r OsDeviceConnectivityFc) RemovePhysicalDevice(sysDevices []string) error
- func (r OsDeviceConnectivityFc) RescanDevices(lunId int, arrayIdentifiers []string) error
- func (r OsDeviceConnectivityFc) ValidateLun(lun int, sysDevices []string) error
- type OsDeviceConnectivityHelperGeneric
- func (o OsDeviceConnectivityHelperGeneric) GetDmsPath(volumeId string, volumeNguid string) (string, error)
- func (o OsDeviceConnectivityHelperGeneric) GetHostsIdByArrayIdentifier(arrayIdentifier string) ([]int, error)
- func (o OsDeviceConnectivityHelperGeneric) GetWwnByScsiInq(dev string) (string, error)
- func (o OsDeviceConnectivityHelperGeneric) ReloadMultipath() error
- type OsDeviceConnectivityHelperInterface
- type OsDeviceConnectivityHelperScsiGeneric
- func (r OsDeviceConnectivityHelperScsiGeneric) FlushMultipathDevice(mpathDevice string) error
- func (r OsDeviceConnectivityHelperScsiGeneric) GetMpathDevice(volumeId string) (string, error)
- func (r OsDeviceConnectivityHelperScsiGeneric) RemovePhysicalDevice(sysDevices []string) error
- func (r OsDeviceConnectivityHelperScsiGeneric) RescanDevices(lunId int, arrayIdentifiers []string) error
- func (r OsDeviceConnectivityHelperScsiGeneric) ValidateLun(lun int, sysDevices []string) error
- type OsDeviceConnectivityHelperScsiGenericInterface
- type OsDeviceConnectivityInterface
- func NewOsDeviceConnectivityFc(executer executer.ExecuterInterface) OsDeviceConnectivityInterface
- func NewOsDeviceConnectivityIscsi(executer executer.ExecuterInterface) OsDeviceConnectivityInterface
- func NewOsDeviceConnectivityNvmeOFc(executer executer.ExecuterInterface) OsDeviceConnectivityInterface
- type OsDeviceConnectivityIscsi
- func (r OsDeviceConnectivityIscsi) EnsureLogin(allPortalsByTarget map[string][]string)
- func (r OsDeviceConnectivityIscsi) FlushMultipathDevice(mpathDevice string) error
- func (r OsDeviceConnectivityIscsi) GetMpathDevice(volumeId string) (string, error)
- func (r OsDeviceConnectivityIscsi) RemovePhysicalDevice(sysDevices []string) error
- func (r OsDeviceConnectivityIscsi) RescanDevices(lunId int, arrayIdentifiers []string) error
- func (r OsDeviceConnectivityIscsi) ValidateLun(lun int, sysDevices []string) error
- type OsDeviceConnectivityNvmeOFc
- func (r OsDeviceConnectivityNvmeOFc) EnsureLogin(_ map[string][]string)
- func (r OsDeviceConnectivityNvmeOFc) FlushMultipathDevice(mpathDevice string) error
- func (r OsDeviceConnectivityNvmeOFc) GetMpathDevice(volumeId string) (string, error)
- func (r OsDeviceConnectivityNvmeOFc) RemovePhysicalDevice(sysDevices []string) error
- func (r OsDeviceConnectivityNvmeOFc) RescanDevices(_ int, _ []string) error
- func (r OsDeviceConnectivityNvmeOFc) ValidateLun(_ int, _ []string) error
- type WaitForMpathResult
Constants ¶
View Source
const ( DevPath = "/dev" ConnectionTypeNVMEoFC = "nvmeofc" ConnectionTypeFC = "fc" ConnectionTypeISCSI = "iscsi" WaitForMpathRetries = 5 WaitForMpathWaitIntervalSec = 1 FcHostSysfsPath = "/sys/class/fc_remote_ports/rport-*/port_name" IscsiHostRexExPath = "/sys/class/iscsi_host/host*/device/session*/iscsi_session/session*/targetname" VolumeIdDelimiter = ":" VolumeStorageIdsDelimiter = ";" WwnOuiEnd = 7 WwnVendorIdentifierEnd = 16 )
View Source
const ( IscsiCmdTimeout = 30 * time.Second ISCSIErrNoObjsFound = 21 )
Variables ¶
View Source
var ( TimeOutMultipathCmd = 60 * 1000 TimeOutMultipathdCmd = 10 * 1000 TimeOutBlockDevCmd = 10 * 1000 TimeOutSgInqCmd = 3 * 1000 )
Functions ¶
func ConvertScsiIdToNguid ¶ added in v1.8.0
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 ErrorNoRegexWwnMatchInScsiInq ¶ added in v1.3.0
type ErrorNoRegexWwnMatchInScsiInq struct {
// contains filtered or unexported fields
}
func (*ErrorNoRegexWwnMatchInScsiInq) Error ¶ added in v1.3.0
func (e *ErrorNoRegexWwnMatchInScsiInq) 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 ErrorWrongDeviceFound ¶ added in v1.3.0
type ErrorWrongDeviceFound struct {
// contains filtered or unexported fields
}
func (*ErrorWrongDeviceFound) Error ¶ added in v1.3.0
func (e *ErrorWrongDeviceFound) Error() string
type GetDmsPathHelperGeneric ¶ added in v1.3.0
type GetDmsPathHelperGeneric struct {
// contains filtered or unexported fields
}
func (GetDmsPathHelperGeneric) WaitForDmToExist ¶ added in v1.3.0
type GetDmsPathHelperInterface ¶ added in v1.3.0
type GetDmsPathHelperInterface interface {
WaitForDmToExist(volumeUuid string, volumeNguid string, maxRetries int, intervalSeconds int) (string, error)
}
func NewGetDmsPathHelperGeneric ¶ added in v1.3.0
func NewGetDmsPathHelperGeneric(executer executer.ExecuterInterface) GetDmsPathHelperInterface
type MultipathDeviceNotFoundForVolumeError ¶ added in v1.3.0
type MultipathDeviceNotFoundForVolumeError struct {
VolumeId string
}
func (*MultipathDeviceNotFoundForVolumeError) Error ¶ added in v1.3.0
func (e *MultipathDeviceNotFoundForVolumeError) Error() string
type MultipleDeviceNotFoundError ¶
func (*MultipleDeviceNotFoundError) Error ¶
func (e *MultipleDeviceNotFoundError) Error() string
type MultipleDmDevicesError ¶
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 (r OsDeviceConnectivityFc) GetMpathDevice(volumeId 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
func (OsDeviceConnectivityFc) ValidateLun ¶ added in v1.9.0
func (r OsDeviceConnectivityFc) ValidateLun(lun int, sysDevices []string) error
type OsDeviceConnectivityHelperGeneric ¶ added in v0.9.0
type OsDeviceConnectivityHelperGeneric struct {
Executer executer.ExecuterInterface
Helper GetDmsPathHelperInterface
}
func (OsDeviceConnectivityHelperGeneric) GetDmsPath ¶ added in v1.3.0
func (o OsDeviceConnectivityHelperGeneric) GetDmsPath(volumeId string, volumeNguid string) (string, error)
func (OsDeviceConnectivityHelperGeneric) GetHostsIdByArrayIdentifier ¶ added in v0.9.0
func (o OsDeviceConnectivityHelperGeneric) GetHostsIdByArrayIdentifier(arrayIdentifier string) ([]int, error)
func (OsDeviceConnectivityHelperGeneric) GetWwnByScsiInq ¶ added in v1.3.0
func (o OsDeviceConnectivityHelperGeneric) GetWwnByScsiInq(dev string) (string, error)
func (OsDeviceConnectivityHelperGeneric) ReloadMultipath ¶ added in v1.3.0
func (o OsDeviceConnectivityHelperGeneric) ReloadMultipath() 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.
*/
GetHostsIdByArrayIdentifier(arrayIdentifier string) ([]int, error)
GetDmsPath(volumeId string, volumeNguid string) (string, error)
GetWwnByScsiInq(dev string) (string, error)
ReloadMultipath() 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) (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
func (OsDeviceConnectivityHelperScsiGeneric) ValidateLun ¶ added in v1.9.0
func (r OsDeviceConnectivityHelperScsiGeneric) ValidateLun(lun int, sysDevices []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) (string, error)
FlushMultipathDevice(mpathDevice string) error
RemovePhysicalDevice(sysDevices []string) error
ValidateLun(lun int, 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) (string, error)
FlushMultipathDevice(mpathDevice string) error
RemovePhysicalDevice(sysDevices []string) error
ValidateLun(lun int, sysDevices []string) error
}
func NewOsDeviceConnectivityFc ¶ added in v0.9.0
func NewOsDeviceConnectivityFc(executer executer.ExecuterInterface) OsDeviceConnectivityInterface
func NewOsDeviceConnectivityIscsi ¶
func NewOsDeviceConnectivityIscsi(executer executer.ExecuterInterface) OsDeviceConnectivityInterface
func NewOsDeviceConnectivityNvmeOFc ¶ added in v1.8.0
func NewOsDeviceConnectivityNvmeOFc(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 (r OsDeviceConnectivityIscsi) GetMpathDevice(volumeId 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
func (OsDeviceConnectivityIscsi) ValidateLun ¶ added in v1.9.0
func (r OsDeviceConnectivityIscsi) ValidateLun(lun int, sysDevices []string) error
type OsDeviceConnectivityNvmeOFc ¶ added in v1.8.0
type OsDeviceConnectivityNvmeOFc struct {
Executer executer.ExecuterInterface
HelperScsiGeneric OsDeviceConnectivityHelperScsiGenericInterface
}
func (OsDeviceConnectivityNvmeOFc) EnsureLogin ¶ added in v1.8.0
func (r OsDeviceConnectivityNvmeOFc) EnsureLogin(_ map[string][]string)
func (OsDeviceConnectivityNvmeOFc) FlushMultipathDevice ¶ added in v1.8.0
func (r OsDeviceConnectivityNvmeOFc) FlushMultipathDevice(mpathDevice string) error
func (OsDeviceConnectivityNvmeOFc) GetMpathDevice ¶ added in v1.8.0
func (r OsDeviceConnectivityNvmeOFc) GetMpathDevice(volumeId string) (string, error)
func (OsDeviceConnectivityNvmeOFc) RemovePhysicalDevice ¶ added in v1.8.0
func (r OsDeviceConnectivityNvmeOFc) RemovePhysicalDevice(sysDevices []string) error
func (OsDeviceConnectivityNvmeOFc) RescanDevices ¶ added in v1.8.0
func (r OsDeviceConnectivityNvmeOFc) RescanDevices(_ int, _ []string) error
func (OsDeviceConnectivityNvmeOFc) ValidateLun ¶ added in v1.9.0
func (r OsDeviceConnectivityNvmeOFc) ValidateLun(_ int, _ []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.