volumetypes

package
v0.0.0-...-63319d1 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2024 License: MPL-2.0, 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

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

func List

func List(client *golangsdk.ServiceClient, opts ListOptsBuilder) pagination.Pager

List returns Volume types.

Types

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"`

	ExtraSpecsOrigin map[string]interface{}

	// Arbitrary key-value pairs defined by the user.
	ExtraSpecs map[string]string `q:"extra_specs"`
}

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

VolumeType 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)

NextPageURL uses the response's embedded link reference to navigate to the next page of results.

Jump to

Keyboard shortcuts

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