snapshots

package
v0.0.0-...-eebe1bb Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package contains code from Rackspace Gophercloud (https://github.com/rackspace/gophercloud) with following changes: - structure ListOpts:

  • added AllTenants field

Package contains code from Rackspace Gophercloud (https://github.com/rackspace/gophercloud) with following changes: - Snapshot structure:

  • renamed Metadata field to Meta
  • renamed CreatedAt field to Created
  • removed SnaphotID field
  • removed VolumeType field
  • removed Bootable field
  • removed AvailabilityZone field
  • removed Attachments field
  • removed original field comments
  • added OsExtendedSnapshotAttributesProgress field
  • added OsExtendedSnapshotAttributesProjectID field

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func List

List returns Snapshots optionally limited by the conditions provided in ListOpts.

Types

type GetResult

type GetResult struct {
	// contains filtered or unexported fields
}

GetResult contains the response body and error from a Get request.

type ListOpts

type ListOpts struct {
	Name       string `q:"display_name"`
	Status     string `q:"status"`
	VolumeID   string `q:"volume_id"`
	AllTenants bool   `q:"all_tenants"`
}

ListOpts hold options for listing Snapshots. It is passed to the snapshots.List function.

func (ListOpts) ToSnapshotListQuery

func (opts ListOpts) ToSnapshotListQuery() (string, error)

ToSnapshotListQuery formats a ListOpts into a query string.

type ListOptsBuilder

type ListOptsBuilder interface {
	ToSnapshotListQuery() (string, error)
}

ListOptsBuilder allows extensions to add additional parameters to the List request.

type ListResult

type ListResult struct {
	pagination.SinglePageBase
}

ListResult is a pagination.Pager that is returned from a call to the List function.

func (ListResult) IsEmpty

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

IsEmpty returns true if a ListResult contains no Snapshots.

type Snapshot

type Snapshot struct {
	Created                               string                 `mapstructure:"created_at"`
	Description                           string                 `mapstructure:"description"`
	ID                                    string                 `mapstructure:"id"`
	Meta                                  map[string]interface{} `mapstructure:"metadata"`
	Name                                  string                 `mapstructure:"name"`
	OsExtendedSnapshotAttributesProgress  string                 `mapstructure:"os-extended-snapshot-attributes:progress"`
	OsExtendedSnapshotAttributesProjectID string                 `mapstructure:"os-extended-snapshot-attributes:project_id"`
	Status                                string                 `mapstructure:"status"`
	Size                                  int                    `mapstructure:"size"`
	VolumeID                              string                 `mapstructure:"volume_id"`
}

Snapshot contains information associated with an OpenStack Snapshot.

func ExtractSnapshots

func ExtractSnapshots(page pagination.Page) ([]Snapshot, error)

ExtractSnapshots extracts and returns Snapshots. It is used while iterating over a snapshots.List call.

Jump to

Keyboard shortcuts

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