Documentation ¶
Index ¶
- Constants
- Variables
- func EncodeName(id string) string
- func NewCliError(code string) error
- func StartServer() error
- type AuthOptions
- type CliError
- type Config
- type Detail
- type DeviceVersion
- type Driver
- func (d *Driver) AddPortToHost(initiator, hostName string) error
- func (d *Driver) CheckHostIsExist(hostName string) error
- func (d *Driver) CheckVolAttachToHost(hostName, lunId string) error
- func (d *Driver) CreateHostIfNotExist(hostInfo *pb.HostInfo) error
- func (d *Driver) CreatePortIfNotExist(initiator string) error
- func (d *Driver) CreateSnapshot(opt *pb.CreateVolumeSnapshotOpts) (*VolumeSnapshotSpec, error)
- func (d *Driver) CreateVolume(opt *pb.CreateVolumeOpts) (*VolumeSpec, error)
- func (d *Driver) CreateVolumeGroup(opt *pb.CreateVolumeGroupOpts) (*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) (*VolumeSpec, error)
- func (d *Driver) GeTgtPortalAndIQNVersion6_3(initiator string) ([]string, []string, error)
- func (d *Driver) GeTgtPortalAndIQNVersion8_0() ([]string, []string, error)
- func (d *Driver) GetTargetPortal(initiator string) ([]string, []string, error)
- func (d *Driver) GetTgtLunID(hostName, sourceLunID string) (int, error)
- func (d *Driver) InitializeConnection(opt *pb.CreateVolumeAttachmentOpts) (*ConnectionInfo, error)
- func (d *Driver) InitializeSnapshotConnection(opt *pb.CreateSnapshotAttachmentOpts) (*ConnectionInfo, error)
- func (d *Driver) ListPools() ([]*StoragePoolSpec, error)
- func (d *Driver) PullSnapshot(snapIdentifier string) (*VolumeSnapshotSpec, error)
- func (d *Driver) PullVolume(volIdentifier string) (*VolumeSpec, error)
- func (d *Driver) Setup() error
- func (d *Driver) TerminateConnection(opt *pb.DeleteVolumeAttachmentOpts) error
- func (d *Driver) TerminateSnapshotConnection(opt *pb.DeleteSnapshotAttachmentOpts) error
- func (d *Driver) Unset() error
- func (d *Driver) UpdateVolumeGroup(opt *pb.UpdateVolumeGroupOpts) (*VolumeGroupSpec, error)
- type FsClient
- type Host
- type HostList
- type HostLunList
- type IscsiPortal
- type LunList
- type NodeResult
- type Pool
- type PoolResp
- type PortHostMap
- type Portal
- type RequesData
- type ResponseResult
- type Version
Constants ¶
View Source
const ( BasicURI = "/dsware/service/" UnitGiShiftBit = 10 DefaultAZ = "default" NamePrefix = "opensds" LunId = "lunId" FusionstorageIscsi = "fusionstorage_iscsi" InitiatorNotExistErrorCodeVersion6 = "32155103" InitiatorNotExistErrorCodeVersion8 = "155103" VolumeAlreadyInHostErrorCode = "157001" CmdBin = "fsc_cli" DefaultConfPath = "/etc/opensds/driver/fusionstorage.yaml" ClientVersion6_3 = "6.3" ClientVersion8_0 = "8.0" MaxRetry = 3 )
Variables ¶
View Source
var CliErrorMap = map[string]string{
"50000001": "DSware error",
"50150001": "Receive a duplicate request",
"50150002": "Command type is not supported",
"50150003": "Command format is error",
"50150004": "Lost contact with major VBS",
"50150005": "Volume does not exist",
"50150006": "Snapshot does not exist",
"50150007": "Volume already exists or name exists or name duplicates with a snapshot name",
"50150008": "The snapshot has already existed",
"50150009": "VBS space is not enough",
"50150010": "The node type is error",
"50150011": "Volume and snapshot number is beyond max",
"50150012": "VBS is not ready",
"50150013": "The ref num of node is not 0",
"50150014": "The volume is not in the pre-deletion state.",
"50150015": "The storage resource pool is faulty",
"50150016": "VBS handle queue busy",
"50150017": "VBS handle request timeout",
"50150020": "VBS metablock is locked",
"50150021": "VBS pool dose not exist",
"50150022": "VBS is not ok",
"50150023": "VBS pool is not ok",
"50150024": "VBS dose not exist",
"50150064": "VBS load SCSI-3 lock pr meta failed",
"50150100": "The disaster recovery relationship exists",
"50150101": "The DR relationship does not exist",
"50150102": "Volume has existed mirror",
"50150103": "The volume does not have a mirror",
"50150104": "Incorrect volume status",
"50150105": "The mirror volume already exists",
}
Functions ¶
func EncodeName ¶
func NewCliError ¶
func StartServer ¶ added in v0.5.3
func StartServer() error
Types ¶
type AuthOptions ¶
type AuthOptions struct { Username string `yaml:"username"` Password string `yaml:"password"` Url string `yaml:"url"` FmIp string `yaml:"fmIp,omitempty"` FsaIp []string `yaml:"fsaIp,flow"` PwdEncrypter string `yaml:"PwdEncrypter,omitempty"` EnableEncrypted bool `yaml:"EnableEncrypted,omitempty"` Version string `json:"version"` }
type CliError ¶
func NewCliErrorBase ¶
type Config ¶
type Config struct { AuthOptions `yaml:"authOptions"` Pool map[string]PoolProperties `yaml:"pool,flow"` }
type DeviceVersion ¶ added in v0.5.3
type DeviceVersion struct {
Version string `json:"version"`
}
type Driver ¶
func (*Driver) AddPortToHost ¶ added in v0.5.3
func (*Driver) CheckHostIsExist ¶ added in v0.5.3
func (*Driver) CheckVolAttachToHost ¶ added in v0.5.3
func (*Driver) CreateHostIfNotExist ¶ added in v0.5.3
func (*Driver) CreatePortIfNotExist ¶ added in v0.5.3
func (*Driver) CreateSnapshot ¶
func (d *Driver) CreateSnapshot(opt *pb.CreateVolumeSnapshotOpts) (*VolumeSnapshotSpec, error)
func (*Driver) CreateVolume ¶
func (d *Driver) CreateVolume(opt *pb.CreateVolumeOpts) (*VolumeSpec, error)
func (*Driver) CreateVolumeGroup ¶
func (d *Driver) CreateVolumeGroup(opt *pb.CreateVolumeGroupOpts) (*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) (*VolumeSpec, error)
func (*Driver) GeTgtPortalAndIQNVersion6_3 ¶ added in v0.5.3
func (*Driver) GeTgtPortalAndIQNVersion8_0 ¶ added in v0.5.3
func (*Driver) GetTargetPortal ¶ added in v0.5.3
func (*Driver) GetTgtLunID ¶ added in v0.5.3
func (*Driver) InitializeConnection ¶
func (d *Driver) InitializeConnection(opt *pb.CreateVolumeAttachmentOpts) (*ConnectionInfo, error)
func (*Driver) InitializeSnapshotConnection ¶
func (d *Driver) InitializeSnapshotConnection(opt *pb.CreateSnapshotAttachmentOpts) (*ConnectionInfo, error)
func (*Driver) PullSnapshot ¶
func (*Driver) PullVolume ¶
func (*Driver) TerminateConnection ¶
func (d *Driver) TerminateConnection(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) (*VolumeGroupSpec, error)
type HostLunList ¶ added in v0.5.3
type HostLunList struct {
LunList []LunList `json:"hostLunList"`
}
type IscsiPortal ¶ added in v0.5.3
type IscsiPortal struct {
NodeResultList []NodeResult `json:"nodeResultList"`
}
type NodeResult ¶ added in v0.5.3
type NodeResult struct {
PortalList []Portal `json:"iscsiPortalList"`
}
type PortHostMap ¶ added in v0.5.3
type RequesData ¶ added in v0.5.3
type RequesData struct { Timeout int `json:"timeout"` Data interface{} `json:"data` }
type ResponseResult ¶ added in v0.5.3
Click to show internal directories.
Click to hide internal directories.