eseries

package
v1.2.1 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2016 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GenericResponseMalformed int = 422
View Source
var GenericResponseNoContent int = 204
View Source
var GenericResponseNotFound int = 404
View Source
var GenericResponseOffline int = 424
View Source
var GenericResponseOkay int = 200
View Source
var GenericResponseSuccess int = 201

Functions

This section is empty.

Types

type CallResponseError

type CallResponseError struct {
	ErrorMsg     string `json:"errorMessage"`
	LocalizedMsg string `json:"localizedMessage"`
	ReturnCode   string `json:"retcode"`
	CodeType     string `json:"codeType"` //'symbol', 'webservice', 'systemerror', 'devicemgrerror'
}

Used for errors on RESTful calls to return what went wrong

type Driver

type Driver struct {
	// contains filtered or unexported fields
}

Driver is the object to use for interacting with the Array

func NewDriver

func NewDriver(config DriverConfig) *Driver

NewDriver is a factory method for creating a new instance

func (Driver) Connect

func (d Driver) Connect() (response string, err error)

Add Arry to Web Services Proxy

func (Driver) CreateVolume

func (d Driver) CreateVolume(name string, volumeGroupRef string, size string, mediaType string) (volumeRef string, err error)

func (Driver) DestroyVolume

func (d Driver) DestroyVolume(name string) (err error)

func (Driver) IsVolumeAlreadyMappedToHost

func (d Driver) IsVolumeAlreadyMappedToHost(name string, hostRef string) (isMapped bool, lunNumber int, err error)

func (Driver) MapVolume

func (d Driver) MapVolume(name string, hostRef string) (lunNumber int, err error)

func (Driver) SendMsg

func (d Driver) SendMsg(data []byte, sendType string, msgType string) (*http.Response, error)

Pass in marshaled json byte array

func (Driver) UnmapVolume

func (d Driver) UnmapVolume(name string) (err error)

func (Driver) VerifyHostIQN

func (d Driver) VerifyHostIQN(iqn string) (hostRef string, err error)

func (Driver) VerifyVolumeExists

func (d Driver) VerifyVolumeExists(name string) (err error)

func (Driver) VerifyVolumePools

func (d Driver) VerifyVolumePools(mediaType string, size string) (VolumeGroupRef string, err error)

type DriverConfig

type DriverConfig struct {
	//Web Proxy Services Info
	WebProxy_Hostname string
	Username          string
	Password          string

	//Array Info
	Controller_A     string
	Controller_B     string
	Password_Array   string
	Array_Registered bool

	//Host Connectivity
	HostData_IP string //for iSCSI with multipathing this can be either IP on host

	//Internal Config Variables
	ArrayID string //Unique ID for array once added to web proxy services
	Volumes map[string]*VolumeInfo
}

DriverConfig holds the configuration data for Driver objects

type HostExHostPort

type HostExHostPort struct {
}

type HostExInitiator

type HostExInitiator struct {
	InitiatorRef string             `json:"initiatorRef"`
	NodeName     HostExScsiNodeName `json:"nodeName"`
	Label        string             `json:"label"`
}

type HostExResponse

type HostExResponse struct {
	HostRef    string            `json:"hostRef"`
	Label      string            `json:"label"`
	Initiators []HostExInitiator `json:"initiators"`
}

Obtain information about all hosts on array

type HostExScsiNodeName

type HostExScsiNodeName struct {
	IoInterfaceType string `json:"ioInterfaceType"` //scsi, fc, sata, iscsi, ib, fcoe, __UNDEFINED
	IscsiNodeName   string `json:"iscsiNodeName"`   //IQN from host
}

type LUNMapping

type LUNMapping struct {
	LunMappingRef string `json:"lunMappingRef"`
	LunNumber     int    `json:"lun"`
	VolumeRef     string `json:"volumeRef"`
	HostRef       string `json:"mapRef"`
}

Structure that reflects LUN information

type MsgConnect

type MsgConnect struct {
	ControllerAddresses []string `json:"controllerAddresses"`
	Password            string   `json:"password,omitempty"`
}

Add array to Web Services Proxy

type MsgConnectResponse

type MsgConnectResponse struct {
	ArrayID       string `json:"id"`
	AlreadyExists bool   `json:"alreadyExists"`
}

type MsgVolumeEx

type MsgVolumeEx struct {
	VolumeGroupRef   string `json:"poolId"`
	Name             string `json:"name"`
	SizeUnit         string `json:"sizeUnit"` //bytes, b, kb, mb, gb, tb, pb, eb, zb, yb
	Size             int    `json:"size"`
	SegmentSize      int    `json:"segSize"`
	DataAssurance    bool   `json:"dataAssuranceEnabled,omitempty"`
	OwningController string `json:"owningControllerId,omitempty"`
}

Create a volume

type MsgVolumeExResponse

type MsgVolumeExResponse struct {
	IsOffline      bool         `json:"offline"`
	Label          string       `json:"label"`
	VolumeSize     string       `json:"capacity"`
	SegmentSize    int          `json:"segmentSize"`
	VolumeRef      string       `json:"volumeRef"`
	VolumeGroupRef string       `json:"volumeGroupRef"`
	ListOfMappings []LUNMapping `json:"listOfMappings"`
	IsMapped       bool         `json:"mapped"`
}

type VolumeGroupExResponse

type VolumeGroupExResponse struct {
	SequenceNumber int    `json:"sequenceNum"`
	IsOffline      bool   `json:"offline"`
	WorldWideName  string `json:"worldWideName"`
	VolumeGroupRef string `json:"volumeGroupRef"`
	VolumeLabel    string `json:"label"`
	FreeSpace      string `json:"freeSpace"` //Documentation says this is an int but really it is a string!
}

Obtain volume group information

type VolumeInfo

type VolumeInfo struct {
	VolumeGroupRef string
	VolumeRef      string

	VolumeSize  int64
	SegmentSize int
	UnitSize    string

	MediaType    string
	SecureVolume bool

	IsVolumeMapped bool
	LunMappingRef  string
	LunNumber      int
}

VolumeInfo hold all the information about a constructed volume on E-Series array and Docker Host Mapping

type VolumeMappingCreateRequest

type VolumeMappingCreateRequest struct {
	MappableObjectId string `json:"mappableObjectId"`
	TargetID         string `json:"targetId"`
	LunNumber        int    `json:"lun,omitempty"`
}

Request to map a created volume to a host

Jump to

Keyboard shortcuts

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