backups

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2023 License: Apache-2.0 Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Delete

func Delete(client *golangsdk.ServiceClient, id string) (err error)

func RestoreBackup

func RestoreBackup(client *golangsdk.ServiceClient, backupID string, opts RestoreBackupOpts) (err error)

Types

type Backup

type Backup struct {
	CheckpointID string            `json:"checkpoint_id"`
	CreatedAt    string            `json:"created_at"`
	Description  string            `json:"description"`
	ExpiredAt    string            `json:"expired_at"`
	ExtendInfo   *BackupExtendInfo `json:"extend_info"`
	ID           string            `json:"id"`
	ImageType    string            `json:"image_type"`
	Name         string            `json:"name"`
	ParentID     string            `json:"parent_id"`
	ProjectID    string            `json:"project_id"`
	ProtectedAt  string            `json:"protected_at"`
	ResourceAZ   string            `json:"resource_az"`
	ResourceID   string            `json:"resource_id"`
	ResourceName string            `json:"resource_name"`
	ResourceSize int               `json:"resource_size"`
	ResourceType string            `json:"resource_type"`
	Status       string            `json:"status"`
	UpdatedAt    string            `json:"updated_at"`
	VaultId      string            `json:"vault_id"`
	ProviderID   string            `json:"provider_id"`
	Children     []BackupResp      `json:"children"`
}

func ExtractBackups

func ExtractBackups(r pagination.Page) ([]Backup, error)

func Get

func Get(client *golangsdk.ServiceClient, id string) (*Backup, error)

func List

func List(client *golangsdk.ServiceClient, opts ListOpts) ([]Backup, error)

type BackupExtendInfo

type BackupExtendInfo struct {
	AutoTrigger          bool        `json:"auto_trigger"`
	Bootable             bool        `json:"bootable"`
	Incremental          bool        `json:"incremental"`
	SnapshotID           string      `json:"snapshot_id"`
	SupportLld           bool        `json:"support_lld"`
	SupportedRestoreMode string      `json:"supported_restore_mode"`
	OsImagesData         []ImageData `json:"os_images_data"`
	ContainSystemDisk    bool        `json:"contain_system_disk"`
	Encrypted            bool        `json:"encrypted"`
	SystemDisk           bool        `json:"system_disk"`
}

type BackupPage

type BackupPage struct {
	pagination.LinkedPageBase
}

func (BackupPage) IsEmpty

func (r BackupPage) IsEmpty() (bool, error)

func (BackupPage) NextPageURL

func (r BackupPage) NextPageURL() (string, error)

type BackupResp

type BackupResp struct {
	CheckpointID string            `json:"checkpoint_id"`
	CreatedAt    string            `json:"created_at"`
	Description  string            `json:"description"`
	ExpiredAt    string            `json:"expired_at"`
	ExtendInfo   *BackupExtendInfo `json:"extend_info"`
	ID           string            `json:"id"`
	ImageType    string            `json:"image_type"`
	Name         string            `json:"name"`
	ParentID     string            `json:"parent_id"`
	ProjectID    string            `json:"project_id"`
	ProtectedAt  string            `json:"protected_at"`
	ResourceAZ   string            `json:"resource_az"`
	ResourceID   string            `json:"resource_id"`
	ResourceName string            `json:"resource_name"`
	ResourceSize int               `json:"resource_size"`
	ResourceType string            `json:"resource_type"`
	Status       string            `json:"status"`
	UpdatedAt    string            `json:"updated_at"`
	VaultID      string            `json:"vault_id"`
	ProviderID   string            `json:"provider_id"`
}

type BackupRestoreServer

type BackupRestoreServer struct {
	BackupID string `json:"backup_id"`
	VolumeID string `json:"volume_id"`
}

type ImageData

type ImageData struct {
	ImageID string `json:"image_id"`
}

type ListOpts

type ListOpts struct {
	ID           string
	CheckpointID string `q:"checkpoint_id"`
	ImageType    string `q:"image_type"`
	Limit        string `q:"limit"`
	Marker       string `q:"marker"`
	Name         string `q:"name"`
	Offset       string `q:"offset"`
	ParentID     string `q:"parent_id"`
	ResourceAZ   string `q:"resource_az"`
	ResourceID   string `q:"resource_id"`
	ResourceName string `q:"resource_name"`
	ResourceType string `q:"resource_type"`
	Sort         string `q:"sort"`
	Status       string `q:"status"`
	VaultID      string `q:"vault_id"`
}

ListOpts allows the filtering and sorting of paginated collections through the API. Filtering is achieved by passing in struct field values that map to the flavor attributes you want to see returned.

type RestoreBackupOpts

type RestoreBackupOpts struct {
	Mappings []BackupRestoreServer `json:"mappings,omitempty"`
	PowerOn  bool                  `json:"power_on,omitempty"`
	ServerID string                `json:"server_id,omitempty"`
	VolumeID string                `json:"volume_id,omitempty"`
}

Jump to

Keyboard shortcuts

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