protectiongroups

package
v0.9.4 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2025 License: Apache-2.0 Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

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 {
	// 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"`
}

ServerGroupInfo contains all the values needed to create a new group.

type CreateProtectionGroupResponse added in v0.9.4

type CreateProtectionGroupResponse struct {
	// 	Specifies the job ID.
	JobID string `json:"job_id"`
}

func Create

Create will create a new Group based on the values in CreateOpts.

type DeleteProtectionGroupResponse added in v0.9.4

type DeleteProtectionGroupResponse struct {
	// 	Specifies the job ID.
	JobID string `json:"job_id"`
}

func Delete

func Delete(client *golangsdk.ServiceClient, ServerGroupId string) (*DeleteProtectionGroupResponse, error)

Create will create a new Group based on the values in CreateOpts.

type DisableOpts

type DisableOpts struct {
	// Disables protection for a protection group. The StopServerGroup is an empty object.
	StopServerGroup map[string]interface{} `json:"stop-server-group" required:"true"`
}

DisableOpts contains all the values needed to disable protection for a Group.

type DisableResponse added in v0.9.4

type DisableResponse struct {
	// 	Specifies the job ID.
	JobID string `json:"job_id"`
}

func Disable

func Disable(client *golangsdk.ServiceClient, ServerGroupId string) (*DisableResponse, error)

Disable will Disable protection for a protection Group.

type EnableOpts

type EnableOpts struct {
	// Enables protection for a protection group. The StartServerGroup is an empty object.
	StartServerGroup map[string]interface{} `json:"start-server-group" required:"true"`
}

EnableOpts contains all the values needed to enable protection for a Group.

type EnableResponse added in v0.9.4

type EnableResponse struct {
	// 	Specifies the job ID.
	JobID string `json:"job_id"`
}

func Enable

func Enable(client *golangsdk.ServiceClient, ServerGroupId string) (*EnableResponse, error)

Enable will enable protection for a protection Group.

type GetResponse added in v0.9.4

type GetResponse struct {
	// Specifies the information about a protection group.
	ServerGroup ServerGroupResponseInfo `json:"server_group"`
}

type JobEntity

type JobEntity struct {
	GroupID string `json:"server_group_id"`
}

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 ServerGroupResponseInfo added in v0.9.4

type ServerGroupResponseInfo struct {
	// ID specifies the ID of a protection group.
	Id string `json:"id"`
	// Name specifies the name of a protection group.
	Name string `json:"name"`
	// Description specifies the description of a protection group.
	Description string `json:"description"`
	// Status specifies the status of a protection group.
	Status string `json:"status"`
	// Progress specifies the synchronization progress of a protection group. Unit %
	Progress int `json:"progress"`
	// SourceAvailabilityZone specifies the production site AZ configured when a protection group is created.
	SourceAvailabilityZone string `json:"source_availability_zone"`
	// TargetAvailabilityZone specifies the DR site AZ configured when a protection group is created.
	TargetAvailabilityZone string `json:"target_availability_zone"`
	// DomainID specifies the ID of an active-active domain.
	DomainID string `json:"domain_id"`
	// DomainName specifies the name of an active-active domain.
	DomainName string `json:"domain_name"`
	// ProtectedStatus specifies whether protection is enabled or not.
	ProtectedStatus string `json:"protected_status"`
	// ReplicationStatus specifies the data synchronization status.
	ReplicationStatus string `json:"replication_status"`
	// HealthStatus specifies the health status of a protection group.
	HealthStatus string `json:"health_status"`
	// PriorityStation specifies the current production site of a protection group.
	PriorityStation string `json:"priority_station"`
	// ProtectedInstanceNum specifies the number of protected instances in a protection group.
	ProtectedInstanceNum int `json:"protected_instance_num"`
	// ReplicationNum specifies the number of replication pairs in a protection group.
	ReplicationNum int `json:"replication_num"`
	// DisasterRecoveryDrillNum specifies the number of DR drills in a protection group.
	DisasterRecoveryDrillNum int `json:"disaster_recovery_drill_num"`
	// SourceVPCID specifies the ID of the VPC for the production site.
	SourceVPCID string `json:"source_vpc_id"`
	// TargetVPCID specifies the ID of the VPC for the DR site.
	TargetVPCID string `json:"target_vpc_id"`
	// TestVPCID specifies the ID of the VPC used for a DR drill.
	TestVPCID string `json:"test_vpc_id"`
	// DRType specifies the deployment model. The default value is migration, indicating migration within a VPC.
	DRType string `json:"dr_type"`
	// ServerType specifies the type of managed servers.
	ServerType string `json:"server_type"`
	// CreatedAt specifies the time when a protection group was created. Format: yyyy-MM-dd HH:mm:ss.S
	CreatedAt string `json:"created_at"`
	// UpdatedAt specifies the time when a protection group was updated. Format: yyyy-MM-dd HH:mm:ss.S
	UpdatedAt string `json:"updated_at"`
	// ProtectionType specifies the protection mode.
	ProtectionType string `json:"protection_type"`
	// ReplicationModel specifies the protection mode.
	ReplicationModel string `json:"replication_model"`
}

func Get

func Get(client *golangsdk.ServiceClient, ServerGroupId string) (*ServerGroupResponseInfo, error)

Get retrieves a particular Group based on its unique ID.

func Update

func Update(client *golangsdk.ServiceClient, ServerGroupId string, opts UpdateOpts) (*ServerGroupResponseInfo, error)

Update accepts a UpdateOpts struct and uses the values to update a Group.The response code from api is 200

type UpdateOpts

type UpdateOpts struct {
	// Group name
	Name string `json:"name" required:"true"`
}

UpdateOpts contains server_group info

type UpdateResponse added in v0.9.4

type UpdateResponse struct {
	// Specifies the information about a protection group.
	ServerGroup ServerGroupResponseInfo `json:"server_group"`
}

Jump to

Keyboard shortcuts

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