gophercloud: github.com/rackspace/gophercloud/openstack/compute/v2/extensions/schedulerhints Index | Files

package schedulerhints

import "github.com/rackspace/gophercloud/openstack/compute/v2/extensions/schedulerhints"

Package schedulerhints enables instances to provide the OpenStack scheduler hints about where they should be placed in the cloud.

Index

Package Files

doc.go requests.go

type CreateOptsExt Uses

type CreateOptsExt struct {
    servers.CreateOptsBuilder

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

CreateOptsExt adds a SchedulerHints option to the base CreateOpts.

func (CreateOptsExt) ToServerCreateMap Uses

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

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

type SchedulerHints Uses

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

    // 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) ToServerSchedulerHintsMap Uses

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

ToServerSchedulerHintsMap builds the scheduler hints into a serializable format.

type SchedulerHintsBuilder Uses

type SchedulerHintsBuilder interface {
    ToServerSchedulerHintsMap() (map[string]interface{}, error)
}

SchedulerHintsBuilder builds the scheduler hints into a serializable format.

Package schedulerhints imports 5 packages (graph) and is imported by 34 packages. Updated 2016-07-23. Refresh now. Tools for package owners.