Documentation
¶
Index ¶
Constants ¶
const NoValidHost = "No valid host was found"
NoValidHost is a part of the error message returned when there is no valid host in the zone to deploy a VM. Matches:
"No valid host was found." "No valid host was found. There are not enough hosts available."
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 CreateMachineResult ¶ added in v0.25.0
CreateMachineResult represents the result of a CreateMachine call (internal IP addresses + provider ID of VM).
type ErrFlavorNotFound ¶ added in v0.25.0
type ErrFlavorNotFound struct {
Flavor string
}
ErrFlavorNotFound is returned when there is no flavor can be matched with the specified flavor name. It can happen when certain flavor is not available in specified region and needs to be treated as ResourceExhausted to allow fallback to other flavors.
func (ErrFlavorNotFound) Error ¶ added in v0.25.0
func (e ErrFlavorNotFound) Error() string
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) (*CreateMachineResult, 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.