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 ¶
func List(client *gophercloud.ServiceClient) pagination.Pager
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.