dorado

package
v0.5.3 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2019 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KLunId  = "huaweiLunId"
	KSnapId = "huaweiSnapId"
	KPairId = "huaweiReplicaPairId" // replication pair
)

metadata keys

View Source
const (
	PrefixMappingView = "OpenSDS_MappingView_"
	PrefixLunGroup    = "OpenSDS_LunGroup_"
	PrefixHostGroup   = "OpenSDS_HostGroup_"
)

name prefix

View Source
const (
	ObjectTypeLun             = "11"
	ObjectTypeHost            = "21"
	ObjectTypeSnapshot        = "27"
	ObjectTypeHostGroup       = "14"
	ObjectTypeController      = "207"
	ObjectTypePool            = "216"
	ObjectTypeLunCopy         = 219 // not string, should be integer
	ObjectTypeIscsiInitiator  = "222"
	ObjectTypeFcInitiator     = "223"
	ObjectTypeMappingView     = "245"
	ObjectTypeLunGroup        = "256"
	ObjectTypeReplicationPair = "263"
)

object type id

View Source
const (
	ErrorConnectToServer      = -403
	ErrorUnauthorizedToServer = -401
	ErrorObjectUnavailable    = 1077948996
	ErrorHostGroupNotExist    = 1077937500
)

Error Code

View Source
const (
	ThickLunType         = 0
	ThinLunType          = 1
	MaxNameLength        = 31
	MaxDescriptionLength = 170
	PortNumPerContr      = 2
	PwdExpired           = 3
	PwdReset             = 4
)

misc

View Source
const (
	LunCopySpeedLow     = "1"
	LunCopySpeedMedium  = "2"
	LunCopySpeedHigh    = "3"
	LunCopySpeedHighest = "4"
)

lun copy

View Source
const (
	LunReadyWaitInterval = 2 * time.Second
	LunReadyWaitTimeout  = 20 * time.Second
	LunCopyWaitInterval  = 2 * time.Second
	LunCopyWaitTimeout   = 200 * time.Second
)
View Source
const (
	StatusHealth          = "1"
	StatusQosActive       = "2"
	StatusRunning         = "10"
	StatusVolumeReady     = "27"
	StatusLunCoping       = "39"
	StatusLunCopyStop     = "38"
	StatusLunCopyQueue    = "37"
	StatusLunCopyNotStart = "36"
	StatusLunCopyReady    = "40"
	StatusActive          = "43"
	StatusQosInactive     = "45"
)

Object status key id

View Source
const (
	ArrayTypeReplication   = "1"
	ArrayTypeHeterogeneity = "2"
	ArrayTypeUnknown       = "3"
)

Array type

View Source
const (
	HealthStatusNormal          = "1"
	HealthStatusFault           = "2"
	HealthStatusPreFail         = "3"
	HealthStatusPartiallyBroken = "4"
	HealthStatusDegraded        = "5"
	HealthStatusBadSectorsFound = "6"
	HealthStatusBitErrorsFound  = "7"
	HealthStatusConsistent      = "8"
	HealthStatusInconsistent    = "9"
	HealthStatusBusy            = "10"
	HealthStatusNoInput         = "11"
	HealthStatusLowBattery      = "12"
	HealthStatusSingleLinkFault = "13"
	HealthStatusInvalid         = "14"
	HealthStatusWriteProtect    = "15"
)

Health status

View Source
const (
	RunningStatusNormal      = "1"
	RunningStatusLinkUp      = "10"
	RunningStatusLinkDown    = "11"
	RunningStatusOnline      = "27"
	RunningStatusDisabled    = "31"
	RunningStatusInitialSync = "21"
	RunningStatusSync        = "23"
	RunningStatusSynced      = "24"
	RunningStatusSplit       = "26"
	RunningStatusInterrupted = "34"
	RunningStatusInvalid     = "35"
	RunningStatusConnecting  = "101"
)

Running status

View Source
const (
	DefaultReplicaWaitInterval = 1 * time.Second
	DefaultReplicaWaitTimeout  = 20 * time.Second

	ReplicaSyncMode  = "1"
	ReplicaAsyncMode = "2"
	ReplicaSpeed     = "2"
	ReplicaPeriod    = "3600"
	ReplicaSecondRo  = "2"
	ReplicaSecondRw  = "3"

	ReplicaRunningStatusKey   = "RUNNINGSTATUS"
	ReplicaHealthStatusKey    = "HEALTHSTATUS"
	ReplicaHealthStatusNormal = "1"

	ReplicaLocalDataStatusKey   = "PRIRESDATASTATUS"
	ReplicaRemoteDataStatusKey  = "SECRESDATASTATUS"
	ReplicaDataSyncKey          = "ISDATASYNC"
	ReplicaDataStatusSynced     = "1"
	ReplicaDataStatusComplete   = "2"
	ReplicaDataStatusIncomplete = "3"
)
View Source
const (
	PerfUtilizationPercent = "18"  // usage ratioPerf
	PerfBandwidth          = "21"  // mbs
	PerfIOPS               = "22"  // tps
	PerfServiceTime        = "29"  // excluding queue time(ms)
	PerfCpuUsage           = "68"  // %
	PerfCacheHitRatio      = "303" // %
	PerfLatency            = "370" // ms
)

performance key ids

View Source
const UnitGi = 1024 * 1024 * 1024

Variables

Functions

func EncodeHostName added in v0.1.8

func EncodeHostName(name string) string

func EncodeName added in v0.1.8

func EncodeName(id string) string

func Gb2Sector added in v0.1.8

