Documentation ¶
Index ¶
- Constants
- func List(client *golangsdk.ServiceClient, ops ListOptsBuilder) pagination.Pager
- type ActionResult
- func Extend(client *golangsdk.ServiceClient, id string, ...) (r ActionResult)
- func FailOver(client *golangsdk.ServiceClient, id string) (r ActionResult)
- func Reprotect(client *golangsdk.ServiceClient, id string) (r ActionResult)
- func Reverse(client *golangsdk.ServiceClient, id string) (r ActionResult)
- func Stop(client *golangsdk.ServiceClient, id string) (r ActionResult)
- func Sync(client *golangsdk.ServiceClient, id string) (r ActionResult)
- type CreateOps
- type CreateOpsBuilder
- type CreateResult
- type DeleteResult
- type ExtendReplicationVolumesOps
- type ExtendReplicationVolumesOpsBuilder
- type GetResult
- type ListOpts
- type ListOptsBuilder
- type ReplicationConsistencyGroup
- type ReplicationConsistencyGroupCreateorUpdate
- type ReplicationConsistencyGroupPage
- type ReplicationsOps
- type UpdateOpts
- type UpdateOptsBuilder
- type UpdateResult
Constants ¶
const ( // OsFailoverReplicationConsistencyGroup is performing a failover for a replication consistency group. OsFailoverReplicationConsistencyGroup = "os-failover-replication-consistency-group" // OsSyncReplicationConsistencyGroup is synchronizing a replication consistency group. OsSyncReplicationConsistencyGroup = "os-sync-replication-consistency-group" // OsReverseReplicationConsistencyGroup is performing a primary/secondary switchover for a replication consistency group. OsReverseReplicationConsistencyGroup = "os-reverse-replication-consistency-group" // OsStopReplicationConsistencyGroup is pausing a replication consistency group. OsStopReplicationConsistencyGroup = "os-stop-replication-consistency-group" // OsReprotectReplicationConsistencyGroup is reprotecting a replication consistency group. OsReprotectReplicationConsistencyGroup = "os-reprotect-replication-consistency-group" // OsExtendReplicationVolume is expanding EVS disks in a replication consistency group. OsExtendReplicationVolume = "os-extend-replication-volumes" )
Variables ¶
This section is empty.
Functions ¶
func List ¶
func List(client *golangsdk.ServiceClient, ops ListOptsBuilder) pagination.Pager
List all the replication consistency groups
Types ¶
type ActionResult ¶
type ActionResult struct {
golangsdk.ErrResult
}
ActionResult is the result of action operations
func Extend ¶
func Extend(client *golangsdk.ServiceClient, id string, ops ExtendReplicationVolumesOpsBuilder) (r ActionResult)
Extend is expanding EVS disks in a replication consistency group.
func FailOver ¶
func FailOver(client *golangsdk.ServiceClient, id string) (r ActionResult)
FailOver is performing a failover for a replication consistency group.
func Reprotect ¶
func Reprotect(client *golangsdk.ServiceClient, id string) (r ActionResult)
Reprotect is reprotecting a replication consistency group.
func Reverse ¶
func Reverse(client *golangsdk.ServiceClient, id string) (r ActionResult)
Reverse is performing a primary/secondary switchover for a replication consistency group.
func Stop ¶
func Stop(client *golangsdk.ServiceClient, id string) (r ActionResult)
Stop is pausing a replication consistency group.
func Sync ¶
func Sync(client *golangsdk.ServiceClient, id string) (r ActionResult)
Sync is synchronizing a replication consistency group.
type CreateOps ¶
type CreateOps struct { // The name of the replication consistency group. // The name can contain a maximum of 255 bytes. Name string `json:"name,omitempty"` // The description of the replication consistency group. // The description can contain a maximum of 255 bytes. Description string `json:"description,omitempty"` // The IDs of the EVS replication pairs used to // create the replication consistency group. ReplicationIDs []string `json:"replication_ids" required:"true"` // The primary AZ of the replication consistency group. // That is the AZ where the production disk belongs. PriorityStation string `json:"priority_station" required:"true"` // The type of the created replication consistency group. // Currently only type hypermetro is supported. ReplicationModel string `json:"replication_model" required:"true"` }
CreateOps is a struct that contains all the parameters.
func (CreateOps) ToReplicationConsistencyGroupCreateMap ¶
ToReplicationConsistencyGroupCreateMap is used for type convert
type CreateOpsBuilder ¶
type CreateOpsBuilder interface {
ToReplicationConsistencyGroupCreateMap() (map[string]interface{}, error)
}
CreateOpsBuilder is used for creating replication consistency group parameters. any struct providing the parameters should implement this interface
type CreateResult ¶
type CreateResult struct {
golangsdk.Result
}
CreateResult is a struct that contains all the return parameters of creation
func Create ¶
func Create(client *golangsdk.ServiceClient, ops CreateOpsBuilder) (r CreateResult)
Create a replication consistency group with given parameters.
func (CreateResult) Extract ¶
func (r CreateResult) Extract() (*ReplicationConsistencyGroupCreateorUpdate, error)
Extract from CreateResult
type DeleteResult ¶
type DeleteResult struct {
golangsdk.ErrResult
}
DeleteResult is a struct which contains the result of deletion
func Delete ¶
func Delete(client *golangsdk.ServiceClient, id string) (r DeleteResult)
Delete a replication consistency group by id
type ExtendReplicationVolumesOps ¶
type ExtendReplicationVolumesOps struct { // The expansion information of one or multiple EVS replication pairs. Replications []ReplicationsOps `json:"replications" required:"true"` }
ExtendReplicationVolumesOps is a struct that contains all the parameters.
type ExtendReplicationVolumesOpsBuilder ¶
type ExtendReplicationVolumesOpsBuilder interface {
ToExtendReplicationVolumesMap() (map[string]interface{}, error)
}
ExtendReplicationVolumesOpsBuilder is used for expanding EVS disks in a replication consistency group parameters. any struct providing the parameters should implement this interface
type GetResult ¶
type GetResult struct {
golangsdk.Result
}
GetResult contains the body of getting detailed
func (GetResult) Extract ¶
func (r GetResult) Extract() (*ReplicationConsistencyGroup, error)
Extract from GetResult
type ListOpts ¶
type ListOpts struct { Marker string `q:"marker"` Limit int `q:"limit"` SortKey string `q:"sort_key"` SortDir string `q:"sort_dir"` Offset int `q:"offset"` ChangesSince string `q:"changes-since"` Name string `q:"name"` Status string `q:"status"` PriorityStation string `q:"priority_station"` VolumeID string `q:"volume_id"` }
ListOpts is a struct that contains all the parameters.
func (ListOpts) ToReplicationConsistencyGroupListQuery ¶
ToReplicationConsistencyGroupListQuery formats a ListOpts into a query string.
type ListOptsBuilder ¶
ListOptsBuilder is an interface by which can be able to build the query string of the list function
type ReplicationConsistencyGroup ¶
type ReplicationConsistencyGroup struct { ID string `json:"id"` Name string `json:"name"` Description string `json:"description"` Status string `json:"status"` PriorityStation string `json:"priority_station"` ReplicationModel string `json:"replication_model"` ReplicationStatus string `json:"replication_status"` ReplicationIDs []string `json:"replication_ids"` CreatedAt string `json:"created_at"` UpdatedAt string `json:"updated_at"` FailureDetail string `json:"failure_detail"` FaultLevel string `json:"fault_level"` }
ReplicationConsistencyGroup response
func ExtractReplicationConsistencyGroups ¶
func ExtractReplicationConsistencyGroups(r pagination.Page) ([]ReplicationConsistencyGroup, error)
ExtractReplicationConsistencyGroups from List
type ReplicationConsistencyGroupCreateorUpdate ¶
type ReplicationConsistencyGroupCreateorUpdate struct { ID string `json:"id"` Name string `json:"name"` Description string `json:"description"` Status string `json:"status"` PriorityStation string `json:"priority_station"` CreatedAt string `json:"created_at"` UpdatedAt string `json:"updated_at"` }
ReplicationConsistencyGroupCreateorUpdate response
type ReplicationConsistencyGroupPage ¶
type ReplicationConsistencyGroupPage struct {
pagination.SinglePageBase
}
ReplicationConsistencyGroupPage may be embedded in a Page that contains all of the results from an operation at once.
func (ReplicationConsistencyGroupPage) IsEmpty ¶
func (r ReplicationConsistencyGroupPage) IsEmpty() (bool, error)
IsEmpty returns true if a ListResult contains no replications.
type ReplicationsOps ¶
type ReplicationsOps struct { // The IDs of EVS replication pairs ID string `json:"id" required:"true"` // The disk capacity after expansion in the EVS replication pair. // The unit is GB. NewSize int `json:"new_size" required:"true"` }
ReplicationsOps specifies the expansion information of one or multiple EVS replication pairs.
func (ReplicationsOps) ToExtendReplicationVolumesMap ¶
func (ops ReplicationsOps) ToExtendReplicationVolumesMap() (map[string]interface{}, error)
ToExtendReplicationVolumesMap is used for type convert
type UpdateOpts ¶
type UpdateOpts struct { // The name of the replication consistency group. // The name can contain a maximum of 255 bytes. Name string `json:"name,omitempty"` // The description of the replication consistency group. // The description can contain a maximum of 255 bytes. Description string `json:"description,omitempty"` // The type of the created replication consistency group. // Currently only type hypermetro is supported. ReplicationModel string `json:"replication_model,omitempty"` // The IDs of the EVS replication pairs to be added. AddReplicationIDs []string `json:"add_replication_ids,omitempty"` // The IDs of the EVS replication pairs to be removeed. RemoveReplicationIDs []string `json:"remove_replication_ids,omitempty"` }
UpdateOpts is a struct which represents the parameters of update function
func (UpdateOpts) ToReplicationConsistencyGroupUpdateMap ¶
func (opts UpdateOpts) ToReplicationConsistencyGroupUpdateMap() (map[string]interface{}, error)
ToReplicationConsistencyGroupUpdateMap is used for type convert
type UpdateOptsBuilder ¶
type UpdateOptsBuilder interface {
ToReplicationConsistencyGroupUpdateMap() (map[string]interface{}, error)
}
UpdateOptsBuilder is an interface which can build the map paramter of update function
type UpdateResult ¶
type UpdateResult struct {
golangsdk.Result
}
UpdateResult is a struct from which can get the result of update method
func Update ¶
func Update(client *golangsdk.ServiceClient, id string, opts UpdateOptsBuilder) (r UpdateResult)
Update is a method which can be able to update the replication consistency group via accessing to the service with Put method and parameters
func (UpdateResult) Extract ¶
func (r UpdateResult) Extract() (*ReplicationConsistencyGroupCreateorUpdate, error)
Extract from UpdateResult