Documentation ¶
Index ¶
Constants ¶
const NoValidHost = "not enough hosts available"
NoValidHost is a part of the error message returned when there is no valid host in the zone to deploy a VM.
Variables ¶
var ( // ErrNotFound is returned when the requested resource could not be found. ErrNotFound = fmt.Errorf("resource not found") // ErrMultipleFound is returned when a resource that is expected to be unique has multiple matches. // For example, reverse lookups from names to IDs may yield multiple matches because names are not unique in most // OpenStack resources. In case this case, where a unique ID could not be determined an ErrMultipleFound is returned. ErrMultipleFound = fmt.Errorf("multiple resources found") )
Functions ¶
This section is empty.
Types ¶
type Executor ¶
type Executor struct { Compute client.Compute Network client.Network Storage client.Storage Config *api.MachineProviderConfig }
Executor concretely handles the execution of requests to the machine controller. Executor is responsible for communicating with OpenStack services and orchestrates the operations.
func NewExecutor ¶
NewExecutor returns a new instance of Executor.
func (*Executor) CreateMachine ¶
func (ex *Executor) CreateMachine(ctx context.Context, machineName string, userData []byte) (string, error)
CreateMachine creates a new OpenStack server instance and waits until it reports "ACTIVE". If there is an error during the build process, or if the building phase timeouts, it will delete any artifacts created.
func (*Executor) DeleteMachine ¶
DeleteMachine deletes a server based on the supplied machineName. If a providerID is supplied it is used instead of the machineName to locate the server.