arrayxtremio

package
v3.0.0-rc49 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 14, 2026 License: Apache-2.0 Imports: 20 Imported by: 0

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

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDriver

func NewDriver() array.Driver

NewDriver returns an XtremIO array driver.

Types

type Array

type Array struct {
	array.Array
	// contains filtered or unexported fields
}

Array is one XtremIO array, as the node or cluster configuration declares it.

func New

func New() *Array

New returns an XtremIO array.

func (*Array) Actions

func (t *Array) Actions() []array.Action

Actions returns what this array answers to.

func (*Array) AddDisk

func (t *Array) AddDisk(ctx context.Context, opt OptAddDisk) (any, error)

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

func (t *Array) AddMap(ctx context.Context, opt OptAddMap) (any, error)

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

func (t *Array) DelDisk(ctx context.Context, ref string) (any, error)

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) DelMap

func (t *Array) DelMap(ctx context.Context, mapping string) error

DelMap removes one mapping, named by index or by name.

func (*Array) DelVolumeMappings

func (t *Array) DelVolumeMappings(ctx context.Context, ref string) error

DelVolumeMappings unexports the volume named by index or by name from everything it is exported to.

func (*Array) GetVolume

func (t *Array) GetVolume(ctx context.Context, ref string) (*volume, error)

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

func (t *Array) Reports() []array.Report

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

func (t *Array) ResizeDisk(ctx context.Context, ref, sizeExpr string, truncate bool) (any, error)

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.

func (*Array) Run

func (t *Array) Run(args []string) error

Run builds the command tree of this array and runs the arguments through it. What the tree holds is declared in Actions.

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.

type OptAddMap

type OptAddMap struct {
	Volume         string
	Mappings       []string
	InitiatorGroup string
	TargetGroup    string
	LUN            int
}

OptAddMap is what "add map" was asked for.

type OptDelMap

type OptDelMap struct {
	Mapping        string
	Volume         string
	InitiatorGroup string
	TargetGroup    string
}

OptDelMap is what "del map" was asked for.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL