volumetypes

package
v1.11.0 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2021 License: Apache-2.0 Imports: 2 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractVolumeTypesInto

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

ExtractVolumeTypesInto is information expander for volume types

func IDFromName

func IDFromName(client *eclcloud.ServiceClient, name string) (string, error)

IDFromName is a convienience function that returns a server's ID given its name.

func List

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

Types

type ExtraSpec

type ExtraSpec struct {
	AvailableVolumeSize       []int    `json:"available_volume_size"`
	AvailableVolumeThroughput []string `json:"available_volume_throughput"`
	AvailableIOPSPerGB        []string `json:"available_iops_per_gb"`
}

ExtraSpec is struct which corresponds to extra_specs object.

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 *eclcloud.ServiceClient, id string) (r GetResult)

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

func (GetResult) Extract

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

Extract will get the VolumeType object out of the commonResult object.

func (GetResult) ExtractInto

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

type ListOpts

type ListOpts struct {
}

ListOpts holds options for listing ToVolumeTypes. 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 {
	// API error in virtual storage creation.
	APIErrorMessage string `json:"api_error_message"`
	// Unique identifier for the volume type.
	ID string `json:"id"`
	// Human-readable display name for the volume type.
	Name string `json:"name"`
	// Extra specification of volume type.
	// This includes available_volume_size, and available_iops_per_gb,
	// or available_throughput depending on storage service type.
	ExtraSpecs ExtraSpec `json:"extra_specs"`
}

VolumeType contains all the information associated with a Virtual Storage.

func ExtractVolumeTypes

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

ExtractVolumeTypes extracts and returns VolumeTypes. 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 VirtualStorages.

Directories

Path Synopsis
Package testing contains volume type unit tests
Package testing contains volume type unit tests

Jump to

Keyboard shortcuts

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