Documentation
¶
Overview ¶
Package schedulerhints enables instances to provide the OpenStack scheduler hints about where they should be placed in the cloud.
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
}
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.
Click to show internal directories.
Click to hide internal directories.