flavors

package
v1.0.20 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2019 License: Apache-2.0 Imports: 2 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 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.
	// Contains 0 if the ID is not an integer.
	ID int `json:"id"`

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

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

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

	// The flavor's unique identifier as a string
	StrID string `json:"str_id"`
}

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

func ExtractFlavors

func ExtractFlavors(r 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 (page FlavorPage) IsEmpty() (bool, error)

IsEmpty determines if a page contains any results.

func (FlavorPage) NextPageURL

func (page 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) (r GetResult)

Get will retrieve information for a specified hardware flavor.

func (GetResult) Extract

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

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

Directories

Path Synopsis
db_flavors_v1
db_flavors_v1

Jump to

Keyboard shortcuts

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