flavors

package
v0.0.0-...-63319d1 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2024 License: MPL-2.0, Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AttrsObject

type AttrsObject struct {
	Capacity string `json:"capacity"`
	Name     string `json:"name"`
	Value    string `json:"value"`
}

AttrsObject contains attributes of the flavor

type Flavor

type Flavor struct {
	SpecCode         string           `json:"spec_code"`
	CacheMode        string           `json:"cache_mode"`
	Engine           string           `json:"engine"`
	EngineVersion    string           `json:"engine_version"`
	TenantIPCount    int              `json:"tenant_ip_count"`
	ReplicaCount     int              `json:"replica_count"`
	IsDes            bool             `json:"is_dec"`
	Capacity         []string         `json:"capacity"`
	BillingMode      []string         `json:"billing_mode"`
	ProductType      string           `json:"product_type"`
	CPUType          string           `json:"cpu_type"`
	StorageType      string           `json:"storage_type"`
	PricingType      string           `json:"pricing_type"`
	ServiceTypeCode  string           `json:"cloud_service_type_code"`
	ResourceTypeCode string           `json:"cloud_resource_type_code"`
	Attributes       []AttrsObject    `json:"attrs"`
	AvailableZones   []FlavorAzObject `json:"flavors_available_zones"`
}

Flavor for dcs

type FlavorAzObject

type FlavorAzObject struct {
	Capacity string   `json:"capacity"`
	AzCodes  []string `json:"az_codes"`
}

FlavorAzObject contains information of the available zones

type ListOpts

type ListOpts struct {
	CacheMode     string `q:"cache_mode"`
	Engine        string `q:"engine"`
	EngineVersion string `q:"engine_version"`
	Capacity      string `q:"capacity"`
	SpecCode      string `q:"spec_code"`
	CPUType       string `q:"cpu_type"`
}

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.

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.

type ListResult

type ListResult struct {
	golangsdk.Result
}

ListResult contains the body of getting detailed

func List

func List(client *golangsdk.ServiceClient, opts ListOptsBuilder) (r ListResult)

List implements a flavor List request.

func (ListResult) Extract

func (r ListResult) Extract() ([]Flavor, error)

Extract from ListResult

Jump to

Keyboard shortcuts

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