Documentation ¶
Index ¶
- Constants
- Variables
- func EncodeHostName(name string) string
- func EncodeName(id string) string
- func Gb2Sector(gb int64) int64
- func IsNotFoundError(err error) bool
- func Sector2Gb(sec string) int64
- func TruncateDescription(desc string) string
- type ArrayInnerError
- type Auth
- type AuthOptions
- type AuthResp
- type Config
- type Configs
- type Count
- type Driver
- func (d *Driver) CreateSnapshot(opt *pb.CreateVolumeSnapshotOpts) (*model.VolumeSnapshotSpec, error)
- func (d *Driver) CreateVolume(opt *pb.CreateVolumeOpts) (*model.VolumeSpec, error)
- func (d *Driver) CreateVolumeGroup(opt *pb.CreateVolumeGroupOpts) (*model.VolumeGroupSpec, error)
- func (d *Driver) DeleteSnapshot(opt *pb.DeleteVolumeSnapshotOpts) error
- func (d *Driver) DeleteVolume(opt *pb.DeleteVolumeOpts) error
- func (d *Driver) DeleteVolumeGroup(opt *pb.DeleteVolumeGroupOpts) error
- func (d *Driver) ExtendVolume(opt *pb.ExtendVolumeOpts) (*model.VolumeSpec, error)
- func (d *Driver) InitializeConnection(opt *pb.CreateVolumeAttachmentOpts) (*model.ConnectionInfo, error)
- func (d *Driver) InitializeConnectionFC(opt *pb.CreateVolumeAttachmentOpts) (*model.ConnectionInfo, error)
- func (d *Driver) InitializeConnectionIscsi(opt *pb.CreateVolumeAttachmentOpts) (*model.ConnectionInfo, error)
- func (d *Driver) InitializeSnapshotConnection(opt *pb.CreateSnapshotAttachmentOpts) (*model.ConnectionInfo, error)
- func (d *Driver) ListPools() ([]*model.StoragePoolSpec, error)
- func (d *Driver) PullSnapshot(id string) (*model.VolumeSnapshotSpec, error)
- func (d *Driver) PullVolume(volID string) (*model.VolumeSpec, error)
- func (d *Driver) Setup() (err error)
- func (d *Driver) TerminateConnection(opt *pb.DeleteVolumeAttachmentOpts) error
- func (d *Driver) TerminateConnectionFC(opt *pb.DeleteVolumeAttachmentOpts) error
- func (d *Driver) TerminateConnectionIscsi(opt *pb.DeleteVolumeAttachmentOpts) error
- func (d *Driver) TerminateSnapshotConnection(opt *pb.DeleteSnapshotAttachmentOpts) error
- func (d *Driver) Unset() error
- func (d *Driver) UpdateVolumeGroup(opt *pb.UpdateVolumeGroupOpts) (*model.VolumeGroupSpec, error)
- type Error
- type FCInitiator
- type FCInitiatorsResp
- type FCTargWWPN
- type FCTargWWPNResp
- type GenericResult
- type Host
- type HostAssociateLun
- type HostAssociateLunsResp
- type HostGroup
- type HostGroupResp
- type HostGroupsResp
- type HostResp
- type HostsResp
- type Initiator
- type InitiatorResp
- type InitiatorsResp
- type IscsiTgtPort
- type IscsiTgtPortsResp
- type Lun
- type LunGroup
- type LunGroupResp
- type LunGroupsResp
- type LunResp
- type LunsResp
- type MappingView
- type MappingViewResp
- type MappingViewsResp
- type MetricDriver
- func (d *MetricDriver) CollectControllerMetrics() ([]*model.MetricSpec, error)
- func (d *MetricDriver) CollectMetrics() ([]*model.MetricSpec, error)
- func (d *MetricDriver) CollectPerformanceMetrics(resId string, metricList []string) (map[string]float64, error)
- func (d *MetricDriver) CollectPoolMetrics() ([]*model.MetricSpec, error)
- func (d *MetricDriver) GetMetricList(resourceType string) (supportedMetrics []string, err error)
- func (d *MetricDriver) Setup() (err error)
- func (*MetricDriver) Teardown() error
- type NotFoundError
- type ObjCountResp
- type OceanStorClient
- func (c *OceanStorClient) AddFCPortTohost(hostId string, wwn string) error
- func (c *OceanStorClient) AddHostToHostGroup(hostId string) (string, error)
- func (c *OceanStorClient) AddHostWithCheck(hostInfo *pb.HostInfo) (string, error)
- func (c *OceanStorClient) AddInitiatorToArray(initiatorName string) error
- func (c *OceanStorClient) AddInitiatorToHost(hostId, initiatorName string) error
- func (c *OceanStorClient) AddInitiatorToHostWithCheck(hostId, initiatorName string) error
- func (c *OceanStorClient) AssocateHostGroupToMappingView(viewId, groupId string) error
- func (c *OceanStorClient) AssocateLunGroupToMappingView(viewId, groupId string) error
- func (c *OceanStorClient) AssociateHostToHostGroup(hostGrpId, hostId string) error
- func (c *OceanStorClient) AssociateLunToLunGroup(lunGrpId, lunId string) error
- func (c *OceanStorClient) CheckLunExist(id, wwn string) bool
- func (c *OceanStorClient) CheckPairExist(id string) bool
- func (c *OceanStorClient) CreateHostGroup(groupName string) (string, error)
- func (c *OceanStorClient) CreateHostGroupWithCheck(hostGrpName string) (string, error)
- func (c *OceanStorClient) CreateLunCopy(name, srcid, tgtid, copyspeed string) (string, error)
- func (c *OceanStorClient) CreateLunGroup(groupName string) (string, error)
- func (c *OceanStorClient) CreateMappingView(name string) (string, error)
- func (c *OceanStorClient) CreatePair(params map[string]interface{}) (*ReplicationPair, error)
- func (c *OceanStorClient) CreateSnapshot(lunId, name, desc string) (*Snapshot, error)
- func (c *OceanStorClient) CreateVolume(name string, size int64, desc string, poolId string, provPolicy string) (*Lun, error)
- func (c *OceanStorClient) DeleteHost(id string) error
- func (c *OceanStorClient) DeleteHostGroup(id string) error
- func (c *OceanStorClient) DeleteLunCopy(luncopyid string) error
- func (c *OceanStorClient) DeleteLunGroup(id string) error
- func (c *OceanStorClient) DeleteMappingView(id string) error
- func (c *OceanStorClient) DeletePair(id string) error
- func (c *OceanStorClient) DeleteSnapshot(id string) error
- func (c *OceanStorClient) DeleteVolume(id string) error
- func (c *OceanStorClient) Destroy() error
- func (c *OceanStorClient) DoMapping(lunId, hostGrpId, hostId string) error
- func (c *OceanStorClient) ExtendVolume(size int64, id string) error
- func (c *OceanStorClient) FindHostGroup(groupName string) (string, error)
- func (c *OceanStorClient) FindLunGroup(groupName string) (string, error)
- func (c *OceanStorClient) FindMappingView(name string) (string, error)
- func (c *OceanStorClient) GetArrayInfo() (*System, error)
- func (c *OceanStorClient) GetHostFCInitiators(hostId string) ([]string, error)
- func (c *OceanStorClient) GetHostIdByName(hostName string) (string, error)
- func (c *OceanStorClient) GetHostIscsiInitiators(hostId string) ([]string, error)
- func (c *OceanStorClient) GetHostLunId(hostId, lunId string) (int, error)
- func (c *OceanStorClient) GetHostOnlineFCInitiators(hostId string) ([]string, error)
- func (c *OceanStorClient) GetIniTargMap(wwns []string) ([]string, map[string][]string, error)
- func (c *OceanStorClient) GetLunInfo(id string) (*Lun, error)
- func (c *OceanStorClient) GetOnlineFCInitiatorOnArray() ([]string, error)
- func (c *OceanStorClient) GetOnlineFreeWWNs() ([]string, error)
- func (c *OceanStorClient) GetPair(id string) (*ReplicationPair, error)
- func (c *OceanStorClient) GetPerformance(resId string, dataIdList []string) (map[string]string, error)
- func (c *OceanStorClient) GetPoolIdByName(poolName string) (string, error)
- func (c *OceanStorClient) GetSnapshot(id string) (*Snapshot, error)
- func (c *OceanStorClient) GetSnapshotByName(name string) (*Snapshot, error)
- func (c *OceanStorClient) GetVolume(id string) (*Lun, error)
- func (c *OceanStorClient) GetVolumeByName(name string) (*Lun, error)
- func (c *OceanStorClient) IsArrayContainInitiator(initiatorName string) bool
- func (c *OceanStorClient) IsHostAssociatedToHostgroup(hostId string) (bool, error)
- func (c *OceanStorClient) IsHostContainInitiator(hostId, initiatorName string) bool
- func (c *OceanStorClient) IsHostGroupContainHost(hostGrpId, hostId string) bool
- func (c *OceanStorClient) IsLunGroupContainLun(lunGrpId, lunId string) bool
- func (c *OceanStorClient) IsMappingViewContainHostGroup(viewId, groupId string) bool
- func (c *OceanStorClient) IsMappingViewContainLunGroup(viewId, groupId string) bool
- func (c *OceanStorClient) ListAllStoragePools() ([]StoragePool, error)
- func (c *OceanStorClient) ListControllers() ([]SimpleStruct, error)
- func (c *OceanStorClient) ListHostAssociateLuns(hostId string) (*HostAssociateLunsResp, error)
- func (c *OceanStorClient) ListRemoteDevices() (*[]RemoteDevice, error)
- func (c *OceanStorClient) ListStoragePools() ([]StoragePool, error)
- func (c *OceanStorClient) ListTgtPort() (*IscsiTgtPortsResp, error)
- func (c *OceanStorClient) RemoveHost(hostId string) error
- func (c *OceanStorClient) RemoveHostFromHostGroup(hostGrpId, hostId string) error
- func (c *OceanStorClient) RemoveHostGroupFromMappingView(viewId, hostGrpId string) error
- func (c *OceanStorClient) RemoveIscsiFromHost(initiator string) error
- func (c *OceanStorClient) RemoveLunFromLunGroup(lunGrpId, lunId string) error
- func (c *OceanStorClient) RemoveLunGroupFromMappingView(viewId, lunGrpId string) error
- func (c *OceanStorClient) SetPairSecondAccess(id string, access string) error
- func (c *OceanStorClient) SplitPair(id string) error
- func (c *OceanStorClient) StartLunCopy(luncopyid string) error
- func (c *OceanStorClient) SwitchPair(id string) error
- func (c *OceanStorClient) SyncPair(id string) error
- type OceanStorConfig
- type PairOperation
- func (p *PairOperation) Create(...) (*ReplicationPair, error)
- func (p *PairOperation) Delete(id string) error
- func (p *PairOperation) GetReplicationInfo(id string) (*ReplicationPair, error)
- func (p *PairOperation) ProtectSecond(id string) error
- func (p *PairOperation) Split(id string) error
- func (p *PairOperation) Switch(id string) error
- func (p *PairOperation) Sync(id string) error
- func (p *PairOperation) UnprotectSecond(id string) error
- type Performance
- type PerformancesResp
- type RemoteDevice
- type RemoteDevicesResp
- type ReplicaCommonDriver
- func (r *ReplicaCommonDriver) Enable(replicaId string, waitSyncComplete bool) error
- func (r *ReplicaCommonDriver) Failover(replicaId string) error
- func (r *ReplicaCommonDriver) ProtectSecond(replicaId string) error
- func (r *ReplicaCommonDriver) Split(replicaId string) error
- func (r *ReplicaCommonDriver) Switch(replicaId string) error
- func (r *ReplicaCommonDriver) Sync(replicaId string, waitComplete bool) error
- func (r *ReplicaCommonDriver) UnprotectSecond(replicaId string) error
- func (r *ReplicaCommonDriver) WaitExpectState(replicaId string, runningStatus, healthStatus []string) error
- func (r *ReplicaCommonDriver) WaitReplicaReady(replicaId string) error
- func (r *ReplicaCommonDriver) WaitSecondAccess(replicaId string, accessMode string)
- type ReplicaPairMgr
- func (r *ReplicaPairMgr) CheckRemoteAvailable() bool
- func (r *ReplicaPairMgr) CreateReplication(localLunId, rmtLunId, replicationMode string, replicaPeriod string) (map[string]string, error)
- func (r *ReplicaPairMgr) DeletePair(id string) error
- func (r *ReplicaPairMgr) DeleteReplication(pairId, rmtLunId string) error
- func (r *ReplicaPairMgr) Failback(pairId string) error
- func (r *ReplicaPairMgr) Failover(pairId string) error
- func (r *ReplicaPairMgr) GetRemoteDevInfo() (id, name string)
- func (r *ReplicaPairMgr) TryGetRemoteDevByWwn(wwn string) *RemoteDevice
- func (r *ReplicaPairMgr) TryGetRemoteWwn() string
- func (r *ReplicaPairMgr) WaitVolumeOnline(client *OceanStorClient, lun *Lun, interval, timeout time.Duration) error
- type Replication
- type ReplicationDriver
- func (r *ReplicationDriver) CreateReplication(opt *pb.CreateReplicationOpts) (*model.ReplicationSpec, error)
- func (r *ReplicationDriver) DeleteReplication(opt *pb.DeleteReplicationOpts) error
- func (r *ReplicationDriver) DisableReplication(opt *pb.DisableReplicationOpts) error
- func (r *ReplicationDriver) EnableReplication(opt *pb.EnableReplicationOpts) error
- func (r *ReplicationDriver) FailoverReplication(opt *pb.FailoverReplicationOpts) error
- func (r *ReplicationDriver) Setup() (err error)
- func (r *ReplicationDriver) Unset() error
- type ReplicationPair
- type ReplicationPairResp
- type SimpleResp
- type SimpleStruct
- type Snapshot
- type SnapshotResp
- type SnapshotsResp
- type StoragePool
- type StoragePoolsResp
- type System
- type SystemResp
Constants ¶
View Source
const ( KLunId = "huaweiLunId" KSnapId = "huaweiSnapId" KPairId = "huaweiReplicaPairId" // replication pair )
metadata keys
View Source
const ( PrefixMappingView = "OpenSDSMappingView" PrefixLunGroup = "OpenSDSLunGroup" PrefixHostGroup = "OpenSDSHostGroup" )
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 ErrorHostGroupNotExist = 1077937500 ErrorObjectNameAlreadyExist = 1077948993 ErrorHostAlreadyInHostGroup = 1077937501 ErrorObjectIDNotUnique = 1077948997 ErrorHostGroupAlreadyInMappingView = 1073804556 ErrorLunGroupAlreadyInMappingView = 1073804560 ErrorLunNotExist = 1077936859 )
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 ¶
View Source
var LunCopySpeedTypes = []string{LunCopySpeedLow, LunCopySpeedMedium, LunCopySpeedHigh, LunCopySpeedHighest}
Functions ¶
func EncodeHostName ¶
func EncodeName ¶
func IsNotFoundError ¶
func TruncateDescription ¶
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"` VstoreName string `yaml:"vstoreName,omitempty"` PwdEncrypter string `yaml:"PwdEncrypter,omitempty"` EnableEncrypted bool `yaml:"EnableEncrypted,omitempty"` Endpoints string `yaml:"endpoints,omitempty"` Insecure bool `yaml:"insecure,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 ¶
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 ¶
func (d *Driver) DeleteVolumeGroup(opt *pb.DeleteVolumeGroupOpts) error
func (*Driver) ExtendVolume ¶
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 ¶
func (d *Driver) InitializeConnectionFC(opt *pb.CreateVolumeAttachmentOpts) (*model.ConnectionInfo, error)
func (*Driver) InitializeConnectionIscsi ¶
func (d *Driver) InitializeConnectionIscsi(opt *pb.CreateVolumeAttachmentOpts) (*model.ConnectionInfo, error)
func (*Driver) InitializeSnapshotConnection ¶
func (d *Driver) InitializeSnapshotConnection(opt *pb.CreateSnapshotAttachmentOpts) (*model.ConnectionInfo, 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) TerminateConnection ¶
func (d *Driver) TerminateConnection(opt *pb.DeleteVolumeAttachmentOpts) error
func (*Driver) TerminateConnectionFC ¶
func (d *Driver) TerminateConnectionFC(opt *pb.DeleteVolumeAttachmentOpts) error
func (*Driver) TerminateConnectionIscsi ¶
func (d *Driver) TerminateConnectionIscsi(opt *pb.DeleteVolumeAttachmentOpts) error
func (*Driver) TerminateSnapshotConnection ¶
func (d *Driver) TerminateSnapshotConnection(opt *pb.DeleteSnapshotAttachmentOpts) error
func (*Driver) UpdateVolumeGroup ¶
func (d *Driver) UpdateVolumeGroup(opt *pb.UpdateVolumeGroupOpts) (*model.VolumeGroupSpec, error)
type FCInitiator ¶
type FCInitiatorsResp ¶
type FCInitiatorsResp struct { Data []FCInitiator `json:"data"` Error Error `json:"error"` }
type FCTargWWPN ¶
type FCTargWWPNResp ¶
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 HostAssociateLun ¶
type HostAssociateLunsResp ¶
type HostAssociateLunsResp struct { Data []HostAssociateLun `json:"data"` Error Error `json:"error"` }
type HostGroupResp ¶
type HostGroupsResp ¶
type InitiatorResp ¶
type InitiatorsResp ¶
type IscsiTgtPort ¶
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 LunGroupResp ¶
type LunGroupsResp ¶
type MappingView ¶
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 ¶
type MetricDriver struct {
// contains filtered or unexported fields
}
func (*MetricDriver) CollectControllerMetrics ¶
func (d *MetricDriver) CollectControllerMetrics() ([]*model.MetricSpec, error)
func (*MetricDriver) CollectMetrics ¶
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 ¶
func (*MetricDriver) CollectPoolMetrics ¶
func (d *MetricDriver) CollectPoolMetrics() ([]*model.MetricSpec, error)
func (*MetricDriver) GetMetricList ¶
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 ¶
func (d *MetricDriver) Setup() (err error)
func (*MetricDriver) Teardown ¶
func (*MetricDriver) Teardown() error
type NotFoundError ¶
type NotFoundError struct {
// contains filtered or unexported fields
}
func (*NotFoundError) Error ¶
func (e *NotFoundError) Error() string
type ObjCountResp ¶
type OceanStorClient ¶
type OceanStorClient struct {
// contains filtered or unexported fields
}
func NewClient ¶
func NewClient(opt *AuthOptions) (*OceanStorClient, error)
func (*OceanStorClient) AddFCPortTohost ¶
func (c *OceanStorClient) AddFCPortTohost(hostId string, wwn string) error
func (*OceanStorClient) AddHostToHostGroup ¶
func (c *OceanStorClient) AddHostToHostGroup(hostId string) (string, error)
func (*OceanStorClient) AddHostWithCheck ¶
func (c *OceanStorClient) AddHostWithCheck(hostInfo *pb.HostInfo) (string, error)
func (*OceanStorClient) AddInitiatorToArray ¶
func (c *OceanStorClient) AddInitiatorToArray(initiatorName string) error
func (*OceanStorClient) AddInitiatorToHost ¶
func (c *OceanStorClient) AddInitiatorToHost(hostId, initiatorName string) error
func (*OceanStorClient) AddInitiatorToHostWithCheck ¶
func (c *OceanStorClient) AddInitiatorToHostWithCheck(hostId, initiatorName string) error
func (*OceanStorClient) AssocateHostGroupToMappingView ¶
func (c *OceanStorClient) AssocateHostGroupToMappingView(viewId, groupId string) error
func (*OceanStorClient) AssocateLunGroupToMappingView ¶
func (c *OceanStorClient) AssocateLunGroupToMappingView(viewId, groupId string) error
func (*OceanStorClient) AssociateHostToHostGroup ¶
func (c *OceanStorClient) AssociateHostToHostGroup(hostGrpId, hostId string) error
func (*OceanStorClient) AssociateLunToLunGroup ¶
func (c *OceanStorClient) AssociateLunToLunGroup(lunGrpId, lunId string) error
func (*OceanStorClient) CheckLunExist ¶
func (c *OceanStorClient) CheckLunExist(id, wwn string) bool
func (*OceanStorClient) CheckPairExist ¶
func (c *OceanStorClient) CheckPairExist(id string) bool
func (*OceanStorClient) CreateHostGroup ¶
func (c *OceanStorClient) CreateHostGroup(groupName string) (string, error)
func (*OceanStorClient) CreateHostGroupWithCheck ¶
func (c *OceanStorClient) CreateHostGroupWithCheck(hostGrpName string) (string, error)
func (*OceanStorClient) CreateLunCopy ¶
func (c *OceanStorClient) CreateLunCopy(name, srcid, tgtid, copyspeed string) (string, error)
func (*OceanStorClient) CreateLunGroup ¶
func (c *OceanStorClient) CreateLunGroup(groupName string) (string, error)
func (*OceanStorClient) CreateMappingView ¶
func (c *OceanStorClient) CreateMappingView(name string) (string, error)
func (*OceanStorClient) CreatePair ¶
func (c *OceanStorClient) CreatePair(params map[string]interface{}) (*ReplicationPair, error)
func (*OceanStorClient) CreateSnapshot ¶
func (c *OceanStorClient) CreateSnapshot(lunId, name, desc string) (*Snapshot, error)
func (*OceanStorClient) CreateVolume ¶
func (*OceanStorClient) DeleteHost ¶
func (c *OceanStorClient) DeleteHost(id string) error
func (*OceanStorClient) DeleteHostGroup ¶
func (c *OceanStorClient) DeleteHostGroup(id string) error
func (*OceanStorClient) DeleteLunCopy ¶
func (c *OceanStorClient) DeleteLunCopy(luncopyid string) error
func (*OceanStorClient) DeleteLunGroup ¶
func (c *OceanStorClient) DeleteLunGroup(id string) error
func (*OceanStorClient) DeleteMappingView ¶
func (c *OceanStorClient) DeleteMappingView(id string) error
func (*OceanStorClient) DeletePair ¶
func (c *OceanStorClient) DeletePair(id string) error
func (*OceanStorClient) DeleteSnapshot ¶
func (c *OceanStorClient) DeleteSnapshot(id string) error
func (*OceanStorClient) DeleteVolume ¶
func (c *OceanStorClient) DeleteVolume(id string) error
func (*OceanStorClient) Destroy ¶
func (c *OceanStorClient) Destroy() error
func (*OceanStorClient) DoMapping ¶
func (c *OceanStorClient) DoMapping(lunId, hostGrpId, hostId string) error
func (*OceanStorClient) ExtendVolume ¶
func (c *OceanStorClient) ExtendVolume(size int64, id string) error
ExtendVolume ...
func (*OceanStorClient) FindHostGroup ¶
func (c *OceanStorClient) FindHostGroup(groupName string) (string, error)
func (*OceanStorClient) FindLunGroup ¶
func (c *OceanStorClient) FindLunGroup(groupName string) (string, error)
func (*OceanStorClient) FindMappingView ¶
func (c *OceanStorClient) FindMappingView(name string) (string, error)
func (*OceanStorClient) GetArrayInfo ¶
func (c *OceanStorClient) GetArrayInfo() (*System, error)
func (*OceanStorClient) GetHostFCInitiators ¶
func (c *OceanStorClient) GetHostFCInitiators(hostId string) ([]string, error)
func (*OceanStorClient) GetHostIdByName ¶
func (c *OceanStorClient) GetHostIdByName(hostName string) (string, error)
func (*OceanStorClient) GetHostIscsiInitiators ¶
func (c *OceanStorClient) GetHostIscsiInitiators(hostId string) ([]string, error)
func (*OceanStorClient) GetHostLunId ¶
func (c *OceanStorClient) GetHostLunId(hostId, lunId string) (int, error)
func (*OceanStorClient) GetHostOnlineFCInitiators ¶
func (c *OceanStorClient) GetHostOnlineFCInitiators(hostId string) ([]string, error)
func (*OceanStorClient) GetIniTargMap ¶
func (*OceanStorClient) GetLunInfo ¶
func (c *OceanStorClient) GetLunInfo(id string) (*Lun, error)
func (*OceanStorClient) GetOnlineFCInitiatorOnArray ¶
func (c *OceanStorClient) GetOnlineFCInitiatorOnArray() ([]string, error)
func (*OceanStorClient) GetOnlineFreeWWNs ¶
func (c *OceanStorClient) GetOnlineFreeWWNs() ([]string, error)
func (*OceanStorClient) GetPair ¶
func (c *OceanStorClient) GetPair(id string) (*ReplicationPair, error)
func (*OceanStorClient) GetPerformance ¶
func (*OceanStorClient) GetPoolIdByName ¶
func (c *OceanStorClient) GetPoolIdByName(poolName string) (string, error)
func (*OceanStorClient) GetSnapshot ¶
func (c *OceanStorClient) GetSnapshot(id string) (*Snapshot, error)
func (*OceanStorClient) GetSnapshotByName ¶
func (c *OceanStorClient) GetSnapshotByName(name string) (*Snapshot, error)
func (*OceanStorClient) GetVolumeByName ¶
func (c *OceanStorClient) GetVolumeByName(name string) (*Lun, error)
func (*OceanStorClient) IsArrayContainInitiator ¶
func (c *OceanStorClient) IsArrayContainInitiator(initiatorName string) bool
func (*OceanStorClient) IsHostAssociatedToHostgroup ¶
func (c *OceanStorClient) IsHostAssociatedToHostgroup(hostId string) (bool, error)
func (*OceanStorClient) IsHostContainInitiator ¶
func (c *OceanStorClient) IsHostContainInitiator(hostId, initiatorName string) bool
func (*OceanStorClient) IsHostGroupContainHost ¶
func (c *OceanStorClient) IsHostGroupContainHost(hostGrpId, hostId string) bool
func (*OceanStorClient) IsLunGroupContainLun ¶
func (c *OceanStorClient) IsLunGroupContainLun(lunGrpId, lunId string) bool
func (*OceanStorClient) IsMappingViewContainHostGroup ¶
func (c *OceanStorClient) IsMappingViewContainHostGroup(viewId, groupId string) bool
func (*OceanStorClient) IsMappingViewContainLunGroup ¶
func (c *OceanStorClient) IsMappingViewContainLunGroup(viewId, groupId string) bool
func (*OceanStorClient) ListAllStoragePools ¶
func (c *OceanStorClient) ListAllStoragePools() ([]StoragePool, error)
func (*OceanStorClient) ListControllers ¶
func (c *OceanStorClient) ListControllers() ([]SimpleStruct, error)
func (*OceanStorClient) ListHostAssociateLuns ¶
func (c *OceanStorClient) ListHostAssociateLuns(hostId string) (*HostAssociateLunsResp, error)
func (*OceanStorClient) ListRemoteDevices ¶
func (c *OceanStorClient) ListRemoteDevices() (*[]RemoteDevice, error)
func (*OceanStorClient) ListStoragePools ¶
func (c *OceanStorClient) ListStoragePools() ([]StoragePool, error)
func (*OceanStorClient) ListTgtPort ¶
func (c *OceanStorClient) ListTgtPort() (*IscsiTgtPortsResp, error)
func (*OceanStorClient) RemoveHost ¶
func (c *OceanStorClient) RemoveHost(hostId string) error
func (*OceanStorClient) RemoveHostFromHostGroup ¶
func (c *OceanStorClient) RemoveHostFromHostGroup(hostGrpId, hostId string) error
func (*OceanStorClient) RemoveHostGroupFromMappingView ¶
func (c *OceanStorClient) RemoveHostGroupFromMappingView(viewId, hostGrpId string) error
func (*OceanStorClient) RemoveIscsiFromHost ¶
func (c *OceanStorClient) RemoveIscsiFromHost(initiator string) error
func (*OceanStorClient) RemoveLunFromLunGroup ¶
func (c *OceanStorClient) RemoveLunFromLunGroup(lunGrpId, lunId string) error
func (*OceanStorClient) RemoveLunGroupFromMappingView ¶
func (c *OceanStorClient) RemoveLunGroupFromMappingView(viewId, lunGrpId string) error
func (*OceanStorClient) SetPairSecondAccess ¶
func (c *OceanStorClient) SetPairSecondAccess(id string, access string) error
func (*OceanStorClient) SplitPair ¶
func (c *OceanStorClient) SplitPair(id string) error
func (*OceanStorClient) StartLunCopy ¶
func (c *OceanStorClient) StartLunCopy(luncopyid string) error
func (*OceanStorClient) SwitchPair ¶
func (c *OceanStorClient) SwitchPair(id string) error
func (*OceanStorClient) SyncPair ¶
func (c *OceanStorClient) SyncPair(id string) error
type OceanStorConfig ¶
type OceanStorConfig struct { AuthOptions `yaml:"authOptions"` Replication `yaml:"replication"` Pool map[string]PoolProperties `yaml:"pool,flow"` TargetIp string `yaml:"targetIp,omitempty"` }
type PairOperation ¶
type PairOperation struct {
// contains filtered or unexported fields
}
func NewPairOperation ¶
func NewPairOperation(client *OceanStorClient) *PairOperation
func (*PairOperation) Create ¶
func (p *PairOperation) Create(localLunId, rmtLunId, rmtDevId, rmtDevName, replicationMode, speed, period string) (*ReplicationPair, error)
func (*PairOperation) Delete ¶
func (p *PairOperation) Delete(id string) error
func (*PairOperation) GetReplicationInfo ¶
func (p *PairOperation) GetReplicationInfo(id string) (*ReplicationPair, error)
func (*PairOperation) ProtectSecond ¶
func (p *PairOperation) ProtectSecond(id string) error
func (*PairOperation) Split ¶
func (p *PairOperation) Split(id string) error
func (*PairOperation) Switch ¶
func (p *PairOperation) Switch(id string) error
func (*PairOperation) Sync ¶
func (p *PairOperation) Sync(id string) error
func (*PairOperation) UnprotectSecond ¶
func (p *PairOperation) UnprotectSecond(id string) error
type Performance ¶
type PerformancesResp ¶
type PerformancesResp struct { Data []Performance `json:"data"` Error Error `json:"error"` }
type RemoteDevice ¶
type RemoteDevicesResp ¶
type RemoteDevicesResp struct { Data []RemoteDevice `json:"data"` Error Error `json:"error"` }
type ReplicaCommonDriver ¶
type ReplicaCommonDriver struct {
// contains filtered or unexported fields
}
func NewReplicaCommonDriver ¶
func NewReplicaCommonDriver(conf *OceanStorConfig, op *PairOperation) *ReplicaCommonDriver
func (*ReplicaCommonDriver) Enable ¶
func (r *ReplicaCommonDriver) Enable(replicaId string, waitSyncComplete bool) error
func (*ReplicaCommonDriver) Failover ¶
func (r *ReplicaCommonDriver) Failover(replicaId string) error
func (*ReplicaCommonDriver) ProtectSecond ¶
func (r *ReplicaCommonDriver) ProtectSecond(replicaId string) error
func (*ReplicaCommonDriver) Split ¶
func (r *ReplicaCommonDriver) Split(replicaId string) error
func (*ReplicaCommonDriver) Switch ¶
func (r *ReplicaCommonDriver) Switch(replicaId string) error
func (*ReplicaCommonDriver) Sync ¶
func (r *ReplicaCommonDriver) Sync(replicaId string, waitComplete bool) error
func (*ReplicaCommonDriver) UnprotectSecond ¶
func (r *ReplicaCommonDriver) UnprotectSecond(replicaId string) error
func (*ReplicaCommonDriver) WaitExpectState ¶
func (r *ReplicaCommonDriver) WaitExpectState(replicaId string, runningStatus, healthStatus []string) error
func (*ReplicaCommonDriver) WaitReplicaReady ¶
func (r *ReplicaCommonDriver) WaitReplicaReady(replicaId string) error
func (*ReplicaCommonDriver) WaitSecondAccess ¶
func (r *ReplicaCommonDriver) WaitSecondAccess(replicaId string, accessMode string)
type ReplicaPairMgr ¶
type ReplicaPairMgr struct {
// contains filtered or unexported fields
}
func NewReplicaPairMgr ¶
func NewReplicaPairMgr(conf *OceanStorConfig) (r *ReplicaPairMgr, err error)
func (*ReplicaPairMgr) CheckRemoteAvailable ¶
func (r *ReplicaPairMgr) CheckRemoteAvailable() bool
func (*ReplicaPairMgr) CreateReplication ¶
func (*ReplicaPairMgr) DeletePair ¶
func (r *ReplicaPairMgr) DeletePair(id string) error
func (*ReplicaPairMgr) DeleteReplication ¶
func (r *ReplicaPairMgr) DeleteReplication(pairId, rmtLunId string) error
func (*ReplicaPairMgr) Failback ¶
func (r *ReplicaPairMgr) Failback(pairId string) error
func (*ReplicaPairMgr) Failover ¶
func (r *ReplicaPairMgr) Failover(pairId string) error
func (*ReplicaPairMgr) GetRemoteDevInfo ¶
func (r *ReplicaPairMgr) GetRemoteDevInfo() (id, name string)
func (*ReplicaPairMgr) TryGetRemoteDevByWwn ¶
func (r *ReplicaPairMgr) TryGetRemoteDevByWwn(wwn string) *RemoteDevice
func (*ReplicaPairMgr) TryGetRemoteWwn ¶
func (r *ReplicaPairMgr) TryGetRemoteWwn() string
func (*ReplicaPairMgr) WaitVolumeOnline ¶
func (r *ReplicaPairMgr) WaitVolumeOnline(client *OceanStorClient, lun *Lun, interval, timeout time.Duration) error
type Replication ¶
type Replication struct {
RemoteAuthOpt AuthOptions `yaml:"remoteAuthOptions"`
}
type ReplicationDriver ¶
type ReplicationDriver struct {
// contains filtered or unexported fields
}
ReplicationDriver
func (*ReplicationDriver) CreateReplication ¶
func (r *ReplicationDriver) CreateReplication(opt *pb.CreateReplicationOpts) (*model.ReplicationSpec, error)
CreateReplication
func (*ReplicationDriver) DeleteReplication ¶
func (r *ReplicationDriver) DeleteReplication(opt *pb.DeleteReplicationOpts) error
func (*ReplicationDriver) DisableReplication ¶
func (r *ReplicationDriver) DisableReplication(opt *pb.DisableReplicationOpts) error
func (*ReplicationDriver) EnableReplication ¶
func (r *ReplicationDriver) EnableReplication(opt *pb.EnableReplicationOpts) error
func (*ReplicationDriver) FailoverReplication ¶
func (r *ReplicationDriver) FailoverReplication(opt *pb.FailoverReplicationOpts) error
type ReplicationPair ¶
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 ¶
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 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 SnapshotsResp ¶
type StoragePool ¶
type StoragePoolsResp ¶
type StoragePoolsResp struct { Data []StoragePool `json:"data"` Error Error `json:"error"` }
type SystemResp ¶
Click to show internal directories.
Click to hide internal directories.