Documentation ¶
Index ¶
- func ExtractReplicasInto(r pagination.Page, v interface{}) error
- func List(client *gophercloud.ServiceClient, opts ListOptsBuilder) pagination.Pager
- func ListDetail(client *gophercloud.ServiceClient, opts ListOptsBuilder) pagination.Pager
- type CreateOpts
- type CreateOptsBuilder
- type CreateResult
- type DeleteResult
- type ExportLocation
- type ForceDeleteResult
- type GetExportLocationResult
- type GetResult
- type ListExportLocationsResult
- type ListOpts
- type ListOptsBuilder
- type PromoteOpts
- type PromoteOptsBuilder
- type PromoteResult
- type Replica
- type ReplicaPage
- type ResetStateOpts
- type ResetStateOptsBuilder
- type ResetStateResult
- type ResetStatusOpts
- type ResetStatusOptsBuilder
- type ResetStatusResult
- type ResyncResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExtractReplicasInto ¶
func ExtractReplicasInto(r pagination.Page, v interface{}) error
ExtractReplicasInto similar to ExtractReplicas but operates on a `list` of replicas.
func List ¶
func List(client *gophercloud.ServiceClient, opts ListOptsBuilder) pagination.Pager
List returns []Replica optionally limited by the conditions provided in ListOpts.
func ListDetail ¶
func ListDetail(client *gophercloud.ServiceClient, opts ListOptsBuilder) pagination.Pager
ListDetail returns []Replica optionally limited by the conditions provided in ListOpts.
Types ¶
type CreateOpts ¶
type CreateOpts struct { string `json:"share_id" required:"true"` // belong to. ShareNetworkID string `json:"share_network_id,omitempty"` // The availability zone of the share replica. AvailabilityZone string `json:"availability_zone,omitempty"` // One or more scheduler hints key and value pairs as a dictionary of // strings. Minimum supported microversion for SchedulerHints is 2.67. SchedulerHints map[string]string `json:"scheduler_hints,omitempty"` }ShareID
CreateOpts contains the options for create a Share Replica. This object is passed to replicas.Create function. For more information about these parameters, please refer to the Replica object, or the shared file systems API v2 documentation.
func (CreateOpts) ToReplicaCreateMap ¶
func (opts CreateOpts) ToReplicaCreateMap() (map[string]interface{}, error)
ToReplicaCreateMap assembles a request body based on the contents of a CreateOpts.
type CreateOptsBuilder ¶
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 *gophercloud.ServiceClient, opts CreateOptsBuilder) (r CreateResult)
Create will create a new Share Replica based on the values in CreateOpts. To extract the Replica object from the response, call the Extract method on the CreateResult.
type DeleteResult ¶
type DeleteResult struct {
gophercloud.ErrResult
}
DeleteResult contains the response body and error from a Delete request.
func Delete ¶
func Delete(client *gophercloud.ServiceClient, id string) (r DeleteResult)
Delete will delete an existing Replica with the given UUID.
type ExportLocation ¶
type ExportLocation struct { // The share replica export location UUID. ID string `json:"id"` // The export location path that should be used for mount operation. Path string `json:"path"` ShareInstanceID string `json:"share_instance_id"` // Defines purpose of an export location. If set to true, then it is // expected to be used for service needs and by administrators only. If // it is set to false, then this export location can be used by end users. IsAdminOnly bool `json:"is_admin_only"` // Drivers may use this field to identify which export locations are // most efficient and should be used preferentially by clients. // By default it is set to false value. New in version 2.14. Preferred bool `json:"preferred"` // The availability zone of the share replica. AvailabilityZone string `json:"availability_zone"` // The share replica state. State string `json:"replica_state"` // Timestamp when the export location was created. CreatedAt time.Time `json:"-"` // Timestamp when the export location was updated. UpdatedAt time.Time `json:"-"` }
ExportLocation contains all information associated with a share export location
func (*ExportLocation) UnmarshalJSON ¶
func (r *ExportLocation) UnmarshalJSON(b []byte) error
type ForceDeleteResult ¶
type ForceDeleteResult struct {
gophercloud.ErrResult
}
ForceDeleteResult contains the error from a ForceDelete request.
func ForceDelete ¶
func ForceDelete(client *gophercloud.ServiceClient, id string) (r ForceDeleteResult)
ForceDelete force-deletes a Share Replica in any state. ForceDeleteResult contains only the error. To extract it, call the ExtractErr method on the ForceDeleteResult. Administrator only.
type GetExportLocationResult ¶
type GetExportLocationResult struct {
gophercloud.Result
}
GetExportLocationResult contains the result body and error from a GetExportLocation request.
func GetExportLocation ¶
func GetExportLocation(client *gophercloud.ServiceClient, replicaID string, id string) (r GetExportLocationResult)
GetExportLocation will get replicaID's export location by an ID. Minimum supported microversion for GetExportLocation is 2.47.
func (GetExportLocationResult) Extract ¶
func (r GetExportLocationResult) Extract() (*ExportLocation, error)
Extract will get the Export Location from the GetExportLocationResult
type GetResult ¶
type GetResult struct {
// contains filtered or unexported fields
}
GetResult contains the response body and error from a Get request.
func Get ¶
func Get(client *gophercloud.ServiceClient, id string) (r GetResult)
Get will get a single share with given UUID
type ListExportLocationsResult ¶
type ListExportLocationsResult struct {
gophercloud.Result
}
ListExportLocationsResult contains the result body and error from a ListExportLocations request.
func ListExportLocations ¶
func ListExportLocations(client *gophercloud.ServiceClient, id string) (r ListExportLocationsResult)
ListExportLocations will list replicaID's export locations. Minimum supported microversion for ListExportLocations is 2.47.
func (ListExportLocationsResult) Extract ¶
func (r ListExportLocationsResult) Extract() ([]ExportLocation, error)
Extract will get the Export Locations from the ListExportLocationsResult
type ListOpts ¶
type ListOpts struct { string `q:"share_id"` // Per page limit for share replicas Limit int `q:"limit"` // Used in conjunction with limit to return a slice of items. Offset int `q:"offset"` // The ID of the last-seen item. Marker string `q:"marker"` }ShareID
ListOpts holds options for listing Share Replicas. This object is passed to the replicas.List or replicas.ListDetail functions.
func (ListOpts) ToReplicaListQuery ¶
ToReplicaListQuery formats a ListOpts into a query string.
type ListOptsBuilder ¶
ListOptsBuilder allows extensions to add additional parameters to the List request.
type PromoteOpts ¶
type PromoteOpts struct { // The quiesce wait time in seconds used during replica promote. // Minimum supported microversion for QuiesceWaitTime is 2.75. QuiesceWaitTime int `json:"quiesce_wait_time,omitempty"` }
PromoteOpts contains options for promoteing a Replica to active replica state. This object is passed to the replicas.Promote function.
func (PromoteOpts) ToReplicaPromoteMap ¶
func (opts PromoteOpts) ToReplicaPromoteMap() (map[string]interface{}, error)
ToReplicaPromoteMap assembles a request body based on the contents of a PromoteOpts.
type PromoteOptsBuilder ¶
PromoteOptsBuilder allows extensions to add additional parameters to the Promote request.
type PromoteResult ¶
type PromoteResult struct {
gophercloud.ErrResult
}
PromoteResult contains the error from an Promote request.
func Promote ¶
func Promote(client *gophercloud.ServiceClient, id string, opts PromoteOptsBuilder) (r PromoteResult)
Promote will promote an existing Replica to active state. PromoteResult contains only the error. To extract it, call the ExtractErr method on the PromoteResult.
type Replica ¶
type Replica struct { // ID of the share replica ID string `json:"id"` // The availability zone of the share replica. AvailabilityZone string `json:"availability_zone"` // Indicates whether existing access rules will be cast to read/only. CastRulesToReadonly bool `json:"cast_rules_to_readonly"` // The host name of the share replica. Host string `json:"host"` ShareID string `json:"share_id"` ShareNetworkID string `json:"share_network_id"` ShareServerID string `json:"share_server_id"` // The share replica status. Status string `json:"status"` // The share replica state. State string `json:"replica_state"` // Timestamp when the replica was created. CreatedAt time.Time `json:"-"` // Timestamp when the replica was updated. UpdatedAt time.Time `json:"-"` }
Replica contains all information associated with an OpenStack Share Replica.
func ExtractReplicas ¶
func ExtractReplicas(r pagination.Page) ([]Replica, error)
ExtractReplicas extracts and returns Replicas. It is used while iterating over a replicas.List or replicas.ListDetail calls.
func (*Replica) UnmarshalJSON ¶
type ReplicaPage ¶
type ReplicaPage struct {
pagination.MarkerPageBase
}
ReplicaPage is a pagination.pager that is returned from a call to the List function.
func (ReplicaPage) IsEmpty ¶
func (r ReplicaPage) IsEmpty() (bool, error)
IsEmpty satisifies the IsEmpty method of the Page interface.
func (ReplicaPage) LastMarker ¶
func (r ReplicaPage) LastMarker() (string, error)
LastMarker returns the last offset in a ListResult.
func (ReplicaPage) NextPageURL ¶
func (r ReplicaPage) NextPageURL() (string, error)
NextPageURL generates the URL for the page of results after this one.
type ResetStateOpts ¶
type ResetStateOpts struct { // The state of a share replica. List of possible values: "active", // "in_sync", "out_of_sync" or "error". State string `json:"replica_state" required:"true"` }
ResetStateOpts contain options for updating a Share Replica state. This object is passed to the replicas.ResetState function. Administrator only.
func (ResetStateOpts) ToReplicaResetStateMap ¶
func (opts ResetStateOpts) ToReplicaResetStateMap() (map[string]interface{}, error)
ToReplicaResetStateMap assembles a request body based on the contents of an ResetStateOpts.
type ResetStateOptsBuilder ¶
ResetStateOptsBuilder allows extensions to add additional parameters to the ResetState request.
type ResetStateResult ¶
type ResetStateResult struct {
gophercloud.ErrResult
}
ResetStateResult contains the error from a ResetState request.
func ResetState ¶
func ResetState(client *gophercloud.ServiceClient, id string, opts ResetStateOptsBuilder) (r ResetStateResult)
ResetState will reset the Share Replica state with provided information. ResetStateResult contains only the error. To extract it, call the ExtractErr method on the ResetStateResult.
type ResetStatusOpts ¶
type ResetStatusOpts struct { // The status of a share replica. List of possible values: "available", // "error", "creating", "deleting" or "error_deleting". Status string `json:"status" required:"true"` }
ResetStatusOpts contain options for updating a Share Replica status. This object is passed to the replicas.ResetStatus function. Administrator only.
func (ResetStatusOpts) ToReplicaResetStatusMap ¶
func (opts ResetStatusOpts) ToReplicaResetStatusMap() (map[string]interface{}, error)
ToReplicaResetStatusMap assembles a request body based on the contents of an ResetStatusOpts.
type ResetStatusOptsBuilder ¶
ResetStatusOptsBuilder allows extensions to add additional parameters to the ResetStatus request.
type ResetStatusResult ¶
type ResetStatusResult struct {
gophercloud.ErrResult
}
ResetStatusResult contains the error from a ResetStatus request.
func ResetStatus ¶
func ResetStatus(client *gophercloud.ServiceClient, id string, opts ResetStatusOptsBuilder) (r ResetStatusResult)
ResetStatus will reset the Share Replica status with provided information. ResetStatusResult contains only the error. To extract it, call the ExtractErr method on the ResetStatusResult.
type ResyncResult ¶
type ResyncResult struct {
gophercloud.ErrResult
}
ResyncResult contains the error from a Resync request.
func Resync ¶
func Resync(client *gophercloud.ServiceClient, id string) (r ResyncResult)
Resync a replica with its active mirror. ResyncResult contains only the error. To extract it, call the ExtractErr method on the ResyncResult.