Documentation ¶
Overview ¶
Package evacuate provides functionality to evacuates servers that have been provisioned by the OpenStack Compute service from a failed host to a new host.
Example to Evacuate a Server from a Host
serverID := "b16ba811-199d-4ffd-8839-ba96c1185a67" err := evacuate.Evacuate(computeClient, serverID, evacuate.EvacuateOpts{}).ExtractErr() if err != nil { panic(err) }
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EvacuateOpts ¶
type EvacuateOpts struct { // The name of the host to which the server is evacuated Host string `json:"host,omitempty"` OnSharedStorage bool `json:"onSharedStorage"` // An administrative password to access the evacuated server AdminPass string `json:"adminPass,omitempty"` }
EvacuateOpts specifies Evacuate action parameters.
func (EvacuateOpts) ToEvacuateMap ¶
func (opts EvacuateOpts) ToEvacuateMap() (map[string]interface{}, error)
ToServerGroupCreateMap constructs a request body from CreateOpts.
type EvacuateOptsBuilder ¶
EvacuateOptsBuilder allows extensions to add additional parameters to the the Evacuate request.
type EvacuateResult ¶
type EvacuateResult struct {
gophercloud.Result
}
EvacuateResult is the response from an Evacuate operation. Call its ExtractAdminPass method to retrieve the admin password of the instance. The admin password will be an empty string if the cloud is not configured to inject admin passwords..
func Evacuate ¶
func Evacuate(client *gophercloud.ServiceClient, id string, opts EvacuateOptsBuilder) (r EvacuateResult)
Evacuate will Evacuate a failed instance to another host.
func (EvacuateResult) ExtractAdminPass ¶
func (r EvacuateResult) ExtractAdminPass() (string, error)