arrayhoc

package
v3.0.0-rc45 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	// Resize methods
	ResizeExact resizeMethod = iota
	ResizeUp
	ResizeDown
)

Variables

View Source
var (
	HostModeOptionVeritasDatabaseEditionAdvancedCluster      = 2
	HostModeOptionVeritasClusterServer                       = 22
	HostModeOptionSupportSPC3BehaviorOnPersistentReservation = 25

	RenewStatus    = 401
	RequestTimeout = 10 * time.Second
	DefaultDelay   = 1 * time.Second
	Head           = "/v1"

	JobStatusInProgress        = "IN_PROGRESS"
	JobStatusSuccess           = "SUCCESS"
	JobStatusSuccessWithErrors = "SUCCESS_WITH_ERRORS"
	JobStatusFailed            = "FAILED"
)

Functions

func NewDriver

func NewDriver() array.Driver

Types

type Array

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

func New

func New() *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) (array.Disk, error)

func (*Array) DelDisk

func (t *Array) DelDisk(ctx context.Context, opt OptDelDisk) (array.Disk, error)

func (*Array) Do

func (t *Array) Do(req *http.Request, v interface{}) (*http.Response, error)

func (*Array) DoJob

func (t *Array) DoJob(ctx context.Context, req *http.Request) (hocJob, error)

func (*Array) GetControllers

func (t *Array) GetControllers(ctx context.Context, opt OptGetItems) (any, error)

func (*Array) GetDisks

func (t *Array) GetDisks(ctx context.Context, opt OptGetItems) (any, error)

func (*Array) GetHostGroups

func (t *Array) GetHostGroups(ctx context.Context, opt OptGetItems) (any, error)

func (*Array) GetJobs

func (t *Array) GetJobs(ctx context.Context, opt OptGetItems) (any, error)

func (*Array) GetPortWithWWPN

func (t *Array) GetPortWithWWPN(ctx context.Context, wwpn string) (hocPort, error)

func (*Array) GetServerWithWWPN

func (t *Array) GetServerWithWWPN(ctx context.Context, wwpn string) (hocServer, error)

func (*Array) GetServers

func (t *Array) GetServers(ctx context.Context, opt OptGetItems) ([]hocServer, error)

func (*Array) GetStoragePools

func (t *Array) GetStoragePools(ctx context.Context, opt OptGetItems) (any, error)

func (*Array) GetStoragePorts

func (t *Array) GetStoragePorts(ctx context.Context, opt OptGetItems) ([]hocPort, error)

func (*Array) GetStorageSystem

func (t *Array) GetStorageSystem(ctx context.Context) (hocStorageSystem, error)

func (*Array) GetStorageSystems

func (t *Array) GetStorageSystems(ctx context.Context, opt OptGetItems) ([]hocStorageSystem, error)

func (*Array) GetSystemTasks

func (t *Array) GetSystemTasks(ctx context.Context, opt OptGetItems) (any, error)

func (*Array) GetVolumeGroups

func (t *Array) GetVolumeGroups(ctx context.Context, opt OptGetItems) (any, error)

func (*Array) GetVolumes

func (t *Array) GetVolumes(ctx context.Context, opt OptGetItems) ([]hocVolume, error)

func (*Array) MapDisk

func (t *Array) MapDisk(ctx context.Context, opt OptMapDisk) (array.Disk, error)

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 hcs array, because the collector reads them to know what it was handed: a collector serving both agents stores what either of them pushes in the same place.

func (*Array) ResizeDisk

func (t *Array) ResizeDisk(ctx context.Context, opt OptResizeDisk) (hocVolume, error)

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.

func (*Array) UnmapDisk

func (t *Array) UnmapDisk(ctx context.Context, opt OptUnmapDisk) (array.Disk, error)

func (*Array) WWN

func (t *Array) WWN(id int) string

type OptAddDisk

type OptAddDisk struct {
	Volume  OptAddVolume
	Mapping OptMapping
}

type OptAddVolume

type OptAddVolume struct {
	Name                    string
	Size                    string
	PoolId                  string
	Compression             bool
	Deduplication           bool
	VirtualStorageMachineId string
}

type OptAttach

type OptAttach struct {
	StorageSystemId      string            `json:"storageSystemId,omitempty"`
	IntendedImageType    string            `json:"intendedImageType,omitempty"`
	Volumes              []OptAttachVolume `json:"volumes,omitempty"`
	Ports                []OptAttachPort   `json:"ports,omitempty"`
	EnableLUNUnification bool              `json:"enableLunUnification,omitempty"`
	EnableZoning         *bool             `json:"enableZoning,omitempty"`
	HostModeOptions      []int             `json:"hostModeOptions,omitempty"`
}

type OptAttachPort

type OptAttachPort struct {
	ServerId   int      `json:"serverId,omitempty"`
	ServerWWNs []string `json:"serverWwns,omitempty"`
	PortIds    []string `json:"portIds,omitempty"`
}

type OptAttachVolume

type OptAttachVolume struct {
	VolumeId int `json:"volumeId,omitempty"`
	LUN      int `json:"lun,omitempty"`
}

type OptDelDisk

type OptDelDisk struct {
	Volume OptVolume
}

type OptGetItems

type OptGetItems struct {
	Volume OptVolume
	Filter string
}

type OptHost

type OptHost struct {
	Host      string
	HostGroup string
}

type OptMapDisk

type OptMapDisk struct {
	Volume  OptVolume
	Mapping OptMapping
}

type OptMapping

type OptMapping struct {
	Mappings          []string
	HostGroupNames    []string
	LUN               int
	VolumeIdRangeFrom int
	VolumeIdRangeTo   int
}

type OptResizeDisk

type OptResizeDisk struct {
	Volume OptVolume
	Size   string
}

type OptUnmapDisk

type OptUnmapDisk struct {
	Volume  OptVolume
	Mapping OptMapping
}

type OptVolume

type OptVolume struct {
	ID     int
	Name   string
	Serial string
}

func (OptVolume) Filter

func (opt OptVolume) Filter() string

Jump to

Keyboard shortcuts

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