flavors

package
v1.3.0-alpha.2 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2016 License: Apache-2.0, Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package flavors provides information and interaction with the flavor API resource in the OpenStack Database service.

A flavor is an available hardware configuration for a database instance. Each flavor has a unique combination of disk space, memory capacity and priority for CPU time.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleGet

func HandleGet(t *testing.T)

func HandleList

func HandleList(t *testing.T)

func List

List will list all available hardware flavors that an instance can use. The operation is identical to the one supported by the Nova API, but without the "disk" property.

Types

type Flavor

type Flavor struct {
	// The flavor's unique identifier.
	ID string `mapstructure:"id"`

	// The RAM capacity for the flavor.
	RAM int `mapstructure:"ram"`

	// The Name field provides a human-readable moniker for the flavor.
	Name string `mapstructure:"name"`

	// Links to access the flavor.
	Links []gophercloud.Link
}

Flavor records represent (virtual) hardware configurations for server resources in a region.

func ExtractFlavors

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

ExtractFlavors provides access to the list of flavors in a page acquired from the List operation.

type FlavorPage

type FlavorPage struct {
	pagination.LinkedPageBase
}

FlavorPage contains a single page of the response from a List call.

func (FlavorPage) IsEmpty

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

IsEmpty determines if a page contains any results.

func (FlavorPage) NextPageURL

func (p FlavorPage) NextPageURL() (string, error)

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

type GetResult

type GetResult struct {
	gophercloud.Result
}

GetResult temporarily holds the response from a Get call.

func Get

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

Get will retrieve information for a specified hardware flavor.

func (GetResult) Extract

func (gr GetResult) Extract() (*Flavor, error)

Extract provides access to the individual Flavor returned by the Get function.

Jump to

Keyboard shortcuts

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