flavors

package
v0.5.23 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2022 License: Apache-2.0 Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func List

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

List implements a flavor List request.

Types

type Flavor

type Flavor struct {
	EngineName string            `json:"engine_name"`
	Type       string            `json:"type"`
	Vcpus      string            `json:"vcpus"`
	Ram        string            `json:"ram"`
	SpecCode   string            `json:"spec_code"`
	AZStatus   map[string]string `json:"az_status"`
}

Flavor represents a DDS flavor.

func ExtractFlavors

func ExtractFlavors(r pagination.Page) ([]Flavor, error)

ExtractFlavors extracts a slice of Flavors from a List result.

type FlavorPage

type FlavorPage struct {
	pagination.LinkedPageBase
}

FlavorPage is a single page of Flavor results.

func (FlavorPage) IsEmpty

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

IsEmpty returns true if the page contains no results.

type ListOpts

type ListOpts struct {
	Region     string `q:"region"`
	EngineName string `q:"engine_name"`
}

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 server attributes you want to see returned. Marker and Limit are used for pagination.

func (ListOpts) ToFlavorListQuery

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

ToFlavorListQuery formats a ListOpts into a query string.

type ListOptsBuilder

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

ListOptsBuilder allows extensions to add parameters to the List request.

Jump to

Keyboard shortcuts

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