Documentation
¶
Index ¶
- Constants
- type Initiator
- type Path
- type Paths
- func (t Paths) DeepCopy() *Paths
- func (t Paths) Diff(other Paths) string
- func (t Paths) Has(p Path) bool
- func (t Paths) HasAllOf(paths Paths) bool
- func (t Paths) HasAnyOf(paths Paths) bool
- func (t Paths) Mapping() string
- func (t Paths) MappingList() []string
- func (t Paths) WithInitiatorName(name string) Paths
- func (t Paths) WithTargetName(name string) Paths
- type Target
- type Targets
Constants ¶
const ( FC = "fc" FCOE = "fcoe" ISCSI = "iscsi" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Initiator ¶
func GetFCInitiator ¶
func GetFCInitiators ¶
func GetISCSIInitiators ¶
func GetInitiators ¶
type Paths ¶
type Paths []Path
Paths is a list of hba:target
func GetISCSIPaths ¶
func ParseMapping ¶
func ParseMappings ¶
ParseMappings reads the mappings of a command line, in the grammar the collector and the v2 agent write them: one initiator and the targets to reach it through, "<hba_id>:<tgt_id>[,<tgt_id>...]", the option repeated once per initiator.
ParseMapping reads a different grammar, where the comma separates whole pairs. A value written for the collector and read that way loses every target but the first, and takes the others for initiators with no target of their own.
func (Paths) MappingList ¶
MappingList returns the paths in the mapping grammar the array commands read, "<hba_id>:<tgt_id>", one per path.
It is not the String of the paths, which names the target first: a pool handing that to an array had the array look its target up as an initiator, and present the disk to the host the target name happened to match, if any.
func (Paths) WithInitiatorName ¶
WithInitiatorName returns the list of paths whose initiator name matches the argument.
func (Paths) WithTargetName ¶
WithTargetName returns the list of paths whose target name matches the argument.