Documentation
¶
Overview ¶
This package provides a high-level interface to the NetApp AWS Cloud Volumes NFS REST API.
Index ¶
- Constants
- type BackupPolicy
- type CallResponseError
- type Client
- func (d *Client) CreateSnapshot(request *SnapshotCreateRequest) (*Snapshot, error)
- func (d *Client) CreateVolume(request *FilesystemCreateRequest) (*FileSystem, error)
- func (d *Client) DeleteSnapshot(filesystem *FileSystem, snapshot *Snapshot) error
- func (d *Client) DeleteVolume(filesystem *FileSystem) error
- func (d *Client) GetMountTargetsForVolume(filesystem *FileSystem) (*[]MountTarget, error)
- func (d *Client) GetRegions() (*[]Region, error)
- func (d *Client) GetSnapshotByID(snapshotId string) (*Snapshot, error)
- func (d *Client) GetSnapshotForVolume(filesystem *FileSystem, snapshotName string) (*Snapshot, error)
- func (d *Client) GetSnapshotsForVolume(filesystem *FileSystem) (*[]Snapshot, error)
- func (d *Client) GetVersion() (*utils.Version, *utils.Version, error)
- func (d *Client) GetVolumeByCreationToken(creationToken string) (*FileSystem, error)
- func (d *Client) GetVolumeByID(fileSystemId string) (*FileSystem, error)
- func (d *Client) GetVolumeByName(name string) (*FileSystem, error)
- func (d *Client) GetVolumes() (*[]FileSystem, error)
- func (d *Client) InvokeAPI(requestBody []byte, method string, awsURL string) (*http.Response, []byte, error)
- func (d *Client) RelabelVolume(filesystem *FileSystem, labels []string) (*FileSystem, error)
- func (d *Client) RenameRelabelVolume(filesystem *FileSystem, newName string, labels []string) (*FileSystem, error)
- func (d *Client) RenameVolume(filesystem *FileSystem, newName string) (*FileSystem, error)
- func (d *Client) ResizeVolume(filesystem *FileSystem, newSizeBytes int64) (*FileSystem, error)
- func (d *Client) RestoreSnapshot(filesystem *FileSystem, snapshot *Snapshot) error
- func (d *Client) VolumeExistsByCreationToken(creationToken string) (bool, *FileSystem, error)
- func (d *Client) WaitForSnapshotState(snapshot *Snapshot, desiredState string, abortStates []string) error
- func (d *Client) WaitForVolumeState(filesystem *FileSystem, desiredState string, abortStates []string) error
- type ClientConfig
- type DailySchedule
- type Error
- type ExportPolicy
- type ExportRule
- type FileSystem
- type FilesystemCreateRequest
- type FilesystemRenameRelabelRequest
- type FilesystemRenameRequest
- type FilesystemResizeRequest
- type HourlySchedule
- type Job
- type MonthlySchedule
- type MountTarget
- type Region
- type RegionsResponse
- type Snapshot
- type SnapshotCreateRequest
- type SnapshotPolicy
- type SnapshotRevertRequest
- type TerminalStateError
- type VersionResponse
- type WeeklySchedule
Constants ¶
const ( StateCreating = "creating" StateAvailable = "available" StateUpdating = "updating" StateDisabled = "disabled" StateDeleting = "deleting" StateDeleted = "deleted" StateError = "error" ProtocolTypeNFSv3 = "NFSv3" ProtocolTypeNFSv4 = "NFSv4" ProtocolTypeCIFS = "CIFS" ServiceLevelStandard = "standard" ServiceLevelPremium = "premium" ServiceLevelExtreme = "extreme" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BackupPolicy ¶
type CallResponseError ¶
CallResponseError is used for errors on RESTful calls to return what went wrong
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func NewDriver ¶
func NewDriver(config ClientConfig) *Client
NewDriver is a factory method for creating a new instance.
func (*Client) CreateSnapshot ¶
func (d *Client) CreateSnapshot(request *SnapshotCreateRequest) (*Snapshot, error)
func (*Client) CreateVolume ¶
func (d *Client) CreateVolume(request *FilesystemCreateRequest) (*FileSystem, error)
func (*Client) DeleteSnapshot ¶
func (d *Client) DeleteSnapshot(filesystem *FileSystem, snapshot *Snapshot) error
func (*Client) DeleteVolume ¶
func (d *Client) DeleteVolume(filesystem *FileSystem) error
func (*Client) GetMountTargetsForVolume ¶
func (d *Client) GetMountTargetsForVolume(filesystem *FileSystem) (*[]MountTarget, error)
func (*Client) GetRegions ¶
func (*Client) GetSnapshotByID ¶
func (*Client) GetSnapshotForVolume ¶
func (d *Client) GetSnapshotForVolume(filesystem *FileSystem, snapshotName string) (*Snapshot, error)
func (*Client) GetSnapshotsForVolume ¶
func (d *Client) GetSnapshotsForVolume(filesystem *FileSystem) (*[]Snapshot, error)
func (*Client) GetVolumeByCreationToken ¶
func (d *Client) GetVolumeByCreationToken(creationToken string) (*FileSystem, error)
func (*Client) GetVolumeByID ¶
func (d *Client) GetVolumeByID(fileSystemId string) (*FileSystem, error)
func (*Client) GetVolumeByName ¶
func (d *Client) GetVolumeByName(name string) (*FileSystem, error)
func (*Client) GetVolumes ¶
func (d *Client) GetVolumes() (*[]FileSystem, error)
func (*Client) InvokeAPI ¶
func (d *Client) InvokeAPI(requestBody []byte, method string, awsURL string) (*http.Response, []byte, error)
InvokeAPI makes a REST call to the cloud volumes REST service. The body must be a marshaled JSON byte array (or nil). The method is the HTTP verb (i.e. GET, POST, ...).
func (*Client) RelabelVolume ¶
func (d *Client) RelabelVolume(filesystem *FileSystem, labels []string) (*FileSystem, error)
func (*Client) RenameRelabelVolume ¶
func (d *Client) RenameRelabelVolume(filesystem *FileSystem, newName string, labels []string) (*FileSystem, error)
func (*Client) RenameVolume ¶
func (d *Client) RenameVolume(filesystem *FileSystem, newName string) (*FileSystem, error)
func (*Client) ResizeVolume ¶
func (d *Client) ResizeVolume(filesystem *FileSystem, newSizeBytes int64) (*FileSystem, error)
func (*Client) RestoreSnapshot ¶
func (d *Client) RestoreSnapshot(filesystem *FileSystem, snapshot *Snapshot) error
func (*Client) VolumeExistsByCreationToken ¶
func (d *Client) VolumeExistsByCreationToken(creationToken string) (bool, *FileSystem, error)
func (*Client) WaitForSnapshotState ¶
func (*Client) WaitForVolumeState ¶
func (d *Client) WaitForVolumeState(filesystem *FileSystem, desiredState string, abortStates []string) error
type ClientConfig ¶
type ClientConfig struct {
// AWS CVS API authentication parameters
APIURL string
APIKey string
SecretKey string
ProxyURL string
// Options
DebugTraceFlags map[string]bool
}
ClientConfig holds configuration data for the API driver object.
type DailySchedule ¶
type ExportPolicy ¶
type ExportPolicy struct {
Rules []ExportRule `json:"rules"`
}
type ExportRule ¶
type FileSystem ¶
type FileSystem struct {
Created time.Time `json:"created,omitempty"`
ExportPolicy ExportPolicy `json:"exportPolicy,omitempty"`
Labels []string `json:"labels,omitempty"`
FileSystemID string `json:"fileSystemId,omitempty"`
LifeCycleState string `json:"lifeCycleState,omitempty"`
LifeCycleStateDetails string `json:"lifeCycleStateDetails,omitempty"`
Name string `json:"name,omitempty"`
OwnerID string `json:"ownerId,omitempty"`
Region string `json:"region,omitempty"`
CreationToken string `json:"creationToken,omitempty"`
ProtocolTypes []string `json:"protocolTypes"`
QuotaInBytes int64 `json:"quotaInBytes,omitempty"`
ServiceLevel string `json:"serviceLevel,omitempty"`
SnapReserve int `json:"snapReserve,omitempty"`
SnapshotDirectory bool `json:"snapshotDirectory,omitempty"`
SnapshotPolicy SnapshotPolicy `json:"snapshotPolicy,omitempty"`
Timezone string `json:"timezone,omitempty"`
UsedBytes int `json:"usedBytes,omitempty"`
}
type FilesystemCreateRequest ¶
type FilesystemCreateRequest struct {
Name string `json:"name"`
Region string `json:"region"`
BackupPolicy *BackupPolicy `json:"backupPolicy,omitempty"`
CreationToken string `json:"creationToken"`
ExportPolicy ExportPolicy `json:"exportPolicy,omitempty"`
Jobs []Job `json:"jobs,omitempty"`
Labels []string `json:"labels,omitempty"`
PoolID string `json:"poolId,omitempty"`
ProtocolTypes []string `json:"protocolTypes"`
QuotaInBytes int64 `json:"quotaInBytes"`
SecurityStyle string `json:"securityStyle"`
ServiceLevel string `json:"serviceLevel"`
SnapReserve *int64 `json:"snapReserve,omitempty"`
SnapshotDirectory bool `json:"snapshotDirectory"`
SnapshotPolicy SnapshotPolicy `json:"snapshotPolicy,omitempty"`
Timezone string `json:"timezone,omitempty"`
VendorID string `json:"vendorID,omitempty"`
BackupID string `json:"backupId,omitempty"`
SnapshotID string `json:"snapshotId,omitempty"`
}
type FilesystemRenameRequest ¶
type FilesystemResizeRequest ¶
type HourlySchedule ¶
type MonthlySchedule ¶
type MountTarget ¶
type MountTarget struct {
Created time.Time `json:"created"`
FileSystemID string `json:"fileSystemId"`
LifeCycleState string `json:"lifeCycleState"`
LifeCycleStateDetails string `json:"lifeCycleStateDetails"`
OwnerID string `json:"ownerId"`
Region string `json:"region"`
EndIP string `json:"endIP"`
Gateway string `json:"gateway"`
IPAddress string `json:"ipAddress"`
MountTargetID string `json:"mountTargetId"`
Netmask string `json:"netmask"`
StartIP string `json:"startIP"`
VlanID int `json:"vlanId"`
}
type RegionsResponse ¶
type RegionsResponse struct {
Regions []Region
}
type Snapshot ¶
type Snapshot struct {
Created time.Time `json:"created"`
FileSystemID string `json:"fileSystemId"`
LifeCycleState string `json:"lifeCycleState"`
LifeCycleStateDetails string `json:"lifeCycleStateDetails"`
Name string `json:"name"`
OwnerID string `json:"ownerId"`
Region string `json:"region"`
SnapshotID string `json:"snapshotId"`
UsedBytes int `json:"usedBytes"`
}
type SnapshotCreateRequest ¶
type SnapshotPolicy ¶
type SnapshotPolicy struct {
DailySchedule DailySchedule `json:"dailySchedule"`
Enabled bool `json:"enabled"`
HourlySchedule HourlySchedule `json:"hourlySchedule"`
MonthlySchedule MonthlySchedule `json:"monthlySchedule"`
WeeklySchedule WeeklySchedule `json:"weeklySchedule"`
}
type SnapshotRevertRequest ¶
type TerminalStateError ¶
type TerminalStateError struct {
Err error
}
TerminalStateError signals that the object is in a terminal state. This is used to stop waiting on an object to change state.
func TerminalState ¶
func TerminalState(err error) *TerminalStateError
TerminalState wraps the given err in a *TerminalStateError.
func (*TerminalStateError) Error ¶
func (e *TerminalStateError) Error() string