checkpoints

package
v0.0.0-...-e794f14 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2024 License: Apache-2.0 Imports: 1 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Checkpoint

type Checkpoint struct {
	// The restore point ID.
	ID string `json:"id"`
	// The project ID.
	ProjectId string `json:"project_id"`
	// The creation time, the format is 'HHHH-MM-DDThh:mm:dd.000000'.
	CreatedAt string `json:"created_at"`
	// The status information.
	// The valid values are as follows:
	// + available
	// + deleting
	// + protecting
	// + deleted
	// + error-deleting
	// + error
	Status string `json:"status"`
	// The vault information.
	Vault VaultInfo `json:"vault"`
	// The extended information.
	ExtraInfo CheckpointExtraInfo `json:"extra_info"`
}

Checkpoint is the structure that represents the checkpoint and corresponding backup resources detail.

func Create

func Create(client *golangsdk.ServiceClient, opts CreateOpts) (*Checkpoint, error)

Create is a method used to create a new checkpoint using given parameters.

func Get

func Get(client *golangsdk.ServiceClient, checkpointId string) (*Checkpoint, error)

Get is a method to obtain an existing checkpoint by its ID.

type CheckpointExtraInfo

type CheckpointExtraInfo struct {
	// Backup name.
	Name string `json:"name"`
	// Backup description.
	Description string `json:"description"`
	// Number of days that backups can be retained.
	RetentionDuration int `json:"retention_duration"`
}

CheckpointExtraInfo is the structure that represents the extra information of the checkpoint.

type CheckpointParameter

type CheckpointParameter struct {
	// Whether automatic triggering is enabled.
	// Possible values are true (yes) and false (no).
	// Defaults to false.
	AutoTrigger *bool `json:"auto_trigger,omitempty"`
	// Backup description.
	Description string `json:"description,omitempty"`
	// Whether the backup is an incremental backup.
	// Possible values are true (yes) and false (no).
	// Defaults to true.
	Incremental *bool `json:"incremental,omitempty"`
	// Backup name, which can contain only digits, letters, underscores (_), and hyphens (-).
	Name string `json:"name,omitempty"`
	// The UUID list of resources to be backed up.
	Resources []string `json:"resources,omitempty"`
	// Resource details.
	ResourceDetails []Resource `json:"resource_details,omitempty"`
}

CheckpointParameter is the structure that represents the backup configuration.

type CheckpointResource

type CheckpointResource struct {
	// Extra information of the resource.
	ExtraInfo string `json:"extra_info"`
	// ID of the resource to be backed up.
	ID string `json:"id"`
	// Name of the resource to be backed up.
	Name string `json:"name"`
	// Protected status.
	// The valid values are as follows:
	// + available
	// + error
	// + protecting
	// + restoring
	// + removing
	ProtectStatus string `json:"protect_status"`
	// Allocated capacity for the associated resource, in GB.
	ResourceSize string `json:"resource_size"`
	// The type of the resource to be backed up, which can be:
	// + OS::Nova::Server
	// + OS::Cinder::Volume
	// + OS::Ironic::BareMetalServer
	// + OS::Native::Server
	// + OS::Sfs::Turbo
	// + OS::Workspace::DesktopV2
	Type string `json:"type"`
	// Backup size.
	BackupSize string `json:"backup_size"`
	// Number of backups.
	BackupCount string `json:"backup_count"`
}

CheckpointResource is the structure that represents the backup resources detail.

type CreateOpts

type CreateOpts struct {
	// The vault ID.
	VaultId string `json:"vault_id" required:"true"`
	// Parameters.
	Parameters CheckpointParameter `json:"parameters,omitempty"`
}

CreateOpts is the structure that used to create a checkpoint and backup some resources.

type Resource

type Resource struct {
	// ID of the vault resource type.
	ID string `json:"id" required:"true"`
	// The type of the resource to be backed up, which can be:
	// + OS::Nova::Server
	// + OS::Cinder::Volume
	// + OS::Ironic::BareMetalServer
	// + OS::Native::Server
	// + OS::Sfs::Turbo
	// + OS::Workspace::DesktopV2
	Type string `json:"type" required:"true"`
	// The vaule
	Name string `json:"name,omitempty"`
	// The extra volume configuration.
	ExtraInfo ResourceExtraInfo `json:"extra_info,omitempty"`
}

Resource is the structure that represents the backup resource detail.

type ResourceExtraInfo

type ResourceExtraInfo struct {
	// The IDs of the disks that will not be backed up. This parameter is used when servers are added to a vault,
	// which include all server disks. But some disks do not need to be backed up. Or in case that a server was
	// previously added and some disks on this server do not need to be backed up.
	ExcludeVolumes []string `json:"exclude_volumes,omitempty"`
}

ResourceExtraInfo is the structure that represents the configuration of the backup volume.

type SkippedResource

type SkippedResource struct {
	// Resource ID.
	ID string `json:"id"`
	// Resource type.
	Type string `json:"type"`
	// Resource name.
	Name string `json:"name"`
	// Error code.
	Code string `json:"code"`
	// Reason for the skipping. For example, the resource is being backed up.
	Reason string `json:"reason"`
}

CheckpointResource is the structure that represents the resources list which are not backed up.

type VaultInfo

type VaultInfo struct {
	// The vault ID.
	ID string `json:"id"`
	// The vault name.
	Name string `json:"name"`
	// The backup objects.
	Resources []CheckpointResource `json:"resources"`
	// The resources skipped during backup.
	SkippedResources []SkippedResource `json:"skipped_resources"`
}

VaultInfo is the structure that represents the backup storage information.

Jump to

Keyboard shortcuts

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