Documentation ¶
Index ¶
- type MultipathPlugin
- func (plugin *MultipathPlugin) AttachDevice(serialNumber string, blockDev model.BlockDeviceAccessInfo) (device *model.Device, err error)
- func (plugin *MultipathPlugin) CreateFileSystem(device model.Device, filesystem string) error
- func (plugin *MultipathPlugin) DetachDevice(device model.Device) error
- func (plugin *MultipathPlugin) GetAllDeviceDetails(serialNumber string) ([]*model.Device, error)
- func (plugin *MultipathPlugin) GetDevices(serialNumber string) ([]*model.Device, error)
- func (plugin *MultipathPlugin) GetPartitionInfo(serialNumber string) ([]*model.DevicePartition, error)
- func (plugin *MultipathPlugin) OfflineDevice(device model.Device) error
- type TargetTypeCache
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MultipathPlugin ¶
type MultipathPlugin struct {
// contains filtered or unexported fields
}
func NewMultipathPlugin ¶
func NewMultipathPlugin() *MultipathPlugin
func (*MultipathPlugin) AttachDevice ¶
func (plugin *MultipathPlugin) AttachDevice(serialNumber string, blockDev model.BlockDeviceAccessInfo) (device *model.Device, err error)
AttachDevice attaches the given block device to this host. If the device is successfully attached, a model.Device object is returned for the attached device.
func (*MultipathPlugin) CreateFileSystem ¶
func (plugin *MultipathPlugin) CreateFileSystem(device model.Device, filesystem string) error
CreateFileSystem is called to create a file system on the given device
func (*MultipathPlugin) DetachDevice ¶
func (plugin *MultipathPlugin) DetachDevice(device model.Device) error
DetachDevice detaches the given block device from this host.
func (*MultipathPlugin) GetAllDeviceDetails ¶
func (plugin *MultipathPlugin) GetAllDeviceDetails(serialNumber string) ([]*model.Device, error)
GetAllDeviceDetails enumerates all the Nimble volumes while providing full details about the device. If a "serialNumber" is passed in, only that specific serial number is enumerated.
func (*MultipathPlugin) GetDevices ¶
func (plugin *MultipathPlugin) GetDevices(serialNumber string) ([]*model.Device, error)
GetDevices enumerates all the Nimble volumes while only providing basic details (e.g. serial number). If a "serialNumber" is passed in, only that specific serial number is enumerated.
func (*MultipathPlugin) GetPartitionInfo ¶
func (plugin *MultipathPlugin) GetPartitionInfo(serialNumber string) ([]*model.DevicePartition, error)
GetPartitionInfo enumerates the partitions on the given volume
func (*MultipathPlugin) OfflineDevice ¶
func (plugin *MultipathPlugin) OfflineDevice(device model.Device) error
OfflineDevice is called to offline the given device
type TargetTypeCache ¶
type TargetTypeCache struct {
// contains filtered or unexported fields
}
TargetTypeCache is used to maintain a cache of target types (group or volume) with the iSCSI target iqn used as the map key.
NOTE: A VST iqn is very different than a GST iqn. That is why it is safe to cache the target type per iqn (i.e. "volume" or "group"). However, it is technically possible for a user, using the CLI, to change a GST iqn to make it look like a VST iqn. If the cache has set a VST iqn as "volume", and the user removes the VST, and gives the GST the VST iqn, then the cache will have the wrong target type. I can't imagine a scenario where this would actually take place. The SetTargetType() method, with an empty target type, can be called to clear any target entry from the cache. Alternatively, the CHAPI service can be restarted to clear the cache.
func NewCustomTargetTypeCache ¶
func NewCustomTargetTypeCache(maxCachedEntries int, expiration time.Duration, threadSleep time.Duration) *TargetTypeCache
NewCustomTargetTypeCache allocates a new TargetTypeCache object with the specified settings
func NewTargetTypeCache ¶
func NewTargetTypeCache() *TargetTypeCache
NewTargetTypeCache allocates a new TargetTypeCache object with default settings
func (*TargetTypeCache) ClearCache ¶
func (c *TargetTypeCache) ClearCache()
ClearCache clears all entries from the target type cache
func (*TargetTypeCache) GetTargetType ¶
func (c *TargetTypeCache) GetTargetType(targetIqn string) string
GetTargetType returns the cached target type for the given iSCSI iqn. If no cache entry was found, an empty string is returned.
func (*TargetTypeCache) SetTargetType ¶
func (c *TargetTypeCache) SetTargetType(targetIqn, targetType string)
SetTargetType sets the cached target type for the given iSCSI iqn. If "targetType" is an empty string, any cache entry for the given iqn is removed.