func Gb2Sector(gb int64) int64

func IsNotFoundError added in v0.5.2

func IsNotFoundError(err error) bool

func Sector2Gb added in v0.1.8

func Sector2Gb(sec string) int64

func TruncateDescription added in v0.1.8

func TruncateDescription(desc string) string

Types

type ArrayInnerError

type ArrayInnerError struct {
	Data interface{} `json:"data"`
	Err  Error       `json:"error"`
}

func (*ArrayInnerError) Error

func (e *ArrayInnerError) Error() string

type Auth

type Auth struct {
	AccountState  int    `json:"accountstate"`
	DeviceId      string `json:"deviceid"`
	IBaseToken    string `json:"iBaseToken"`
	LastLoginIp   string `json:"lastloginip"`
	LastLoginTime int    `json:"lastlogintime"`
	Level         int    `json:"level"`
	PwdChanGeTime int    `json:"pwdchangetime"`
	UserGroup     string `json:"usergroup"`
	UserId        string `json:"userid"`
	UserName      string `json:"username"`
	UserScope     string `json:"userscope"`
}

type AuthOptions

type AuthOptions struct {
	Username        string `yaml:"username,omitempty"`
	Password        string `yaml:"password,omitempty"`
	PwdEncrypter    string `yaml:"PwdEncrypter,omitempty"`
	EnableEncrypted bool   `yaml:"EnableEncrypted,omitempty"`
	Endpoints       string `yaml:"endpoints,omitempty"`
	Insecure        bool   `yaml:"insecure,omitempty"`
}

type AuthResp

type AuthResp struct {
	Data  Auth  `json:"data"`
	Error Error `json:"error"`
}

type Config added in v0.5.3

type Config struct {
	Resource string
	Metrics  []string
	Units    []string
}

type Configs added in v0.5.3

type Configs struct {
	Cfgs []Config `yaml:"resources"`
}

type Count added in v0.5.2

type Count struct {
	Count string `json:"COUNT"`
}

type DoradoClient

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

func NewClient

func NewClient(opt *AuthOptions) (*DoradoClient, error)

func (*DoradoClient) AddFCPortTohost added in v0.1.9

func (c *DoradoClient) AddFCPortTohost(hostId string, wwn string) error

func (*DoradoClient) AddHostToHostGroup

func (c *DoradoClient) AddHostToHostGroup(hostId string) (string, error)

func (*DoradoClient) AddHostWithCheck

func (c *DoradoClient) AddHostWithCheck(hostInfo *pb.HostInfo) (string, error)

func (*DoradoClient) AddInitiatorToArray

func (c *DoradoClient) AddInitiatorToArray(initiatorName string) error

func (*DoradoClient) AddInitiatorToHost

func (c *DoradoClient) AddInitiatorToHost(hostId, initiatorName string) error

func (*DoradoClient) AddInitiatorToHostWithCheck

func (c *DoradoClient) AddInitiatorToHostWithCheck(hostId, initiatorName string) error

func (*DoradoClient) AssocateHostGroupToMappingView

func (c *DoradoClient) AssocateHostGroupToMappingView(viewId, groupId string) error

func (*DoradoClient) AssocateLunGroupToMappingView

func (c *DoradoClient) AssocateLunGroupToMappingView(viewId, groupId string) error

func (*DoradoClient) AssociateHostToHostGroup

func (c *DoradoClient) AssociateHostToHostGroup(hostGrpId, hostId string) error

func (*DoradoClient) AssociateLunToLunGroup

func (c *DoradoClient) AssociateLunToLunGroup(lunGrpId, lunId string) error

func (*DoradoClient) CheckLunExist added in v0.1.8

func (c *DoradoClient) CheckLunExist(id, wwn string) bool

func (*DoradoClient) CheckPairExist added in v0.1.8

func (c *DoradoClient) CheckPairExist(id string) bool

func (*DoradoClient) CreateHostGroup

func (c *DoradoClient) CreateHostGroup(groupName string) (string, error)

func (*DoradoClient) CreateHostGroupWithCheck

func (c *DoradoClient) CreateHostGroupWithCheck(hostGrpName string) (string, error)

func (*DoradoClient) CreateLunCopy added in v0.3.2

func (c *DoradoClient) CreateLunCopy(name, srcid, tgtid, copyspeed string) (string, error)

func (*DoradoClient) CreateLunGroup

func (c *DoradoClient) CreateLunGroup(groupName string) (string, error)

func (*DoradoClient) CreateMappingView

func (c *DoradoClient) CreateMappingView(name string) (string, error)

func (*DoradoClient) CreatePair added in v0.1.8

func (c *DoradoClient) CreatePair(params map[string]interface{}) (*ReplicationPair, error)

func (*DoradoClient) CreateSnapshot

func (c *DoradoClient) CreateSnapshot(lunId, name, desc string) (*Snapshot, error)

func (*DoradoClient) CreateVolume

func (c *DoradoClient) CreateVolume(name string, size int64, desc string, poolId string) (*Lun, error)

func (*DoradoClient) DeleteHost

func (c *DoradoClient) DeleteHost(id string) error

func (*DoradoClient) DeleteHostGroup

func (c *DoradoClient) DeleteHostGroup(id string) error

func (*DoradoClient) DeleteLunCopy added in v0.3.2

func (c *DoradoClient) DeleteLunCopy(luncopyid string) error

func (*DoradoClient) DeleteLunGroup

func (c *DoradoClient) DeleteLunGroup(id string) error

func (*DoradoClient) DeleteMappingView

func (c *DoradoClient) DeleteMappingView(id string) error

func (*DoradoClient) DeletePair added in v0.1.8

func (c *DoradoClient) DeletePair(id string) error

func (*DoradoClient) DeleteSnapshot

func (c *DoradoClient) DeleteSnapshot(id string) error

func (*DoradoClient) DeleteVolume

func (c *DoradoClient) DeleteVolume(id string) error

func (*DoradoClient) Destroy

func (c *DoradoClient) Destroy() error

func (*DoradoClient) DoMapping

func (c *DoradoClient) DoMapping(lunId, hostGrpId, hostId string) error

func (*DoradoClient) ExtendVolume added in v0.1.1

func (c *DoradoClient) ExtendVolume(size int64, id string) error

ExtendVolume ...

func (*DoradoClient) FindHostGroup

func (c *DoradoClient) FindHostGroup(groupName string) (string, error)

func (*DoradoClient) FindLunGroup

func (c *DoradoClient) FindLunGroup(groupName string) (string, error)

func (*DoradoClient) FindMappingView

func (c *DoradoClient) FindMappingView(name string) (string, error)

func (*DoradoClient) GetArrayInfo added in v0.1.8

func (c *DoradoClient) GetArrayInfo() (*System, error)

func (*DoradoClient) GetHostFCInitiators added in v0.1.9

func (c *DoradoClient) GetHostFCInitiators(hostId string) ([]string, error)

func (*DoradoClient) GetHostIdByName

func (c *DoradoClient) GetHostIdByName(hostName string) (string, error)

func (*DoradoClient) GetHostIscsiInitiators added in v0.1.9

func (c *DoradoClient) GetHostIscsiInitiators(hostId string) ([]string, error)

func (*DoradoClient) GetHostLunId

func (c *DoradoClient) GetHostLunId(hostId, lunId string) (int, error)

func (*DoradoClient) GetHostOnlineFCInitiators added in v0.1.9

func (c *DoradoClient) GetHostOnlineFCInitiators(hostId string) ([]string, error)

func (*DoradoClient) GetIniTargMap added in v0.1.9

func (c *DoradoClient) GetIniTargMap(wwns []string) ([]string, map[string][]string, error)

func (*DoradoClient) GetLunInfo added in v0.3.2

func (c *DoradoClient) GetLunInfo(id string) (*Lun, error)

func (*DoradoClient) GetOnlineFCInitiatorOnArray added in v0.1.9

func (c *DoradoClient) GetOnlineFCInitiatorOnArray() ([]string, error)

func (*DoradoClient) GetOnlineFreeWWNs added in v0.1.9

func (c *DoradoClient) GetOnlineFreeWWNs() ([]string, error)

func (*DoradoClient) GetPair added in v0.1.8

func (c *DoradoClient) GetPair(id string) (*ReplicationPair, error)

func (*DoradoClient) GetPerformance added in v0.5.3

func (c *DoradoClient) GetPerformance(resId string, dataIdList []string) (map[string]string, error)

func (*DoradoClient) GetPoolIdByName added in v0.1.8

func (c *DoradoClient) GetPoolIdByName(poolName string) (string, error)

func (*DoradoClient) GetSnapshot

func (c *DoradoClient) GetSnapshot(id string) (*Snapshot, error)

func (*DoradoClient) GetSnapshotByName added in v0.1.8

func (c *DoradoClient) GetSnapshotByName(name string) (*Snapshot, error)

func (*DoradoClient) GetVolume

func (c *DoradoClient) GetVolume(id string) (*Lun, error)

func (*DoradoClient) GetVolumeByName added in v0.1.8

func (c *DoradoClient) GetVolumeByName(name string) (*Lun, error)

func (*DoradoClient) IsArrayContainInitiator

func (c *DoradoClient) IsArrayContainInitiator(initiatorName string) bool

func (*DoradoClient) IsHostAssociatedToHostgroup added in v0.1.9

func (c *DoradoClient) IsHostAssociatedToHostgroup(hostId string) (bool, error)

func (*DoradoClient) IsHostContainInitiator

func (c *DoradoClient) IsHostContainInitiator(hostId, initiatorName string) bool

func (*DoradoClient) IsHostGroupContainHost

func (c *DoradoClient) IsHostGroupContainHost(hostGrpId, hostId string) bool

func (*DoradoClient) IsLunGroupContainLun

func (c *DoradoClient) IsLunGroupContainLun(lunGrpId, lunId string) bool

func (*DoradoClient) IsMappingViewContainHostGroup

func (c *DoradoClient) IsMappingViewContainHostGroup(viewId, groupId string) bool

func (*DoradoClient) IsMappingViewContainLunGroup

func (c *DoradoClient) IsMappingViewContainLunGroup(viewId, groupId string) bool

func (*DoradoClient) ListAllStoragePools added in v0.1.8

func (c *DoradoClient) ListAllStoragePools() ([]StoragePool, error)

func (*DoradoClient) ListControllers added in v0.5.3

func (c *DoradoClient) ListControllers() ([]SimpleStruct, error)

func (*DoradoClient) ListHostAssociateLuns

func (c *DoradoClient) ListHostAssociateLuns(hostId string) (*HostAssociateLunsResp, error)

func (*DoradoClient) ListRemoteDevices added in v0.1.8

func (c *DoradoClient) ListRemoteDevices() (*[]RemoteDevice, error)

func (*DoradoClient) ListStoragePools

func (c *DoradoClient) ListStoragePools() ([]StoragePool, error)

