Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateOpts ¶
type CreateOpts struct { // Defines the SFS Turbo file system name Name string `json:"name" required:"true"` ShareProto string `json:"share_proto,omitempty"` ShareType string `json:"share_type" required:"true"` // Size in GB, range from 500 to 32768. Size int `json:"size" required:"true"` // The availability zone of the SFS Turbo file system AvailabilityZone string `json:"availability_zone" required:"true"` // The VPC ID VpcID string `json:"vpc_id" required:"true"` // The subnet ID SubnetID string `json:"subnet_id" required:"true"` // The security group ID SecurityGroupID string `json:"security_group_id" required:"true"` // The enterprise project ID EnterpriseProjectId string `json:"enterprise_project_id,omitempty"` // The backup ID BackupID string `json:"backup_id,omitempty"` // Share description Description string `json:"description,omitempty"` // The metadata information Metadata Metadata `json:"metadata,omitempty"` }
CreateOpts contains the options for create an SFS Turbo. This object is passed to shares.Create().
func (CreateOpts) ToShareCreateMap ¶
func (opts CreateOpts) ToShareCreateMap() (map[string]interface{}, error)
ToShareCreateMap assembles a request body based on the contents of a CreateOpts.
type CreateOptsBuilder ¶
type CreateOptsBuilder interface {
}CreateOptsBuilder allows extensions to add additional parameters to the Create request.
type CreateResult ¶
type CreateResult struct {
// contains filtered or unexported fields
}
CreateResult contains the response body and error from a Create request.
func Create ¶
func Create(client *golangsdk.ServiceClient, opts CreateOptsBuilder) (r CreateResult)
Create will create a new SFS Turbo file system based on the values in CreateOpts. To extract the Share object from the response, call the Extract method on the CreateResult.
func (CreateResult) Extract ¶
func (r CreateResult) Extract() (*TurboResponse, error)
Extract will get the Turbo response object from the CreateResult
type DeleteResult ¶
type DeleteResult struct {
golangsdk.ErrResult
}
DeleteResult contains the response body and error from a Delete request.
func Delete ¶
func Delete(client *golangsdk.ServiceClient, id string) (r DeleteResult)
Delete will delete an existing SFS Trubo file system with the given UUID.
type ExpandOpts ¶
type ExpandOpts struct { // Specifies the extend object. Extend ExtendOpts `json:"extend" required:"true"` }
ExpandOpts contains the options for expanding a SFS Turbo. This object is passed to shares.Expand().
func (ExpandOpts) ToShareExpandMap ¶
func (opts ExpandOpts) ToShareExpandMap() (map[string]interface{}, error)
ToShareExpandMap assembles a request body based on the contents of a ExpandOpts.
type ExpandOptsBuilder ¶
type ExpandOptsBuilder interface {
}ExpandOptsBuilder allows extensions to add additional parameters to the Expand request.
type ExpandResult ¶
type ExpandResult struct {
golangsdk.ErrResult
}
ExpandResult contains the response body and error from a Expand request.
func Expand ¶
func Expand(client *golangsdk.ServiceClient, share_id string, opts ExpandOptsBuilder) (r ExpandResult)
Expand will expand a SFS Turbo based on the values in ExpandOpts.
type ExtendOpts ¶
type ExtendOpts struct { // Specifies the post-expansion capacity (GB) of the shared file system. NewSize int `json:"new_size" required:"true"` }
type GetResult ¶
type GetResult struct {
// contains filtered or unexported fields
}
GetResult contains the response body and error from a Get request.
type Metadata ¶
type Metadata struct { ExpandType string `json:"expand_type,omitempty"` CryptKeyID string `json:"crypt_key_id,omitempty"` DedicatedFlavor string `json:"dedicated_flavor,omitempty"` MasterDedicatedHostID string `json:"master_dedicated_host_id,omitempty"` SlaveDedicatedHostID string `json:"slave_dedicated_host_id,omitempty"` DedicatedStorageID string `json:"dedicated_storage_id,omitempty"` }
Metadata specifies the metadata information
type Turbo ¶
type Turbo struct { // The UUID of the SFS Turbo file system ID string `json:"id"` // The name of the SFS Turbo file system Name string `json:"name"` // Size of the share in GB Size string `json:"size"` // The statue of the SFS Turbo file system Status string `json:"status"` // The sub-statue of the SFS Turbo file system SubStatus string `json:"sub_status"` // The version ID of the SFS Turbo file system Version string `json:"version"` // The mount location ExportLocation string `json:"export_location"` // The creation progress of the SFS Turbo file system Actions []string `json:"actions"` ShareProto string `json:"share_proto"` ShareType string `json:"share_type"` // The region of the SFS Turbo file system Region string `json:"region"` // The code of the availability zone AvailabilityZone string `json:"availability_zone"` // The name of the availability zone AZName string `json:"az_name"` // The VPC ID VpcID string `json:"vpc_id"` // The subnet ID SubnetID string `json:"subnet_id"` // The security group ID SecurityGroupID string `json:"security_group_id"` // The avaliable capacity if the SFS Turbo file system AvailCapacity string `json:"avail_capacity"` // bandwidth is returned for an enhanced file system ExpandType string `json:"expand_type"` // The ID of the encryption key CryptKeyID string `json:"crypt_key_id"` // The billing mode, 0 indicates pay-per-use, 1 indicates yearly/monthly subscription PayModel string `json:"pay_model"` // Timestamp when the share was created CreatedAt time.Time `json:"-"` }
Turbo contains all information associated with an SFS Turbo file system
func ExtractTurbos ¶
func ExtractTurbos(r pagination.Page) ([]Turbo, error)
ExtractTurbos accepts a Page struct, specifically a TurboPage struct, and extracts the elements into a slice of share structs. In other words, a generic collection is mapped into a relevant slice.
func List ¶
List returns a Pager which allows you to iterate over a collection of SFS Turbo resources.
func (*Turbo) UnmarshalJSON ¶
type TurboPage ¶
type TurboPage struct {
pagination.LinkedPageBase
}
TurboPage is the page returned by a pager when traversing over a collection of Shares.
func (TurboPage) NextPageURL ¶
NextPageURL is invoked when a paginated collection of shares has reached the end of a page and the pager seeks to traverse over a new one. In order to do this, it needs to construct the next page's URL.
type TurboResponse ¶
type TurboResponse struct { ID string `json:"id"` Name string `json:"name"` Status string `json:"status"` }
TurboResponse contains the information of creating response