schedulerhints

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: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateOptsBuilder

type CreateOptsBuilder interface {
	ToServerSchedulerHintsCreateMap() (map[string]interface{}, error)
}

CreateOptsBuilder builds the scheduler hints into a serializable format.

type CreateOptsExt

type CreateOptsExt struct {
	servers.CreateOptsBuilder

	// SchedulerHints provides a set of hints to the scheduler.
	SchedulerHints CreateOptsBuilder
}

CreateOptsExt adds a SchedulerHints option to the base CreateOpts.

func (CreateOptsExt) ToServerCreateMap

func (opts CreateOptsExt) ToServerCreateMap() (map[string]interface{}, error)

ToServerCreateMap adds the SchedulerHints option to the base server creation options.

type SchedulerHints

type SchedulerHints struct {
	// Group specifies a Server Group to place the instance in.
	Group string

	// DifferentHost will place the instance on a compute node that does not
	// host the given instances.
	DifferentHost []string

	// SameHost will place the instance on a compute node that hosts the given
	// instances.
	SameHost []string

	// Query is a conditional statement that results in compute nodes able to
	// host the instance.
	Query []interface{}

	// TargetCell specifies a cell name where the instance will be placed.
	TargetCell string `json:"target_cell,omitempty"`

	// BuildNearHostIP specifies a subnet of compute nodes to host the instance.
	BuildNearHostIP string

	// AdditionalProperies are arbitrary key/values that are not validated by nova.
	AdditionalProperties map[string]interface{}

	// Specifies whether the ECS is created on a Dedicated Host (DeH) or in a shared pool.
	Tenancy string `json:"tenancy,omitempty"`

	// DedicatedHostID specifies a DeH ID.
	DedicatedHostID string `json:"dedicated_host_id,omitempty"`
}

SchedulerHints represents a set of scheduling hints that are passed to the OpenStack scheduler.

func (SchedulerHints) ToServerSchedulerHintsCreateMap

func (opts SchedulerHints) ToServerSchedulerHintsCreateMap() (map[string]interface{}, error)

ToServerSchedulerHintsMap builds the scheduler hints into a serializable format.

Jump to

Keyboard shortcuts

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