func (*DoradoClient) ListTgtPort

func (c *DoradoClient) ListTgtPort() (*IscsiTgtPortsResp, error)

func (*DoradoClient) RemoveHost added in v0.1.9

func (c *DoradoClient) RemoveHost(hostId string) error

func (*DoradoClient) RemoveHostFromHostGroup

func (c *DoradoClient) RemoveHostFromHostGroup(hostGrpId, hostId string) error

func (*DoradoClient) RemoveHostGroupFromMappingView

func (c *DoradoClient) RemoveHostGroupFromMappingView(viewId, hostGrpId string) error

func (*DoradoClient) RemoveIscsiFromHost

func (c *DoradoClient) RemoveIscsiFromHost(initiator string) error

func (*DoradoClient) RemoveLunFromLunGroup

func (c *DoradoClient) RemoveLunFromLunGroup(lunGrpId, lunId string) error

func (*DoradoClient) RemoveLunGroupFromMappingView

func (c *DoradoClient) RemoveLunGroupFromMappingView(viewId, lunGrpId string) error

func (*DoradoClient) SetPairSecondAccess added in v0.1.8

func (c *DoradoClient) SetPairSecondAccess(id string, access string) error

func (*DoradoClient) SplitPair added in v0.1.8

func (c *DoradoClient) SplitPair(id string) error

func (*DoradoClient) StartLunCopy added in v0.3.2

func (c *DoradoClient) StartLunCopy(luncopyid string) error

func (*DoradoClient) SwitchPair added in v0.1.8

func (c *DoradoClient) SwitchPair(id string) error

func (*DoradoClient) SyncPair added in v0.1.8

func (c *DoradoClient) SyncPair(id string) error

type DoradoConfig

type DoradoConfig struct {
	AuthOptions `yaml:"authOptions"`
	Replication `yaml:"replication"`
	Pool        map[string]PoolProperties `yaml:"pool,flow"`
	TargetIp    string                    `yaml:"targetIp,omitempty"`
}

type Driver

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

func (*Driver) CreateSnapshot

func (d *Driver) CreateSnapshot(opt *pb.CreateVolumeSnapshotOpts) (*model.VolumeSnapshotSpec, error)

func (*Driver) CreateVolume

func (d *Driver) CreateVolume(opt *pb.CreateVolumeOpts) (*model.VolumeSpec, error)

func (*Driver) CreateVolumeGroup added in v0.1.8

func (d *Driver) CreateVolumeGroup(opt *pb.CreateVolumeGroupOpts) (*model.VolumeGroupSpec, error)

func (*Driver) DeleteSnapshot

func (d *Driver) DeleteSnapshot(opt *pb.DeleteVolumeSnapshotOpts) error

func (*Driver) DeleteVolume

func (d *Driver) DeleteVolume(opt *pb.DeleteVolumeOpts) error

func (*Driver) DeleteVolumeGroup added in v0.1.8

func (d *Driver) DeleteVolumeGroup(opt *pb.DeleteVolumeGroupOpts) error

func (*Driver) ExtendVolume added in v0.1.1

func (d *Driver) ExtendVolume(opt *pb.ExtendVolumeOpts) (*model.VolumeSpec, error)

ExtendVolume ...

func (*Driver) InitializeConnection

func (d *Driver) InitializeConnection(opt *pb.CreateVolumeAttachmentOpts) (*model.ConnectionInfo, error)

func (*Driver) InitializeConnectionFC added in v0.1.9

func (d *Driver) InitializeConnectionFC(opt *pb.CreateVolumeAttachmentOpts) (*model.ConnectionInfo, error)

func (*Driver) InitializeConnectionIscsi added in v0.1.9

func (d *Driver) InitializeConnectionIscsi(opt *pb.CreateVolumeAttachmentOpts) (*model.ConnectionInfo, error)

func (*Driver) InitializeSnapshotConnection added in v0.3.2

func (d *Driver) InitializeSnapshotConnection(opt *pb.CreateSnapshotAttachmentOpts) (*model.ConnectionInfo, error)

func (*Driver) ListPools

func (d *Driver) ListPools() ([]*model.StoragePoolSpec, error)

func (*Driver) PullSnapshot

func (d *Driver) PullSnapshot(id string) (*model.VolumeSnapshotSpec, error)

func (*Driver) PullVolume

func (d *Driver) PullVolume(volID string) (*model.VolumeSpec, error)

func (*Driver) Setup

func (d *Driver) Setup() (err error)

func (*Driver) TerminateConnection

func (d *Driver) TerminateConnection(opt *pb.DeleteVolumeAttachmentOpts) error

func (*Driver) TerminateConnectionFC added in v0.1.9

func (d *Driver) TerminateConnectionFC(opt *pb.DeleteVolumeAttachmentOpts) error

func (*Driver) TerminateConnectionIscsi added in v0.1.9

func (d *Driver) TerminateConnectionIscsi(opt *pb.DeleteVolumeAttachmentOpts) error

func (*Driver) TerminateSnapshotConnection added in v0.3.2

func (d *Driver) TerminateSnapshotConnection(opt *pb.DeleteSnapshotAttachmentOpts) error

func (*Driver) Unset

func (d *Driver) Unset() error

func (*Driver) UpdateVolumeGroup added in v0.1.8

func (d *Driver) UpdateVolumeGroup(opt *pb.UpdateVolumeGroupOpts) (*model.VolumeGroupSpec, error)

type Error

type Error struct {
	Code        int    `json:"code"`
	Description string `json:"description"`
}

