nodegroups

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

This section is empty.

Types

type BatchAddParams

type BatchAddParams struct {
	Action  string      `json:"action,omitempty"`
	Payload []NodeGroup `json:"payload,omitempty"`
}

func (*BatchAddParams) Map

func (opts *BatchAddParams) Map() (map[string]interface{}, error)

Map builds request params.

type CreateOpts

type CreateOpts struct {
	ClusterID          string   `json:"cluster_id" required:"true"`
	Name               string   `json:"name"`
	Labels             []Label  `json:"labels,omitempty"`
	Taints             []Taint  `json:"taints,omitempty"`
	NodeCount          int      `json:"node_count,omitempty"`
	MaxNodes           int      `json:"max_nodes,omitempty"`
	MinNodes           int      `json:"min_nodes,omitempty"`
	VolumeSize         int      `json:"volume_size,omitempty"`
	VolumeType         string   `json:"volume_type,omitempty"`
	FlavorID           string   `json:"flavor_id,omitempty"`
	Autoscaling        bool     `json:"autoscaling_enabled,omitempty"`
	AvailabilityZones  []string `json:"availability_zones,omitempty"`
	MaxNodeUnavailable int      `json:"max_node_unavailable,omitempty"`
}

CreateOpts contains options to create node group.

func (*CreateOpts) Map

func (opts *CreateOpts) Map() (map[string]interface{}, error)

Map builds request params.

type CreateResult

type CreateResult struct {
	// contains filtered or unexported fields
}

func Create

func Create(client *gophercloud.ServiceClient, opts OptsBuilder) (r CreateResult)

func (CreateResult) Extract

func (r CreateResult) Extract() (*NodeGroup, error)

Extract parses result into params for node group.

type DeleteResult

type DeleteResult struct {
	gophercloud.ErrResult
}

func Delete

func Delete(client *gophercloud.ServiceClient, id string) (r DeleteResult)

type GetResult

type GetResult struct {
	// contains filtered or unexported fields
}

func Get

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

func (GetResult) Extract

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

Extract parses result into params for node group.

type Label

type Label struct {
	Key   string `json:"key"`
	Value string `json:"value,omitempty"`
}

type Node

type Node struct {
	Name        string     `json:"name"`
	UUID        string     `json:"uuid"`
	NodeGroupID string     `json:"node_group_id"`
	CreatedAt   *time.Time `json:"created_at"`
	UpdatedAt   *time.Time `json:"updated_at,omitempty"`
}

type NodeGroup

type NodeGroup struct {
	Name               string    `json:"name,omitempty"`
	NodeCount          int       `json:"node_count,omitempty"`
	MaxNodes           int       `json:"max_nodes,omitempty"`
	MinNodes           int       `json:"min_nodes,omitempty"`
	VolumeSize         int       `json:"volume_size,omitempty"`
	VolumeType         string    `json:"volume_type,omitempty"`
	FlavorID           string    `json:"flavor_id,omitempty"`
	ImageID            string    `json:"image_id,omitempty"`
	Autoscaling        bool      `json:"autoscaling_enabled,omitempty"`
	ClusterID          string    `json:"cluster_id,omitempty"`
	UUID               string    `json:"uuid,omitempty"`
	CreatedAt          time.Time `json:"created_at,omitempty"`
	UpdatedAt          time.Time `json:"updated_at,omitempty"`
	Nodes              []*Node   `json:"nodes,omitempty"`
	State              string    `json:"state,omitempty"`
	AvailabilityZones  []string  `json:"availability_zones"`
	MaxNodeUnavailable int       `json:"max_node_unavailable,omitempty"`
}

func (*NodeGroup) Map

func (opts *NodeGroup) Map() (map[string]interface{}, error)

Map builds request params.

type OptsBuilder

type OptsBuilder interface {
	Map() (map[string]interface{}, error)
}

type PatchOpts

type PatchOpts []PatchParams

func (*PatchOpts) PatchMap

func (opts *PatchOpts) PatchMap() ([]map[string]interface{}, error)

PatchMap collects all the params.

type PatchOptsBuilder

type PatchOptsBuilder interface {
	PatchMap() ([]map[string]interface{}, error)
}

type PatchParams

type PatchParams struct {
	Path  string      `json:"path,omitempty"`
	Value interface{} `json:"value,omitempty"`
	Op    string      `json:"op,omitempty"`
}

func (*PatchParams) Map

func (opts *PatchParams) Map() (map[string]interface{}, error)

Map builds request params.

type PatchResult

type PatchResult struct {
	gophercloud.Result
}

func Patch

func Patch(client *gophercloud.ServiceClient, id string, opts PatchOptsBuilder) (r PatchResult)

func (PatchResult) Extract

func (r PatchResult) Extract() (string, error)

Extract returns uuid.

type ResizeOpts added in v0.5.1

type ResizeOpts struct {
	FlavorID string `json:"flavor_id" required:"true"`
}

ResizeOpts contains options to change flavor of node group

func (*ResizeOpts) Map added in v0.5.1

func (opts *ResizeOpts) Map() (map[string]interface{}, error)

Map builds request params.

type ResizeResult added in v0.5.1

type ResizeResult struct {
	// contains filtered or unexported fields
}

func Resize added in v0.5.1

func Resize(client *gophercloud.ServiceClient, id string, opts OptsBuilder) (r ResizeResult)

func (ResizeResult) Extract added in v0.5.1

func (r ResizeResult) Extract() (string, error)

Extract returns uuid.

type ScaleOpts

type ScaleOpts struct {
	Delta    int    `json:"delta" required:"true"`
	Rollback string `json:"rollback,omitempty"`
}

ScaleOpts contains options to scale node group

func (*ScaleOpts) Map

func (opts *ScaleOpts) Map() (map[string]interface{}, error)

Map builds request params.

type ScaleResult

type ScaleResult struct {
	// contains filtered or unexported fields
}

func Scale

func Scale(client *gophercloud.ServiceClient, id string, opts OptsBuilder) (r ScaleResult)

func (ScaleResult) Extract

func (r ScaleResult) Extract() (*NodeGroup, error)

Extract parses result into params for node group.

type Taint

type Taint struct {
	Key    string `json:"key,omitempty"`
	Value  string `json:"value,omitempty"`
	Effect string `json:"effect,omitempty"`
}

Jump to

Keyboard shortcuts

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