volumetypes

package
v0.0.0-...-ae37572 Latest Latest
Warning

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

Go to latest
Published: Aug 6, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractVolumeTypesInto

func ExtractVolumeTypesInto(r pagination.Page, v interface{}) error

ExtractVolumesInto similar to ExtractInto but operates on a `list` of volume types

func List

List returns Volume types.

Types

type GetResult

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

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

func Get

func Get(client *gophercloud.ServiceClient, id string) (r GetResult)

Get retrieves the Volume Type with the provided ID. To extract the Volume Type object from the response, call the Extract method on the GetResult.

func (GetResult) Extract

func (r GetResult) Extract() (*VolumeType, error)

Extract will get the Volume Type object out of the commonResult object.

func (GetResult) ExtractInto

func (r GetResult) ExtractInto(v interface{}) error

ExtractInto converts our response data into a volume type struct

type ListOpts

type ListOpts struct {
	// Comma-separated list of sort keys and optional sort directions in the
	// form of <key>[:<direction>].
	Sort string `q:"sort"`
	// Requests a page size of items.
	Limit int `q:"limit"`
	// Used in conjunction with limit to return a slice of items.
	Offset int `q:"offset"`
	// The ID of the last-seen item.
	Marker string `q:"marker"`
}

ListOpts holds options for listing Volume Types. It is passed to the volumetypes.List function.

func (ListOpts) ToVolumeTypeListQuery

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

ToVolumeTypeListQuery formats a ListOpts into a query string.

type ListOptsBuilder

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

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

type VolumeType

type VolumeType struct {
	// Unique identifier for the volume type.
	ID string `json:"id"`
	// Human-readable display name for the volume type.
	Name string `json:"name"`
	// Human-readable description for the volume type.
	Description string `json:"description"`
	// Arbitrary key-value pairs defined by the user.
	ExtraSpecs map[string]string `json:"extra_specs"`
	// Whether the volume type is publicly visible.
	IsPublic bool `json:"is_public"`
	// Qos Spec ID
	QosSpecID         string `json:"qos_specs_id"`
	VolumeBackendName string `json:"volume_backend_name"`
	AvailabilityZone  string `json:"availability-zone"`
	// Availability Zone list which support this type of volume
	RESKEYAvailabilityZone string `json:"RESKEY:availability_zone"`
	// Availability Zone list which sold out
	OSVenderExtendedSoldOutAvailabilityZones string `json:"os-vender-extended:sold_out_availability_zones"`
}

Volume Type contains all the information associated with an OpenStack Volume Type.

func ExtractVolumeTypes

func ExtractVolumeTypes(r pagination.Page) ([]VolumeType, error)

ExtractVolumeTypes extracts and returns Volumes. It is used while iterating over a volumetypes.List call.

type VolumeTypePage

type VolumeTypePage struct {
	pagination.LinkedPageBase
}

VolumeTypePage is a pagination.pager that is returned from a call to the List function.

func (VolumeTypePage) IsEmpty

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

IsEmpty returns true if a ListResult contains no Volume Types.

func (VolumeTypePage) NextPageURL

func (page VolumeTypePage) NextPageURL() (string, error)

Directories

Path Synopsis
volume_types
volume_types

Jump to

Keyboard shortcuts

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