type FCInitiator added in v0.1.9

type FCInitiator struct {
	Isfree        bool   `json:"ISFREE"`
	Id            string `json:"ID"`
	Type          int    `json:"TYPE"`
	RunningStatus string `json:"RUNNINGSTATUS"`
	ParentId      string `json:"PARENTID"`
	ParentType    int    `json:"PARENTTYPE"`
}

type FCInitiatorsResp added in v0.1.9

type FCInitiatorsResp struct {
	Data  []FCInitiator `json:"data"`
	Error Error         `json:"error"`
}

type FCTargWWPN added in v0.1.9

type FCTargWWPN struct {
	IniPortWWN  string `json:"INITIATOR_PORT_WWN"`
	TargPortWWN string `json:"TARGET_PORT_WWN"`
}

type FCTargWWPNResp added in v0.1.9

type FCTargWWPNResp struct {
	Data  []FCTargWWPN `json:"data"`
	Error Error        `json:"error"`
}

type GenericResult

type GenericResult struct {
	Data  interface{} `json:"data"`
	Error Error       `json:"error"`
}

type Host

type Host struct {
	Id               string `json:"ID"`
	Name             string `json:"NAME"`
	OsType           string `json:"OPERATIONSYSTEM"`
	Ip               string `json:"IP"`
	IsAddToHostGroup bool   `json:"ISADD2HOSTGROUP"`
}

type HostAssociateLun

type HostAssociateLun struct {
	Id                string `json:"ID"`
	AssociateMetadata string `json:"ASSOCIATEMETADATA"`
}

type HostAssociateLunsResp

type HostAssociateLunsResp struct {
	Data  []HostAssociateLun `json:"data"`
	Error Error              `json:"error"`
}

type HostGroup

type HostGroup struct {
	Id                string `json:"ID"`
	Name              string `json:"NAME"`
	Description       string `json:"DESCRIPTION"`
	IsAdd2MappingView string `json:"ISADD2MAPPINGVIEW"`
}

type HostGroupResp

type HostGroupResp struct {
	Data  HostGroup `json:"data"`
	Error Error     `json:"error"`
}

type HostGroupsResp

type HostGroupsResp struct {
	Data  []HostGroup `json:"data"`
	Error Error       `json:"error"`
}

type HostResp

type HostResp struct {
	Data  Host  `json:"data"`
	Error Error `json:"error"`
}

type HostsResp

type HostsResp struct {
	Data  []Host `json:"data"`
	Error Error  `json:"error"`
}

type Initiator

type Initiator struct {
	Id         string `json:"ID"`
	Name       string `json:"NAME"`
	ParentId   string `json:"PARENTID"`
	ParentType string `json:"PARENTTYPE"`
	ParentName string `json:"PARENTNAME"`
}

type InitiatorResp

type InitiatorResp struct {
	Data  Initiator `json:"data"`
	Error Error     `json:"error"`
}

type InitiatorsResp

type InitiatorsResp struct {
	Data  []Initiator `json:"data"`
	Error Error       `json:"error"`
}

type IscsiTgtPort

type IscsiTgtPort struct {
	EthPortId string `json:"ETHPORTID"`
	Id        string `json:"ID"`
	Tpgt      string `json:"TPGT"`
	Type      int    `json:"TYPE"`
}

type IscsiTgtPortsResp

type IscsiTgtPortsResp struct {
	Data  []IscsiTgtPort `json:"data"`
	Error Error          `json:"error"`
}

type Lun

type Lun struct {
	AllocCapacity               string `json:"ALLOCCAPACITY"`
	AllocType                   string `json:"ALLOCTYPE"`
	Capability                  string `json:"CAPABILITY"`
	Capacity                    string `json:"CAPACITY"`
	CapacityAlarmLevel          string `json:"CAPACITYALARMLEVEL"`
	Description                 string `json:"DESCRIPTION"`
	DrsEnable                   string `json:"DRS_ENABLE"`
	EnableCompression           string `json:"ENABLECOMPRESSION"`
	EnableIscsiThinLunThreshold string `json:"ENABLEISCSITHINLUNTHRESHOLD"`
	EnableSmartDedup            string `json:"ENABLESMARTDEDUP"`
	ExposedToInitiator          string `json:"EXPOSEDTOINITIATOR"`
	ExtendIfSwitch              string `json:"EXTENDIFSWITCH"`
	HealthStatus                string `json:"HEALTHSTATUS"`
	Id                          string `json:"ID"`
	IsAdd2LunGroup              string `json:"ISADD2LUNGROUP"`
	IsCheckZeroPage             string `json:"ISCHECKZEROPAGE"`
	IscsiThinLunThreshold       string `json:"ISCSITHINLUNTHRESHOLD"`
	LunMigrationOrigin          string `json:"LUNMigrationOrigin"`
	MirrorPolicy                string `json:"MIRRORPOLICY"`
	MirrorType                  string `json:"MIRRORTYPE"`
	Name                        string `json:"NAME"`
	OwningController            string `json:"OWNINGCONTROLLER"`
	ParentId                    string `json:"PARENTID"`
	ParentName                  string `json:"PARENTNAME"`
	PrefetChPolicy              string `json:"PREFETCHPOLICY"`
	PrefetChValue               string `json:"PREFETCHVALUE"`
	RemoteLunId                 string `json:"REMOTELUNID"`
	RemoteReplicationIds        string `json:"REMOTEREPLICATIONIDS"`
	ReplicationCapacity         string `json:"REPLICATION_CAPACITY"`
	RunningStatus               string `json:"RUNNINGSTATUS"`
	RunningWritePolicy          string `json:"RUNNINGWRITEPOLICY"`
	SectorSize                  string `json:"SECTORSIZE"`
	SnapShotIds                 string `json:"SNAPSHOTIDS"`
	SubType                     string `json:"SUBTYPE"`
	ThinCapacityUsage           string `json:"THINCAPACITYUSAGE"`
	Type                        int    `json:"TYPE"`
	UsageType                   string `json:"USAGETYPE"`
	WorkingController           string `json:"WORKINGCONTROLLER"`
	WritePolicy                 string `json:"WRITEPOLICY"`
	Wwn                         string `json:"WWN"`
	RemoteLunWwn                string `json:"remoteLunWwn"`
}

