attachreplication

package
v0.4.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 2, 2021 License: Apache-2.0 Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RequestOpts = golangsdk.RequestOpts{
	MoreHeaders: map[string]string{"Content-Type": "application/json", "X-Language": "en-us"},
}

Functions

func GetJobEntity

func GetJobEntity(client *golangsdk.ServiceClient, jobId string, label string) (interface{}, error)

func WaitForJobSuccess

func WaitForJobSuccess(client *golangsdk.ServiceClient, secs int, jobID string) error

Types

type CreateOpts

type CreateOpts struct {
	// Device is the device that the volume will attach to the instance as.
	// Omit for "auto".
	Device string `json:"device" required:"true"`

	// ReplicationID is the ID of the volume to attach to the instance.
	ReplicationID string `json:"replication_id" required:"true"`
}

CreateOpts specifies replication attachment creation or import parameters.

func (CreateOpts) ToReplicationAttachmentCreateMap

func (opts CreateOpts) ToReplicationAttachmentCreateMap() (map[string]interface{}, error)

ToReplicationAttachmentCreateMap constructs a request body from CreateOpts.

type CreateOptsBuilder

type CreateOptsBuilder interface {
	ToReplicationAttachmentCreateMap() (map[string]interface{}, error)
}

CreateOptsBuilder allows extensions to add parameters to the Create request.

type JobResponse

type JobResponse struct {
	JobID string `json:"job_id"`
}

type JobResult

type JobResult struct {
	golangsdk.Result
}

func Create

func Create(client *golangsdk.ServiceClient, instanceID string, opts CreateOptsBuilder) (r JobResult)

Create requests the creation of a new replication attachment on the instance.

func Delete

func Delete(client *golangsdk.ServiceClient, instanceID, replicationID string) (r JobResult)

Delete requests the deletion of a previous stored ReplicationAttachment from the instance.

func (JobResult) ExtractJobResponse

func (r JobResult) ExtractJobResponse() (*JobResponse, error)

func (JobResult) ExtractJobStatus

func (r JobResult) ExtractJobStatus() (*JobStatus, error)

type JobStatus

type JobStatus struct {
	Status     string            `json:"status"`
	Entities   map[string]string `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"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL