Documentation ¶
Index ¶
- func NewReqID() int
- 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) AddVolumesToAccessGroup(req *AddVolumesToVolumeAccessGroupRequest) (err error)
- func (c *Client) CloneVolume(req *CloneVolumeRequest) (Volume, error)
- func (c *Client) CreateSnapshot(req *CreateSnapshotRequest) (snapshot Snapshot, err error)
- func (c *Client) CreateVolume(createReq *CreateVolumeRequest) (Volume, 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) GetClusterCapacity() (capacity *ClusterCapacity, err error)
- func (c *Client) GetClusterHardwareInfo() (*ClusterHardwareInfo, error)
- func (c *Client) GetSnapshot(snapID, volID int64, sfName string) (s Snapshot, err error)
- func (c *Client) GetVolumeByID(volID int64) (Volume, error)
- func (c *Client) ListSnapshots(req *ListSnapshotsRequest) (snapshots []Snapshot, err error)
- func (c *Client) ListVolumeAccessGroups(r *ListVolumeAccessGroupsRequest) (vags []VolumeAccessGroup, err error)
- func (c *Client) ListVolumes(listVolReq *ListVolumesRequest) (volumes []Volume, err error)
- func (c *Client) ListVolumesForAccount(listReq *ListVolumesForAccountRequest) (volumes []Volume, err error)
- func (c *Client) ModifyVolume(req *ModifyVolumeRequest) (err error)
- func (c *Client) Request(method string, params interface{}, id int) ([]byte, error)
- func (c *Client) RollbackToSnapshot(req *RollbackToSnapshotRequest) (newSnapID int64, err error)
- func (c *Client) WaitForVolumeByID(volID int64) (Volume, error)
- type CloneVolumeRequest
- type CloneVolumeResult
- type ClusterCapacity
- type ClusterHardwareInfo
- type Config
- type CreateSnapshotRequest
- type CreateSnapshotResult
- type CreateVolumeAccessGroupRequest
- type CreateVolumeAccessGroupResult
- type CreateVolumeRequest
- type CreateVolumeResult
- type DeleteSnapshotRequest
- type DeleteVolumeRequest
- type EmptyResponse
- type Error
- type GetAccountByIDRequest
- type GetAccountByNameRequest
- type GetAccountResult
- type GetClusterCapacityRequest
- type GetClusterCapacityResult
- type GetClusterHardwareInfoResult
- type ListActiveVolumesRequest
- type ListSnapshotsRequest
- type ListSnapshotsResult
- type ListVolumeAccessGroupsRequest
- type ListVolumesAccessGroupsResult
- type ListVolumesForAccountRequest
- type ListVolumesRequest
- type ListVolumesResult
- type ModifyVolumeRequest
- type ModifyVolumeResult
- 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 ¶
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"` }
Account
type AddAccountRequest ¶
type AddAccountRequest struct { Username string `json:"username"` InitiatorSecret string `json:"initiatorSecret,omitempty"` TargetSecret string `json:"targetSecret,omitempty"` Attributes interface{} `json:"attributes,omitempty"` }
AddAccountRequest
type AddAccountResult ¶
type AddAccountResult struct { ID int `json:"id"` Result struct { AccountID int64 `json:"accountID"` } `json:"result"` }
AddAccountResult
type AddInitiatorsToVolumeAccessGroupRequest ¶
type AddInitiatorsToVolumeAccessGroupRequest struct { Initiators []string `json:"initiators"` VAGID int64 `json:"volumeAccessGroupID"` }
AddInitiatorsToVolumeAccessGroupRequest
type AddVolumesToVolumeAccessGroupRequest ¶
type AddVolumesToVolumeAccessGroupRequest struct { VolumeAccessGroupID int64 `json:"volumeAccessGroupID"` Volumes []int64 `json:"volumes"` }
AddVolumesToVolumeAccessGroupRequest
type Client ¶
type Client struct { SVIP string Endpoint string Config *Config DefaultAPIPort int VolumeTypes *[]VolType AccessGroups []int64 DefaultBlockSize int64 DebugTraceFlags map[string]bool AccountID int64 }
Client is used to send API requests to a SolidFire system system
func NewFromParameters ¶
NewFromParameters is a factory method to create a new sfapi.Client object using the supplied parameters
func (*Client) AddAccount ¶
func (c *Client) AddAccount(req *AddAccountRequest) (accountID int64, err error)
AddAccount tbd
func (*Client) AddInitiatorsToVolumeAccessGroup ¶
func (c *Client) AddInitiatorsToVolumeAccessGroup(r *AddInitiatorsToVolumeAccessGroupRequest) error
AddInitiatorsToVolumeAccessGroup tbd
func (*Client) AddVolumesToAccessGroup ¶
func (c *Client) AddVolumesToAccessGroup(req *AddVolumesToVolumeAccessGroupRequest) (err error)
AddVolumesToAccessGroup tbd
func (*Client) CloneVolume ¶
func (c *Client) CloneVolume(req *CloneVolumeRequest) (Volume, error)
CloneVolume invokes the supplied clone volume request. It waits for the source volume (which itself may be new in a test scenario) to be ready to be cloned, and it waits for the clone to exist.
func (*Client) CreateSnapshot ¶
func (c *Client) CreateSnapshot(req *CreateSnapshotRequest) (snapshot Snapshot, err error)
func (*Client) CreateVolume ¶
func (c *Client) CreateVolume(createReq *CreateVolumeRequest) (Volume, error)
CreateVolume tbd
func (*Client) CreateVolumeAccessGroup ¶
func (c *Client) CreateVolumeAccessGroup(r *CreateVolumeAccessGroupRequest) (vagID int64, err error)
CreateVolumeAccessGroup tbd
func (*Client) DeleteSnapshot ¶
func (*Client) DeleteVolume ¶
DeleteVolume tbd
func (*Client) GetAccountByID ¶
func (c *Client) GetAccountByID(req *GetAccountByIDRequest) (account Account, err error)
GetAccountByID tbd
func (*Client) GetAccountByName ¶
func (c *Client) GetAccountByName(req *GetAccountByNameRequest) (account Account, err error)
GetAccountByName tbd
func (*Client) GetClusterCapacity ¶
func (c *Client) GetClusterCapacity() (capacity *ClusterCapacity, err error)
Get cluster capacity stats
func (*Client) GetClusterHardwareInfo ¶
func (c *Client) GetClusterHardwareInfo() (*ClusterHardwareInfo, error)
Get cluster hardware info
func (*Client) GetSnapshot ¶
func (*Client) GetVolumeByID ¶
GetVolumeByID returns the volume with the specified ID.
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)
ListVolumeAccessGroups tbd
func (*Client) ListVolumes ¶
func (c *Client) ListVolumes(listVolReq *ListVolumesRequest) (volumes []Volume, err error)
ListVolumes returns all volumes using the specified request object.
func (*Client) ListVolumesForAccount ¶
func (c *Client) ListVolumesForAccount(listReq *ListVolumesForAccountRequest) (volumes []Volume, err error)
ListVolumesForAccount tbd
func (*Client) ModifyVolume ¶
func (c *Client) ModifyVolume(req *ModifyVolumeRequest) (err error)
func (*Client) RollbackToSnapshot ¶
func (c *Client) RollbackToSnapshot(req *RollbackToSnapshotRequest) (newSnapID int64, err error)
type CloneVolumeRequest ¶
type CloneVolumeResult ¶
type ClusterCapacity ¶
type ClusterCapacity struct { ActiveBlockSpace int64 `json:"activeBlockSpace"` ActiveSessions int64 `json:"activeSessions"` AverageIOPS int64 `json:"averageIOPS"` ClusterRecentIOSize int64 `json:"clusterRecentIOSize"` CurrentIOPS int64 `json:"currentIOPS"` MaxIOPS int64 `json:"maxIOPS"` MaxOverProvisionableSpace int64 `json:"maxOverProvisionableSpace"` MaxProvisionedSpace int64 `json:"maxProvisionedSpace"` MaxUsedMetadataSpace int64 `json:"maxUsedMetadataSpace"` MaxUsedSpace int64 `json:"maxUsedSpace"` NonZeroBlocks int64 `json:"nonZeroBlocks"` PeakActiveSessions int64 `json:"peakActiveSessions"` PeakIOPS int64 `json:"peakIOPS"` ProvisionedSpace int64 `json:"provisionedSpace"` Timestamp string `json:"timestamp"` TotalOps int64 `json:"totalOps"` UniqueBlocks int64 `json:"uniqueBlocks"` UniqueBlocksUsedSpace int64 `json:"uniqueBlocksUsedSpace"` UsedMetadataSpace int64 `json:"usedMetadataSpace"` UsedMetadataSpaceInSnapshots int64 `json:"usedMetadataSpaceInSnapshots"` UsedSpace int64 `json:"usedSpace"` ZeroBlocks int64 `json:"zeroBlocks"` }
type ClusterHardwareInfo ¶
type ClusterHardwareInfo struct { Drives interface{} `json:"drives"` Nodes interface{} `json:"nodes"` }
type Config ¶
type Config struct { TenantName string EndPoint string MountPoint string SVIP string InitiatorIFace string //iface to use of iSCSI initiator Types *[]VolType LegacyNamePrefix string AccessGroups []int64 DefaultBlockSize int64 DebugTraceFlags map[string]bool }
Config holds the configuration data for the Client to communicate with a SolidFire storage system
type CreateSnapshotRequest ¶
type CreateSnapshotResult ¶
type CreateVolumeAccessGroupRequest ¶
type CreateVolumeAccessGroupRequest struct { Name string `json:"name"` Volumes []int64 `json:"volumes,omitempty"` Initiators []string `json:"initiators,omitempty"` }
CreateVolumeAccessGroupRequest
type CreateVolumeAccessGroupResult ¶
type CreateVolumeAccessGroupResult struct { ID int `json:"id"` Result struct { VagID int64 `json:"volumeAccessGroupID"` } `json:"result"` }
CreateVolumeAccessGroupResult
type CreateVolumeRequest ¶
type CreateVolumeRequest struct { Name string `json:"name"` AccountID int64 `json:"accountID"` TotalSize int64 `json:"totalSize"` Enable512e bool `json:"enable512e"` Qos QoS `json:"qos,omitempty"` Attributes interface{} `json:"attributes"` }
CreateVolumeRequest
type CreateVolumeResult ¶
type CreateVolumeResult struct { ID int `json:"id"` Result struct { VolumeID int64 `json:"volumeID"` } `json:"result"` }
CreateVolumeResult
type DeleteSnapshotRequest ¶
type DeleteSnapshotRequest struct {
SnapshotID int64 `json:"snapshotID"`
}
type DeleteVolumeRequest ¶
type DeleteVolumeRequest struct {
VolumeID int64 `json:"volumeID"`
}
DeleteVolumeRequest
type EmptyResponse ¶
type EmptyResponse struct { ID int `json:"id"` Result struct { } `json:"result"` }
EmptyResponse
type Error ¶
type Error struct { ID int `json:"id"` Fields struct { Code int `json:"code"` Message string `json:"message"` Name string `json:"name"` } `json:"error"` }
Error wrapper
type GetAccountByIDRequest ¶
type GetAccountByIDRequest struct {
AccountID int64 `json:"accountID"`
}
GetAccountByIDRequest
type GetAccountByNameRequest ¶
type GetAccountByNameRequest struct {
Name string `json:"username"`
}
GetAccountByNameRequest
type GetAccountResult ¶
type GetAccountResult struct { ID int `json:"id"` Result struct { Account Account `json:"account"` } `json:"result"` }
GetAccountResult
type GetClusterCapacityRequest ¶
type GetClusterCapacityRequest struct { }
type GetClusterCapacityResult ¶
type GetClusterCapacityResult struct { ID int `json:"id"` Result struct { ClusterCapacity ClusterCapacity `json:"clusterCapacity"` } `json:"result"` }
type GetClusterHardwareInfoResult ¶
type GetClusterHardwareInfoResult struct { ID int `json:"id"` Result struct { ClusterHardwareInfo ClusterHardwareInfo `json:"clusterHardwareInfo"` } `json:"result"` }
type ListActiveVolumesRequest ¶
type ListActiveVolumesRequest struct { StartVolumeID int64 `json:"startVolumeID"` Limit int64 `json:"limit"` }
ListActiveVolumesRequest
type ListSnapshotsRequest ¶
type ListSnapshotsRequest struct {
VolumeID int64 `json:"volumeID"`
}
type ListSnapshotsResult ¶
type ListVolumeAccessGroupsRequest ¶
type ListVolumeAccessGroupsRequest struct { StartVAGID int64 `json:"startVolumeAccessGroupID,omitempty"` Limit int64 `json:"limit,omitempty"` }
ListVolumeAccessGroupsRequest
type ListVolumesAccessGroupsResult ¶
type ListVolumesAccessGroupsResult struct { ID int `json:"id"` Result struct { Vags []VolumeAccessGroup `json:"volumeAccessGroups"` } `json:"result"` }
ListVolumesAccessGroupsResult
type ListVolumesForAccountRequest ¶
type ListVolumesForAccountRequest struct {
AccountID int64 `json:"accountID"`
}
ListVolumesForAccountRequest
type ListVolumesRequest ¶
type ListVolumesRequest struct { Accounts []int64 `json:"accounts"` StartVolumeID *int64 `json:"startVolumeID,omitempty"` Limit *int64 `json:"limit,omitempty"` }
ListVolumesRequest
type ListVolumesResult ¶
type ListVolumesResult struct { ID int `json:"id"` Result struct { Volumes []Volume `json:"volumes"` } `json:"result"` }
ListVolumesResult
type ModifyVolumeRequest ¶
type ModifyVolumeResult ¶
type QoS ¶
type QoS struct { MinIOPS int64 `json:"minIOPS,omitempty"` MaxIOPS int64 `json:"maxIOPS,omitempty"` BurstIOPS int64 `json:"burstIOPS,omitempty"` BurstTime int64 `json:"-"` }
QoS settings
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"` }
Volume settings
type VolumeAccessGroup ¶
type VolumeAccessGroup struct { Initiators []string `json:"initiators"` Attributes interface{} `json:"attributes"` DeletedVolumes []int64 `json:"deletedVolumes"` Name string `json:"name"` VAGID int64 `json:"volumeAccessGroupID"` Volumes []int64 `json:"volumes"` }
VolumeAccessGroup