type LunGroup

type LunGroup struct {
	Id                string `json:"ID"`
	Name              string `json:"NAME"`
	Description       string `json:"DESCRIPTION"`
	IsAdd2MappingView string `json:"ISADD2MAPPINGVIEW"`
}

type LunGroupResp

type LunGroupResp struct {
	Data  LunGroup `json:"data"`
	Error Error    `json:"error"`
}

type LunGroupsResp

type LunGroupsResp struct {
	Data  []LunGroup `json:"data"`
	Error Error      `json:"error"`
}

type LunResp

type LunResp struct {
	Data  Lun   `json:"data"`
	Error Error `json:"error"`
}

type LunsResp

type LunsResp struct {
	Data  []Lun `json:"data"`
	Error Error `json:"error"`
}

type MappingView

type MappingView struct {
	Id          string `json:"ID"`
	Name        string `json:"NAME"`
	Description string `json:"DESCRIPTION"`
}

type MappingViewResp

type MappingViewResp struct {
	Data  MappingView `json:"data"`
	Error Error       `json:"error"`
}

type MappingViewsResp

type MappingViewsResp struct {
	Data  []MappingView `json:"data"`
	Error Error         `json:"error"`
}

type MetricDriver added in v0.5.3

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

func (*MetricDriver) CollectControllerMetrics added in v0.5.3

func (d *MetricDriver) CollectControllerMetrics() ([]*model.MetricSpec, error)

func (*MetricDriver) CollectMetrics added in v0.5.3

func (d *MetricDriver) CollectMetrics() ([]*model.MetricSpec, error)

CollectMetrics: Driver entry point to collect metrics. This will be invoked by the dock []*model.MetricSpec -> the array of metrics to be returned

func (*MetricDriver) CollectPerformanceMetrics added in v0.5.3

func (d *MetricDriver) CollectPerformanceMetrics(resId string, metricList []string) (map[string]float64, error)

func (*MetricDriver) CollectPoolMetrics added in v0.5.3

func (d *MetricDriver) CollectPoolMetrics() ([]*model.MetricSpec, error)

func (*MetricDriver) GetMetricList added in v0.5.3

func (d *MetricDriver) GetMetricList(resourceType string) (supportedMetrics []string, err error)

getMetricList:- is to get the list of supported metrics for given resource type supportedMetrics -> list of supported metrics

func (*MetricDriver) Setup added in v0.5.3

func (d *MetricDriver) Setup() (err error)

func (*MetricDriver) Teardown added in v0.5.3

func (*MetricDriver) Teardown() error

type NotFoundError added in v0.5.2

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

func (*NotFoundError) Error added in v0.5.2

func (e *NotFoundError) Error() string

type ObjCountResp added in v0.5.2

type ObjCountResp struct {
	Data  Count `json:"data"`
	Error Error `json:"error"`
}

type PairOperation added in v0.1.8

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

func NewPairOperation added in v0.1.8

func NewPairOperation(client *DoradoClient) *PairOperation

func (*PairOperation) Create added in v0.1.8

func (p *PairOperation) Create(localLunId, rmtLunId, rmtDevId, rmtDevName,
	replicationMode, speed, period string) (*ReplicationPair, error)

func (*PairOperation) Delete added in v0.1.8

func (p *PairOperation) Delete(id string) error

func (*PairOperation) GetReplicationInfo added in v0.1.8

func (p *PairOperation) GetReplicationInfo(id string) (*ReplicationPair, error)

func (*PairOperation) ProtectSecond added in v0.1.8

func (p *PairOperation) ProtectSecond(id string) error

func (*PairOperation) Split added in v0.1.8

func (p *PairOperation) Split(id string) error

func (*PairOperation) Switch added in v0.1.8

func (p *PairOperation) Switch(id string) error

func (*PairOperation) Sync added in v0.1.8

func (p *PairOperation) Sync(id string) error

func (*PairOperation) UnprotectSecond added in v0.1.8

func (p *PairOperation) UnprotectSecond(id string) error

type Performance added in v0.5.3

type Performance struct {
	Uuid       string `json:"CMO_STATISTIC_UUID"`
	DataIdList string `json:"CMO_STATISTIC_DATA_ID_LIST"`
	DataList   string `json:"CMO_STATISTIC_DATA_LIST"`
	TimeStamp  string `json:"CMO_STATISTIC_TIMESTAMP"`
}

type PerformancesResp added in v0.5.3

type PerformancesResp struct {
	Data  []Performance `json:"data"`
	Error Error         `json:"error"`
}

type RemoteDevice added in v0.1.8

type RemoteDevice struct {
	Id            string `json:"ID"`
	Name          string `json:"NAME"`
	ArrayType     string `json:"ARRAYTYPE"`
	HealthStatus  string `json:"HEALTHSTATUS"`
	RunningStatus string `json:"RUNNINGSTATUS"`
	Wwn           string `json:"WWN"`
}

