evacuate

package
Version: v0.0.0-...-ae37572 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 6, 2020 License: Apache-2.0 Imports: 1 Imported by: 0

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"`

	// Indicates whether server is on shared storage
	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

type EvacuateOptsBuilder interface {
	ToEvacuateMap() (map[string]interface{}, error)
}

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)

Directories

Path Synopsis
compute_extensions_evacuate_v2
compute_extensions_evacuate_v2

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL