Documentation ¶
Index ¶
- func FormatVolume(device, fsType string) error
- func GetFSType(device string) string
- func GetInitiatorIqns() ([]string, error)
- func LoginWithChap(tiqn, portal, username, password, iface string) error
- func Mount(device, mountpoint string) error
- func NewReqID() int
- func Umount(mountpoint string) error
- type APIError
- type Account
- type AddAccountRequest
- type AddAccountResult
- type AddInitiatorsToVolumeAccessGroupRequest
- type AddVolumesToVolumeAccessGroupRequest
- type Client
- func (c *Client) AddAccount(req *AddAccountRequest) (accountID int64, err error)
- func (c *Client) AddInitiatorsToVolumeAccessGroup(r *AddInitiatorsToVolumeAccessGroupRequest) error
- func (c *Client) AddVolumeToAccessGroup(groupID int64, volIDs []int64) (err error)
- func (c *Client) AttachVolume(v *Volume, iface string) (path, device string, err error)
- func (c *Client) CloneVolume(req *CloneVolumeRequest) (vol Volume, err error)
- func (c *Client) CreateSnapshot(req *CreateSnapshotRequest) (snapshot Snapshot, err error)
- func (c *Client) CreateVolume(createReq *CreateVolumeRequest) (vol Volume, err error)
- func (c *Client) CreateVolumeAccessGroup(r *CreateVolumeAccessGroupRequest) (vagID int64, err error)
- func (c *Client) DeleteRange(startID, endID int64)
- func (c *Client) DeleteSnapshot(snapshotID int64) (err error)
- func (c *Client) DeleteVolume(volumeID int64) (err error)
- func (c *Client) DetachVolume(v Volume) (err error)
- func (c *Client) GetAccountByID(req *GetAccountByIDRequest) (account Account, err error)
- func (c *Client) GetAccountByName(req *GetAccountByNameRequest) (account Account, err error)
- func (c *Client) GetSnapshot(sfID int64, sfName string) (s Snapshot, err error)
- func (c *Client) GetVolumeByID(volID int64) (v Volume, err error)
- func (c *Client) GetVolumeByName(n string, acctID int64) (v Volume, err error)
- func (c *Client) GetVolumesByName(sfName string, acctID int64) (v []Volume, err error)
- func (c *Client) ListActiveVolumes(listVolReq *ListActiveVolumesRequest) (volumes []Volume, err error)
- func (c *Client) ListSnapshots(req *ListSnapshotsRequest) (snapshots []Snapshot, err error)
- func (c *Client) ListVolumeAccessGroups(r *ListVolumeAccessGroupsRequest) (vags []VolumeAccessGroup, err error)
- func (c *Client) ListVolumesForAccount(listReq *ListVolumesForAccountRequest) (volumes []Volume, err error)
- func (c *Client) MergeQoS(theType string, rQos string) QoS
- func (c *Client) ModifyVolume(modReq *ModifyVolumeRequest) (err error)
- func (c *Client) Request(method string, params interface{}, id int) (response []byte, err error)
- func (c *Client) RollbackToSnapshot(req *RollbackToSnapshotRequest) (newSnapID int64, err error)
- type CloneVolumeRequest
- type CloneVolumeResult
- type Config
- type CreateSnapshotRequest
- type CreateSnapshotResult
- type CreateVolumeAccessGroupRequest
- type CreateVolumeAccessGroupResult
- type CreateVolumeRequest
- type CreateVolumeResult
- type DeleteSnapshotRequest
- type DeleteVolumeRequest
- type EmptyResponse
- type GetAccountByIDRequest
- type GetAccountByNameRequest
- type GetAccountResult
- type ISCSITarget
- type ListActiveVolumesRequest
- type ListSnapshotsRequest
- type ListSnapshotsResult
- type ListVolumeAccessGroupsRequest
- type ListVolumesAccessGroupsResult
- type ListVolumesForAccountRequest
- type ListVolumesResult
- type ModifyVolumeRequest
- type QoS
- type RollbackToSnapshotRequest
- type RollbackToSnapshotResult
- type Snapshot
- type VolType
- type Volume
- type VolumeAccessGroup
- type VolumePair
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatVolume ¶
func GetInitiatorIqns ¶
func LoginWithChap ¶
Types ¶
type Account ¶
type Account struct { AccountID int64 `json:"accountID,omitempty"` Username string `json:"username,omitempty"` Status string `json:"status,omitempty"` Volumes []int64 `json:"volumes,omitempty"` InitiatorSecret string `json:"initiatorSecret,omitempty"` TargetSecret string `json:"targetSecret,omitempty"` Attributes interface{} `json:"attributes,omitempty"` }
type AddAccountRequest ¶
type AddAccountResult ¶
type Client ¶
type Client struct { SVIP string Endpoint string DefaultAPIPort int DefaultVolSize int64 //bytes DefaultAccountID int64 DefaultTenantName string VolumeTypes *[]VolType Config *Config }
func NewFromConfig ¶
func NewFromOpts ¶ added in v1.3.2
func (*Client) AddAccount ¶
func (c *Client) AddAccount(req *AddAccountRequest) (accountID int64, err error)
func (*Client) AddInitiatorsToVolumeAccessGroup ¶
func (c *Client) AddInitiatorsToVolumeAccessGroup(r *AddInitiatorsToVolumeAccessGroupRequest) error
func (*Client) AddVolumeToAccessGroup ¶
func (*Client) AttachVolume ¶
func (*Client) CloneVolume ¶
func (c *Client) CloneVolume(req *CloneVolumeRequest) (vol Volume, err error)
func (*Client) CreateSnapshot ¶
func (c *Client) CreateSnapshot(req *CreateSnapshotRequest) (snapshot Snapshot, err error)
func (*Client) CreateVolume ¶
func (c *Client) CreateVolume(createReq *CreateVolumeRequest) (vol Volume, err error)
func (*Client) CreateVolumeAccessGroup ¶
func (c *Client) CreateVolumeAccessGroup(r *CreateVolumeAccessGroupRequest) (vagID int64, err error)
func (*Client) DeleteRange ¶
func (*Client) DeleteSnapshot ¶
func (*Client) DeleteVolume ¶
func (*Client) DetachVolume ¶
func (*Client) GetAccountByID ¶
func (c *Client) GetAccountByID(req *GetAccountByIDRequest) (account Account, err error)
func (*Client) GetAccountByName ¶
func (c *Client) GetAccountByName(req *GetAccountByNameRequest) (account Account, err error)
func (*Client) GetSnapshot ¶
func (*Client) GetVolumeByName ¶
func (*Client) GetVolumesByName ¶
func (*Client) ListActiveVolumes ¶
func (c *Client) ListActiveVolumes(listVolReq *ListActiveVolumesRequest) (volumes []Volume, err error)
func (*Client) ListSnapshots ¶
func (c *Client) ListSnapshots(req *ListSnapshotsRequest) (snapshots []Snapshot, err error)
func (*Client) ListVolumeAccessGroups ¶
func (c *Client) ListVolumeAccessGroups(r *ListVolumeAccessGroupsRequest) (vags []VolumeAccessGroup, err error)
func (*Client) ListVolumesForAccount ¶
func (c *Client) ListVolumesForAccount(listReq *ListVolumesForAccountRequest) (volumes []Volume, err error)
func (*Client) ModifyVolume ¶ added in v1.3.2
func (c *Client) ModifyVolume(modReq *ModifyVolumeRequest) (err error)
func (*Client) RollbackToSnapshot ¶
func (c *Client) RollbackToSnapshot(req *RollbackToSnapshotRequest) (newSnapID int64, err error)
type CloneVolumeRequest ¶
type CloneVolumeRequest struct { VolumeID int64 `json:"volumeID"` Name string `json:"name"` NewAccountID int64 `json:"newAccountID,omitempty"` NewSize int64 `json:"newSize,omitempty"` Access string `json:"access,omitempty"` SnapshotID int64 `json:"snapshotID,omitempty"` Attributes interface{} `json:"attributes"` }
type CloneVolumeResult ¶
type Config ¶
type Config struct { TenantName string EndPoint string DefaultVolSz int64 //Default volume size in GiB MountPoint string SVIP string InitiatorIFace string //iface to use of iSCSI initiator Types *[]VolType }
func ProcessConfig ¶
type CreateSnapshotRequest ¶
type CreateSnapshotResult ¶
type CreateVolumeRequest ¶
type CreateVolumeResult ¶
type DeleteSnapshotRequest ¶
type DeleteSnapshotRequest struct {
SnapshotID int64 `json:"snapshotID"`
}
type DeleteVolumeRequest ¶
type DeleteVolumeRequest struct {
VolumeID int64 `json:"volumeID"`
}
type EmptyResponse ¶
type EmptyResponse struct { Id int `json:"id"` Result struct { } `json:"result"` }
type GetAccountByIDRequest ¶
type GetAccountByIDRequest struct {
AccountID int64 `json:"accountID"`
}
type GetAccountByNameRequest ¶
type GetAccountByNameRequest struct {
Name string `json:"username"`
}
type GetAccountResult ¶
type ISCSITarget ¶
type ListSnapshotsRequest ¶
type ListSnapshotsRequest struct {
VolumeID int64 `json:"volumeID"`
}
type ListSnapshotsResult ¶
type ListVolumesAccessGroupsResult ¶
type ListVolumesAccessGroupsResult struct { Id int `json:"id"` Result struct { Vags []VolumeAccessGroup `json:"volumeAccessGroups"` } `json:"result"` }
type ListVolumesForAccountRequest ¶
type ListVolumesForAccountRequest struct {
AccountID int64 `json:"accountID"`
}
type ListVolumesResult ¶
type ModifyVolumeRequest ¶ added in v1.3.2
type Snapshot ¶
type Snapshot struct { SnapshotID int64 `json:"snapshotID"` VolumeID int64 `json:"volumeID"` Name string `json:"name"` Checksum string `json:"checksum"` Status string `json:"status"` TotalSize int64 `json:"totalSize"` GroupID int64 `json:"groupID"` CreateTime string `json:"createTime"` Attributes interface{} `json:"attributes"` }
type Volume ¶
type Volume struct { VolumeID int64 `json:"volumeID"` Name string `json:"name"` AccountID int64 `json:"accountID"` CreateTime string `json:"createTime"` Status string `json:"status"` Access string `json:"access"` Enable512e bool `json:"enable512e"` Iqn string `json:"iqn"` ScsiEUIDeviceID string `json:"scsiEUIDeviceID"` ScsiNAADeviceID string `json:"scsiNAADeviceID"` Qos QoS `json:"qos"` VolumeAccessGroups []int64 `json:"volumeAccessGroups"` VolumePairs []VolumePair `json:"volumePairs"` DeleteTime string `json:"deleteTime"` PurgeTime string `json:"purgeTime"` SliceCount int64 `json:"sliceCount"` TotalSize int64 `json:"totalSize"` BlockSize int64 `json:"blockSize"` VirtualVolumeID string `json:"virtualVolumeID"` Attributes interface{} `json:"attributes"` }
type VolumeAccessGroup ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.