type RemoteDevicesResp added in v0.1.8

type RemoteDevicesResp struct {
	Data  []RemoteDevice `json:"data"`
	Error Error          `json:"error"`
}

type ReplicaCommonDriver added in v0.1.8

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

func NewReplicaCommonDriver added in v0.1.8

func NewReplicaCommonDriver(conf *DoradoConfig, op *PairOperation) *ReplicaCommonDriver

func (*ReplicaCommonDriver) Enable added in v0.1.8

func (r *ReplicaCommonDriver) Enable(replicaId string, waitSyncComplete bool) error

func (*ReplicaCommonDriver) Failover added in v0.1.8

func (r *ReplicaCommonDriver) Failover(replicaId string) error

func (*ReplicaCommonDriver) ProtectSecond added in v0.1.8

func (r *ReplicaCommonDriver) ProtectSecond(replicaId string) error

func (*ReplicaCommonDriver) Split added in v0.1.8

func (r *ReplicaCommonDriver) Split(replicaId string) error

func (*ReplicaCommonDriver) Switch added in v0.1.8

func (r *ReplicaCommonDriver) Switch(replicaId string) error

func (*ReplicaCommonDriver) Sync added in v0.1.8

func (r *ReplicaCommonDriver) Sync(replicaId string, waitComplete bool) error

func (*ReplicaCommonDriver) UnprotectSecond added in v0.1.8

func (r *ReplicaCommonDriver) UnprotectSecond(replicaId string) error

func (*ReplicaCommonDriver) WaitExpectState added in v0.1.8

func (r *ReplicaCommonDriver) WaitExpectState(replicaId string, runningStatus, healthStatus []string) error

func (*ReplicaCommonDriver) WaitReplicaReady added in v0.1.8

func (r *ReplicaCommonDriver) WaitReplicaReady(replicaId string) error

func (*ReplicaCommonDriver) WaitSecondAccess added in v0.1.8

func (r *ReplicaCommonDriver) WaitSecondAccess(replicaId string, accessMode string)

type ReplicaPairMgr added in v0.1.8

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

func NewReplicaPairMgr added in v0.1.8

func NewReplicaPairMgr(conf *DoradoConfig) (r *ReplicaPairMgr, err error)

func (*ReplicaPairMgr) CheckRemoteAvailable added in v0.1.8

func (r *ReplicaPairMgr) CheckRemoteAvailable() bool

func (*ReplicaPairMgr) CreateReplication added in v0.1.8

func (r *ReplicaPairMgr) CreateReplication(localLunId, rmtLunId, replicationMode string, replicaPeriod string) (map[string]string, error)

func (*ReplicaPairMgr) DeletePair added in v0.1.8

func (r *ReplicaPairMgr) DeletePair(id string) error

func (*ReplicaPairMgr) DeleteReplication added in v0.1.8

func (r *ReplicaPairMgr) DeleteReplication(pairId, rmtLunId string) error

func (*ReplicaPairMgr) Failback added in v0.1.8

func (r *ReplicaPairMgr) Failback(pairId string) error

func (*ReplicaPairMgr) Failover added in v0.1.8

func (r *ReplicaPairMgr) Failover(pairId string) error

func (*ReplicaPairMgr) GetRemoteDevInfo added in v0.1.8

func (r *ReplicaPairMgr) GetRemoteDevInfo() (id, name string)

func (*ReplicaPairMgr) TryGetRemoteDevByWwn added in v0.1.8

func (r *ReplicaPairMgr) TryGetRemoteDevByWwn(wwn string) *RemoteDevice

func (*ReplicaPairMgr) TryGetRemoteWwn added in v0.1.8

func (r *ReplicaPairMgr) TryGetRemoteWwn() string

func (*ReplicaPairMgr) WaitVolumeOnline added in v0.1.8

func (r *ReplicaPairMgr) WaitVolumeOnline(client *DoradoClient, lun *Lun, interval, timeout time.Duration) error

type Replication added in v0.1.8

type Replication struct {
	RemoteAuthOpt AuthOptions `yaml:"remoteAuthOptions"`
}

type ReplicationDriver added in v0.1.8

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

ReplicationDriver

func (*ReplicationDriver) CreateReplication added in v0.1.8

func (r *ReplicationDriver) CreateReplication(opt *pb.CreateReplicationOpts) (*model.ReplicationSpec, error)

CreateReplication

func (*ReplicationDriver) DeleteReplication added in v0.1.8

func (r *ReplicationDriver) DeleteReplication(opt *pb.DeleteReplicationOpts) error

func (*ReplicationDriver) DisableReplication added in v0.1.8

func (r *ReplicationDriver) DisableReplication(opt *pb.DisableReplicationOpts) error

func (*ReplicationDriver) EnableReplication added in v0.1.8

func (r *ReplicationDriver) EnableReplication(opt *pb.EnableReplicationOpts) error

func (*ReplicationDriver) FailoverReplication added in v0.1.8

func (r *ReplicationDriver) FailoverReplication(opt *pb.FailoverReplicationOpts) error

func (*ReplicationDriver) Setup added in v0.1.8

func (r *ReplicationDriver) Setup() (err error)

Setup

func (*ReplicationDriver) Unset added in v0.1.8

func (r *ReplicationDriver) Unset() error

Unset

type ReplicationPair added in v0.1.8

