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 Drill
- type GetResult
- type JobResponse
- type JobResult
- type JobStatus
- type Servers
- 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 { // Protection Group ID GroupID string `json:"server_group_id" required:"true"` // Drill vpc id DrillVpcID string `json:"drill_vpc_id" required:"true"` // DR-Drill Name Name string `json:"name" required:"true"` }
CreateOpts contains all the values needed to create a new dr-drill.
func (CreateOpts) ToDrillCreateMap ¶
func (opts CreateOpts) ToDrillCreateMap() (map[string]interface{}, error)
ToDrillCreateMap builds a create request body from CreateOpts.
type CreateOptsBuilder ¶
CreateOptsBuilder allows extensions to add additional parameters to the Create request.
type Drill ¶
type Drill struct { // DR-Drill ID Id string `json:"id"` // DR-Drill Name Name string `json:"name"` // DR-Drill Status Status string `json:"status"` // DR-Drill VPC ID DrillVpcID string `json:"drill_vpc_id"` // DR-Drill Group ID GroupID string `json:"server_group_id"` // DR-Drill Volume IDs Servers []Servers `json:"drill_servers"` }
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 dr-drill.
func (GetResult) ExtractInto ¶
func (r GetResult) ExtractInto(v interface{}) error
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 DR-Drill 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 map[string]interface{} `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 { // DR-Drill name Name string `json:"name" required:"true"` }
UpdateOpts contains all the values needed to update a dr-drill.
func (UpdateOpts) ToDrillUpdateMap ¶
func (opts UpdateOpts) ToDrillUpdateMap() (map[string]interface{}, error)
ToDrillUpdateMap 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 dr-drill.
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 dr-drill. The response code from api is 200
func (UpdateResult) ExtractInto ¶
func (r UpdateResult) ExtractInto(v interface{}) error