Documentation ¶
Index ¶
- Constants
- type ArrayInnerError
- type Auth
- type AuthOptions
- type AuthResp
- type DoradoClient
- func (c *DoradoClient) AddHostToHostGroup(hostId string) (string, error)
- func (c *DoradoClient) AddHostWithCheck(hostInfo *pb.HostInfo) (string, error)
- func (c *DoradoClient) AddInitiatorToArray(initiatorName string) error
- func (c *DoradoClient) AddInitiatorToHost(hostId, initiatorName string) error
- func (c *DoradoClient) AddInitiatorToHostWithCheck(hostId, initiatorName string) error
- func (c *DoradoClient) AssocateHostGroupToMappingView(viewId, groupId string) error
- func (c *DoradoClient) AssocateLunGroupToMappingView(viewId, groupId string) error
- func (c *DoradoClient) AssociateHostToHostGroup(hostGrpId, hostId string) error
- func (c *DoradoClient) AssociateLunToLunGroup(lunGrpId, lunId string) error
- func (c *DoradoClient) CreateHostGroup(groupName string) (string, error)
- func (c *DoradoClient) CreateHostGroupWithCheck(hostGrpName string) (string, error)
- func (c *DoradoClient) CreateLunGroup(groupName string) (string, error)
- func (c *DoradoClient) CreateMappingView(name string) (string, error)
- func (c *DoradoClient) CreateSnapshot(volId, name, desc string) (*Snapshot, error)
- func (c *DoradoClient) CreateVolume(name string, sectors int64, desc string) (*Lun, error)
- func (c *DoradoClient) DeleteHost(id string) error
- func (c *DoradoClient) DeleteHostGroup(id string) error
- func (c *DoradoClient) DeleteLunGroup(id string) error
- func (c *DoradoClient) DeleteMappingView(id string) error
- func (c *DoradoClient) DeleteSnapshot(id string) error
- func (c *DoradoClient) DeleteVolume(id string) error
- func (c *DoradoClient) Destroy() error
- func (c *DoradoClient) DoMapping(lunId, hostGrpId, hostId string) error
- func (c *DoradoClient) ExtendVolume(capacity int64, id string) error
- func (c *DoradoClient) FindHostGroup(groupName string) (string, error)
- func (c *DoradoClient) FindLunGroup(groupName string) (string, error)
- func (c *DoradoClient) FindMappingView(name string) (string, error)
- func (c *DoradoClient) GetHostIdByName(hostName string) (string, error)
- func (c *DoradoClient) GetHostLunId(hostId, lunId string) (int, error)
- func (c *DoradoClient) GetSnapshot(id string) (*Snapshot, error)
- func (c *DoradoClient) GetVolume(id string) (*Lun, error)
- func (c *DoradoClient) IsArrayContainInitiator(initiatorName string) bool
- func (c *DoradoClient) IsHostContainInitiator(hostId, initiatorName string) bool
- func (c *DoradoClient) IsHostGroupContainHost(hostGrpId, hostId string) bool
- func (c *DoradoClient) IsLunGroupContainLun(lunGrpId, lunId string) bool
- func (c *DoradoClient) IsMappingViewContainHostGroup(viewId, groupId string) bool
- func (c *DoradoClient) IsMappingViewContainLunGroup(viewId, groupId string) bool
- func (c *DoradoClient) ListHostAssociateLuns(hostId string) (*HostAssociateLunsResp, error)
- func (c *DoradoClient) ListStoragePools() ([]StoragePool, error)
- func (c *DoradoClient) ListTgtPort() (*IscsiTgtPortsResp, error)
- func (c *DoradoClient) RemoveHostFromHostGroup(hostGrpId, hostId string) error
- func (c *DoradoClient) RemoveHostGroupFromMappingView(viewId, hostGrpId string) error
- func (c *DoradoClient) RemoveIscsiFromHost(initiator string) error
- func (c *DoradoClient) RemoveLunFromLunGroup(lunGrpId, lunId string) error
- func (c *DoradoClient) RemoveLunGroupFromMappingView(viewId, lunGrpId string) error
- type DoradoConfig
- 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) DeleteSnapshot(opt *pb.DeleteVolumeSnapshotOpts) error
- func (d *Driver) DeleteVolume(opt *pb.DeleteVolumeOpts) error
- func (d *Driver) ExtendVolume(opt *pb.ExtendVolumeOpts) (*model.VolumeSpec, error)
- func (d *Driver) InitializeConnection(opt *pb.CreateAttachmentOpts) (*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() error
- func (d *Driver) TerminateConnection(opt *pb.DeleteAttachmentOpts) error
- func (d *Driver) Unset() error
- type Error
- type GenericResult
- type Host
- type HostAssociateLun
- type HostAssociateLunsResp
- type HostGroup
- type HostGroupResp
- type HostGroupsResp
- type HostResp
- type HostsResp
- type HttpError
- 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 SimpleResp
- type SimpleStruct
- type Snapshot
- type SnapshotResp
- type StoragePool
- type StoragePoolsResp
Constants ¶
View Source
const ( ThickLuntype = 0 ThinLuntype = 1 MaxNameLength = 31 MaxVolDescription = 170 PortNumPerContr = 2 PwdExpired = 3 PwdReset = 4 )
View Source
const ( ErrorConnectToServer = -403 )
View Source
const ( MappingViewPrefix = "OpenSDS_MappingView_" LunGroupPrefix = "OpenSDS_LunGroup_" HostGroupPrefix = "OpenSDS_HostGroup_" )
View Source
const (
UnitGi = 1024 * 1024 * 1024
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
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 DoradoClient ¶
type DoradoClient struct {
// contains filtered or unexported fields
}
func NewClient ¶
func NewClient(user, passwd string, endpoints []string, insecure bool) (*DoradoClient, 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) CreateHostGroup ¶
func (c *DoradoClient) CreateHostGroup(groupName string) (string, error)
func (*DoradoClient) CreateHostGroupWithCheck ¶
func (c *DoradoClient) CreateHostGroupWithCheck(hostGrpName 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) CreateSnapshot ¶
func (c *DoradoClient) CreateSnapshot(volId, name, desc string) (*Snapshot, error)
func (*DoradoClient) CreateVolume ¶
func (*DoradoClient) DeleteHost ¶
func (c *DoradoClient) DeleteHost(id string) error
func (*DoradoClient) DeleteHostGroup ¶
func (c *DoradoClient) DeleteHostGroup(id string) error
func (*DoradoClient) DeleteLunGroup ¶
func (c *DoradoClient) DeleteLunGroup(id string) error
func (*DoradoClient) DeleteMappingView ¶
func (c *DoradoClient) DeleteMappingView(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(capacity 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) GetHostIdByName ¶
func (c *DoradoClient) GetHostIdByName(hostName string) (string, error)
func (*DoradoClient) GetHostLunId ¶
func (c *DoradoClient) GetHostLunId(hostId, lunId string) (int, error)
func (*DoradoClient) GetSnapshot ¶
func (c *DoradoClient) GetSnapshot(id string) (*Snapshot, error)
func (*DoradoClient) IsArrayContainInitiator ¶
func (c *DoradoClient) IsArrayContainInitiator(initiatorName string) bool
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) ListHostAssociateLuns ¶
func (c *DoradoClient) ListHostAssociateLuns(hostId string) (*HostAssociateLunsResp, error)
func (*DoradoClient) ListStoragePools ¶
func (c *DoradoClient) ListStoragePools() ([]StoragePool, error)
func (*DoradoClient) ListTgtPort ¶
func (c *DoradoClient) ListTgtPort() (*IscsiTgtPortsResp, 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
type DoradoConfig ¶
type DoradoConfig struct { AuthOptions `yaml:"authOptions"` 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) DeleteSnapshot ¶
func (d *Driver) DeleteSnapshot(opt *pb.DeleteVolumeSnapshotOpts) error
func (*Driver) DeleteVolume ¶
func (d *Driver) DeleteVolume(opt *pb.DeleteVolumeOpts) 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.CreateAttachmentOpts) (*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.DeleteAttachmentOpts) 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 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 StoragePool ¶
type StoragePoolsResp ¶
type StoragePoolsResp struct { Data []StoragePool `json:"data"` Error Error `json:"error"` }
Click to show internal directories.
Click to hide internal directories.