Documentation
¶
Overview ¶
Package arrayxtremio drives a Dell EMC XtremIO array through its rest api.
It is a port of the v2 agent driver, and answers to the same commands with the same options, because the collector drives an array by running them.
Index ¶
- func NewDriver() array.Driver
- type Array
- func (t *Array) Actions() []array.Action
- func (t *Array) AddDisk(ctx context.Context, opt OptAddDisk) (any, error)
- func (t *Array) AddMap(ctx context.Context, opt OptAddMap) (any, error)
- func (t *Array) DelDisk(ctx context.Context, ref string) (any, error)
- func (t *Array) DelMap(ctx context.Context, mapping string) error
- func (t *Array) DelVolumeMappings(ctx context.Context, ref string) error
- func (t *Array) GetVolume(ctx context.Context, ref string) (*volume, error)
- func (t *Array) Reports() []array.Report
- func (t *Array) ResizeDisk(ctx context.Context, ref, sizeExpr string, truncate bool) (any, error)
- func (t *Array) Run(args []string) error
- type OptAddDisk
- type OptAddMap
- type OptDelMap
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Array ¶
Array is one XtremIO array, as the node or cluster configuration declares it.
func (*Array) AddDisk ¶
AddDisk creates a volume and exports it.
Every group the volume is to be exported to is looked up before the volume is created, so a port the array does not know fails the command with nothing made. Once the volume is made, a failure is reported with the name and the index of the volume, which is left in place: deleting a volume is not something to do on the way out of an error, and the caller is told what to remove.
What is reported is what v2 reports, which the collector stores: the volume as the array describes it and the mappings made, in driver_data, the naa of the volume as disk_id, its index as disk_devid, and the mappings by "<hba>:<target>". The mappings are the pairs asked for, each with the lun of the mapping made for it. v2 reports every pair of a port of the initiator group with a port of the target group, including pairs nobody asked for; the keys and the values are the same, there are fewer of them.
func (*Array) AddMap ¶
AddMap exports a volume.
Naming the mappings asks the array which groups the ports belong to, and one mapping is made per pair of groups. Naming an initiator group instead makes the one mapping it names.
The volume is read first, and checked to be the one named, then mapped by its index.
func (*Array) DelDisk ¶
DelDisk unexports a volume and deletes it.
The volume is read first, and checked to be the one named, then acted upon by its index.
func (*Array) DelVolumeMappings ¶
DelVolumeMappings unexports the volume named by index or by name from everything it is exported to.
func (*Array) GetVolume ¶
GetVolume returns the volume named by index or by name.
A volume named by digits is named by index, as v2 reads it. The array is asked and its answer is checked against what was asked for, since the volume is then acted upon by index: a name the array did not filter on would otherwise have the first volume it has deleted or resized.
An index is checked not to be the name of another volume as well, which v2 does not check: a volume named "12" could not be told from the volume of index 12, and acting upon the wrong one loses data.
func (*Array) Reports ¶
Reports returns the sections of its configuration this array pushes to the collector.
The section names are the ones v2 pushes for an xtremio array, because the collector reads them to know what it was handed.
func (*Array) ResizeDisk ¶
ResizeDisk resizes a volume. A size beginning with a plus is added to the size the volume has.
The size the volume has is read in either case, because a size below it drops the end of the volume, which is refused unless truncate allows it.
type OptAddDisk ¶
type OptAddDisk struct {
Name string
Size string
Blocksize int
Tags []string
AlignmentOffset int
SmallIOAlerts string
UnalignedIOAlerts string
VAAITPAlerts string
Access string
Mappings []string
LUN int
}
OptAddDisk is what "add disk" was asked for.