Documentation ¶
Index ¶
- func GetJobEntity(client *golangsdk.ServiceClient, jobId string, label string) (interface{}, error)
- func WaitForJobSuccess(client *golangsdk.ServiceClient, secs int, jobID string) error
- type CreateOpts
- type CreateOptsBuilder
- type DisableOpts
- type EnableOpts
- type GetResult
- type Group
- type JobEntity
- type JobResponse
- type JobResult
- type JobStatus
- type UpdateOpts
- type UpdateOptsBuilder
- type UpdateResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetJobEntity ¶
func WaitForJobSuccess ¶
Types ¶
type CreateOpts ¶
type CreateOpts struct { // Group Name Name string `json:"name" required:"true"` // Group Description Description string `json:"description,omitempty"` // The source AZ of a protection group SourceAZ string `json:"source_availability_zone" required:"true"` // The target AZ of a protection group TargetAZ string `json:"target_availability_zone" required:"true"` // An active-active domain DomainID string `json:"domain_id" required:"true"` // ID of the source VPC SourceVpcID string `json:"source_vpc_id" required:"true"` // Deployment model DrType string `json:"dr_type,omitempty"` }
CreateOpts contains all the values needed to create a new group.
func (CreateOpts) ToGroupCreateMap ¶
func (opts CreateOpts) ToGroupCreateMap() (map[string]interface{}, error)
ToGroupCreateMap builds a create request body from CreateOpts.
type CreateOptsBuilder ¶
CreateOptsBuilder allows extensions to add additional parameters to the Create request.
type DisableOpts ¶
type DisableOpts struct { }
DisableOpts contains all the values needed to disable protection for a Group.
func (DisableOpts) ToGroupDisableMap ¶
func (opts DisableOpts) ToGroupDisableMap() (map[string]interface{}, error)
ToGroupDisableMap builds a create request body from DisableOpts.
type EnableOpts ¶
type EnableOpts struct { }
EnableOpts contains all the values needed to enable protection for a Group.
func (EnableOpts) ToGroupEnableMap ¶
func (opts EnableOpts) ToGroupEnableMap() (map[string]interface{}, error)
ToGroupEnableMap builds a create request body from EnableOpts.
type GetResult ¶
type GetResult struct {
// contains filtered or unexported fields
}
GetResult represents the result of a get operation. Call its Extract method to interpret it as a Group.
func (GetResult) ExtractInto ¶
func (r GetResult) ExtractInto(v interface{}) error
type Group ¶
type Group struct { // Group ID Id string `json:"id"` // Group Name Name string `json:"name"` // Group Description Description string `json:"description"` // The source AZ of a protection group SourceAZ string `json:"source_availability_zone"` // The target AZ of a protection group TargetAZ string `json:"target_availability_zone"` // An active-active domain DomainID string `json:"domain_id"` // ID of the source VPC SourceVpcID string `json:"source_vpc_id"` // Deployment model DrType string `json:"dr_type"` }
type JobResponse ¶
type JobResponse struct {
JobID string `json:"job_id"`
}
type JobResult ¶
type JobResult struct {
golangsdk.Result
}
func Create ¶
func Create(c *golangsdk.ServiceClient, opts CreateOptsBuilder) (r JobResult)
Create will create a new Group based on the values in CreateOpts.
func (JobResult) ExtractJobResponse ¶
func (r JobResult) ExtractJobResponse() (*JobResponse, error)
func (JobResult) ExtractJobStatus ¶
type JobStatus ¶
type JobStatus struct { Status string `json:"status"` Entities JobEntity `json:"entities"` JobID string `json:"job_id"` JobType string `json:"job_type"` BeginTime string `json:"begin_time"` EndTime string `json:"end_time"` ErrorCode string `json:"error_code"` FailReason string `json:"fail_reason"` }
type UpdateOpts ¶
type UpdateOpts struct { // Group name Name string `json:"name" required:"true"` }
UpdateOpts contains all the values needed to update a Group.
func (UpdateOpts) ToGroupUpdateMap ¶
func (opts UpdateOpts) ToGroupUpdateMap() (map[string]interface{}, error)
ToGroupUpdateMap builds a update request body from UpdateOpts.
type UpdateOptsBuilder ¶
UpdateOptsBuilder allows extensions to add additional parameters to the Update request.
type UpdateResult ¶
type UpdateResult struct {
// contains filtered or unexported fields
}
UpdateResult represents the result of a update operation. Call its Extract method to interpret it as a Group.
func Update ¶
func Update(c *golangsdk.ServiceClient, id string, opts UpdateOptsBuilder) (r UpdateResult)
Update accepts a UpdateOpts struct and uses the values to update a Group.The response code from api is 200
func (UpdateResult) ExtractInto ¶
func (r UpdateResult) ExtractInto(v interface{}) error