type ReplicationPair struct {
	Capacity            string `json:"CAPACITY"`
	CompressValid       string `json:"COMPRESSVALID"`
	EnableCompress      string `json:"ENABLECOMPRESS"`
	HealthStatus        string `json:"HEALTHSTATUS"`
	Id                  string `json:"ID"`
	IsDataSync          string `json:"ISDATASYNC"`
	IsInCg              string `json:"ISINCG"`
	IsPrimary           string `json:"ISPRIMARY"`
	IsRollback          string `json:"ISROLLBACK"`
	LocalResId          string `json:"LOCALRESID"`
	LocalResName        string `json:"LOCALRESNAME"`
	LocalResType        string `json:"LOCALRESTYPE"`
	PriResDataStatus    string `json:"PRIRESDATASTATUS"`
	RecoveryPolicy      string `json:"RECOVERYPOLICY"`
	RemoteDeviceId      string `json:"REMOTEDEVICEID"`
	RemoteDeviceName    string `json:"REMOTEDEVICENAME"`
	RemoteDeviceSn      string `json:"REMOTEDEVICESN"`
	RemoteResId         string `json:"REMOTERESID"`
	RemoteResName       string `json:"REMOTERESNAME"`
	ReplicationMode     string `json:"REPLICATIONMODEL"`
	ReplicationProgress string `json:"REPLICATIONPROGRESS"`
	RunningStatus       string `json:"RUNNINGSTATUS"`
	SecResAccess        string `json:"SECRESACCESS"`
	SecResDataStatus    string `json:"SECRESDATASTATUS"`
	Speed               string `json:"SPEED"`
	SynchronizeType     string `json:"SYNCHRONIZETYPE"`
	SyncLeftTime        string `json:"SYNCLEFTTIME"`
	TimeDifference      string `json:"TIMEDIFFERENCE"`
	RemTimeoutPeriod    string `json:"REMTIMEOUTPERIOD"`
	Type                string `json:"TYPE"`
}

type ReplicationPairResp added in v0.1.8

type ReplicationPairResp struct {
	Data  ReplicationPair `json:"data"`
	Error Error           `json:"error"`
}

type SimpleResp

type SimpleResp struct {
	Data  []SimpleStruct `json:"data"`
	Error Error          `json:"error"`
}

type SimpleStruct

type SimpleStruct struct {
	Id   string `json:"ID"`
	Name string `json:"NAME"`
}

type Snapshot

type Snapshot struct {
	CascadedLevel         string `json:"CASCADEDLEVEL"`
	CascadedNum           string `json:"CASCADEDNUM"`
	ConsumedCapacity      string `json:"CONSUMEDCAPACITY"`
	Description           string `json:"DESCRIPTION"`
	ExposedToInitiator    string `json:"EXPOSEDTOINITIATOR"`
	HealthStatus          string `json:"HEALTHSTATUS"`
	Id                    string `json:"ID"`
	IoClassId             string `json:"IOCLASSID"`
	IoPriority            string `json:"IOPRIORITY"`
	SourceLunCapacity     string `json:"SOURCELUNCAPACITY"`
	Name                  string `json:"NAME"`
	ParentId              string `json:"PARENTID"`
	ParentName            string `json:"PARENTNAME"`
	ParentType            int    `json:"PARENTTYPE"`
	RollBackendTime       string `json:"ROLLBACKENDTIME"`
	RollbackRate          string `json:"ROLLBACKRATE"`
	RollbackSpeed         string `json:"ROLLBACKSPEED"`
	RollbackStartTime     string `json:"ROLLBACKSTARTTIME"`
	RollbackTargetObjId   string `json:"ROLLBACKTARGETOBJID"`
	RollbackTargetObjName string `json:"ROLLBACKTARGETOBJNAME"`
	RunningStatus         string `json:"RUNNINGSTATUS"`
	SourceLunId           string `json:"SOURCELUNID"`
	SourceLunName         string `json:"SOURCELUNNAME"`
	SubType               string `json:"SUBTYPE"`
	TimeStamp             string `json:"TIMESTAMP"`
	Type                  int    `json:"TYPE"`
	UserCapacity          string `json:"USERCAPACITY"`
	WorkingController     string `json:"WORKINGCONTROLLER"`
	Wwn                   string `json:"WWN"`
	ReplicationCapacity   string `json:"replicationCapacity"`
}

type SnapshotResp

type SnapshotResp struct {
	Data  Snapshot `json:"data"`
	Error Error    `json:"error"`
}

type SnapshotsResp added in v0.3.2

type SnapshotsResp struct {
	Data  []Snapshot `json:"data"`
	Error Error      `json:"error"`
}

type StoragePool

type StoragePool struct {
	Description       string `json:"DESCRIPTION"`
	Id                string `json:"ID"`
	Name              string `json:"NAME"`
	UserFreeCapacity  string `json:"USERFREECAPACITY"`
	UserTotalCapacity string `json:"USERTOTALCAPACITY"`
}

type StoragePoolsResp

type StoragePoolsResp struct {
	Data  []StoragePool `json:"data"`
	Error Error         `json:"error"`
}

type System added in v0.1.8

type System struct {
	Id          string `json:"ID"`
	Name        string `json:"NAME"`
	Location    string `json:"LOCATION"`
	ProductMode string `json:"PRODUCTMODE"`
	Wwn         string `json:"wwn"`
}

type SystemResp added in v0.1.8

type SystemResp struct {
	Data  System `json:"data"`
	Error Error  `json:"error"`
}

Jump to

Keyboard shortcuts

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