Documentation
¶
Overview ¶
Package attacher provide operations of volume attach
Index ¶
- Constants
- func GetMultipleInitiators(ctx context.Context, protocol InitiatorType, parameters map[string]interface{}) ([]string, error)
- func GetSingleInitiator(ctx context.Context, protocol InitiatorType, parameters map[string]interface{}) (string, error)
- type Attacher
- type AttacherPlugin
- type DoradoV6Attacher
- type InitiatorType
- type MetroAttacher
- type OceanStorAttacher
Constants ¶
const (
// AccessModeBalanced defines balanced mode of access
AccessModeBalanced = "0"
)
const (
// MultiPathTypeDefault defines default multi path type
MultiPathTypeDefault = "0"
)
Variables ¶
This section is empty.
Functions ¶
func GetMultipleInitiators ¶
func GetMultipleInitiators(ctx context.Context, protocol InitiatorType, parameters map[string]interface{}) ([]string, error)
GetMultipleInitiators use this method when the initiator is an array e.g. fc
func GetSingleInitiator ¶
func GetSingleInitiator(ctx context.Context, protocol InitiatorType, parameters map[string]interface{}) (string, error)
GetSingleInitiator use this method when the initiator is single e.g. iscsi
Types ¶
type Attacher ¶
type Attacher struct {
// contains filtered or unexported fields
}
Attacher defines attacher to attach volume
type AttacherPlugin ¶
type AttacherPlugin interface {
ControllerAttach(context.Context, string, map[string]interface{}) (map[string]interface{}, error)
ControllerDetach(context.Context, string, map[string]interface{}) (string, error)
// contains filtered or unexported methods
}
AttacherPlugin defines interfaces of attach operations
func NewAttacher ¶
func NewAttacher( product string, cli client.BaseClientInterface, protocol, invoker string, portals []string, alua map[string]interface{}) AttacherPlugin
NewAttacher init a new attacher
type DoradoV6Attacher ¶
type DoradoV6Attacher struct {
Attacher
}
DoradoV6Attacher implements interface AttacherPlugin
func (*DoradoV6Attacher) ControllerAttach ¶
func (p *DoradoV6Attacher) ControllerAttach(ctx context.Context, lunName string, parameters map[string]interface{}) (map[string]interface{}, error)
ControllerAttach attaches volume and maps lun to host
type InitiatorType ¶
type InitiatorType int
InitiatorType defines the initiator type
const ( // ISCSI defines iscsi initiator type ISCSI InitiatorType = iota // FC defines fc initiator type FC // ROCE defines roce initiator type ROCE )
type MetroAttacher ¶
type MetroAttacher struct {
// contains filtered or unexported fields
}
MetroAttacher implements interface AttacherPlugin
func NewMetroAttacher ¶
func NewMetroAttacher(localAttacher, remoteAttacher AttacherPlugin, protocol string) *MetroAttacher
NewMetroAttacher inits a new metro attacher
func (*MetroAttacher) ControllerAttach ¶
func (p *MetroAttacher) ControllerAttach(ctx context.Context, lunName string, parameters map[string]interface{}) (map[string]interface{}, error)
ControllerAttach attaches local and remote volume
func (*MetroAttacher) ControllerDetach ¶
func (p *MetroAttacher) ControllerDetach(ctx context.Context, lunName string, parameters map[string]interface{}) (string, error)
ControllerDetach detaches local and remote volume
type OceanStorAttacher ¶
type OceanStorAttacher struct {
Attacher
}
OceanStorAttacher implements interface AttacherPlugin
func (*OceanStorAttacher) ControllerAttach ¶
func (p *OceanStorAttacher) ControllerAttach(ctx context.Context, lunName string, parameters map[string]interface{}) ( map[string]interface{}, error)
ControllerAttach attaches volume and maps lun to host