datastores

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: MPL-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func List

List will list all available datastores that instances can use.

Types

type Capabilities

type Capabilities struct {
	Capabilities []Capability `json:"capabilities"`
}

Capabilities represents a object containing all datastore capabilities.

type Capability

type Capability struct {
	Name                   string                      `json:"name"`
	Description            string                      `json:"description"`
	Status                 string                      `json:"status"`
	Params                 map[string]*CapabilityParam `json:"params"`
	ShouldBeOnMaster       bool                        `json:"should_be_on_master"`
	AllowUpgradeFromBackup bool                        `json:"allow_upgrade_from_backup"`
	AllowMajorUpgrade      bool                        `json:"allow_major_upgrade"`
}

Capability represents a Datastore capability.

type CapabilityParam

type CapabilityParam struct {
	Required     bool        `json:"required"`
	Type         string      `json:"type"`
	ElementType  string      `json:"element_type"`
	EnumValues   []string    `json:"enum_values"`
	DefaultValue interface{} `json:"default_value"` // workaround since there's bug in API response
	MinValue     float64     `json:"min"`
	MaxValue     float64     `json:"max"`
	Regex        string      `json:"regex"`
	Masked       bool        `json:"masked"`
}

CapabilityParam represents a parameter of a Datastore capability.

type Datastore

type Datastore struct {
	Name               string    `json:"name"`
	ID                 string    `json:"id"`
	MinimumCPU         int       `json:"minimum_cpu"`
	MinimumRAM         int       `json:"minimum_ram"`
	Versions           []Version `json:"versions"`
	VolumeTypes        []string  `json:"volume_types"`
	ClusterVolumeTypes []string  `json:"cluster_volume_types"`
}

Datastore represents a Datastore API resource.

func ExtractDatastores

func ExtractDatastores(r pagination.Page) ([]Datastore, error)

ExtractDatastores retrieves a slice of dataStore structs from a paginated collection.

type DatastoreShort

type DatastoreShort struct {
	Type    string `json:"type" required:"true"`
	Version string `json:"version" required:"true"`
}

type GetResult

type GetResult struct {
	gophercloud.Result
}

GetResult represents the result of a dataStoreGet operation.

func Get

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

Get will retrieve the details of a specified datastore type.

func (GetResult) Extract

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

Extract retrieves a single dataStore struct from an operation result.

type ListCapabilitiesResult

type ListCapabilitiesResult struct {
	gophercloud.Result
}

ListCapabilitiesResult represents the result of ListCapabilities operation.

func ListCapabilities

func ListCapabilities(client *gophercloud.ServiceClient, dsType string, versionID string) (r ListCapabilitiesResult)

func (ListCapabilitiesResult) Extract

func (r ListCapabilitiesResult) Extract() ([]Capability, error)

type ListParametersResult

type ListParametersResult struct {
	gophercloud.Result
}

ListParametersResult represents the result of ListParameters operation.

func ListParameters

func ListParameters(client *gophercloud.ServiceClient, dsType string, versionID string) (r ListParametersResult)

dataStoreListParameters will list all available configuration parameters for a specific version of a datastore.

func (ListParametersResult) Extract

func (r ListParametersResult) Extract() ([]Param, error)

type Page

type Page struct {
	pagination.SinglePageBase
}

Page represents a page of datastore resources.

func (Page) IsEmpty

func (r Page) IsEmpty() (bool, error)

IsEmpty indicates whether a Datastore collection is empty.

type Param

type Param struct {
	Name            string  `json:"name"`
	Type            string  `json:"type"`
	MinValue        float64 `json:"min"`
	MaxValue        float64 `json:"max"`
	RestartRequried bool    `json:"restart_required"`
}

Param represents a configuration parameter supported by a datastore

type ParametersResp

type ParametersResp struct {
	Name string `json:"name"`
	Type string `json:"type"`
}

type ParametersRespOpts

type ParametersRespOpts struct {
	ConfigurationParameters []ParametersRespOpts `json:"configuration-parameters"`
}

type Params

type Params struct {
	Params []Param `json:"configuration-parameters"`
}

Params represents a object containing all datastore configuration parameters.

type Version

type Version struct {
	ID    string
	Links []gophercloud.Link
	Name  string
}

Version represents a version API resource Multiple versions belong to a dataStore.

Jump to

Keyboard shortcuts

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