Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func List ¶
func List(client *golangsdk.ServiceClient) (p pagination.Pager)
Types ¶
type FilterOpts ¶
type FilterOpts struct {
Version string
// One of ess, ess-master, ess-client, ess-cloud
Type string
// Name of the searched flavor
FlavorName string
DiskMin *Limit
DiskMax *Limit
// Region - region the flavor is available for
Region string
CPU *Limit
// RAM - memory size, GB
RAM *Limit
}
Options to filter version list by
type Flavor ¶
type Flavor struct {
// RAM - memory size of an instance.
// Unit: GB
RAM int `json:"ram"`
// CPU - number of vCPUs of an instance.
CPU int `json:"cpu"`
// Name - flavor name.
Name string `json:"name"`
Region string `json:"region"`
// DiskMin - minimal disk capacity of an instance.
DiskMin int `json:"-"`
// DiskMax - maximum disk capacity of an instance.
DiskMax int `json:"-"`
// FlavorID - ID of a flavor.
FlavorID string `json:"flavor_id"`
}
func FindFlavor ¶
func FindFlavor(versions []Version, opts FilterOpts) *Flavor
FindFlavor - finds first flavor matching options
func (*Flavor) UnmarshalJSON ¶
type ListResult ¶
type Version ¶
type Version struct {
// Version - engine version
Version string `json:"version"`
// Type - instance type.
// The options are `ess`, `ess-cold`, `ess-master`, and `ess-client`.
Type string `json:"type"`
// Flavors - list of flavors
Flavors []Flavor `json:"flavors"`
}
func ExtractVersions ¶
func ExtractVersions(p pagination.Page) ([]Version, error)
func FilterVersions ¶
func FilterVersions(versions []Version, opts FilterOpts) []Version
FilterVersions - filters flavors in version list by given options (with AND operator)
type VersionPage ¶
type VersionPage struct {
pagination.SinglePageBase
}
func (VersionPage) IsEmpty ¶
func (v VersionPage) IsEmpty() (bool, error)
Click to show internal directories.
Click to hide internal directories.