adminactions

package
v0.0.0-...-2f2c61e Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package provides access to the "Admin Actions" of the Compute API, including migrations, live-migrations, reset-state, etc.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateBackup

func CreateBackup(client *gophercloud.ServiceClient, id string, opts CreateBackupOpts) gophercloud.ErrResult

ResetNetwork is the admin operation to create a backup of a Compute Server.

func InjectNetworkInfo

func InjectNetworkInfo(client *gophercloud.ServiceClient, id string) gophercloud.ErrResult

InjectNetworkInfo is the admin operation which injects network info into a Compute Server.

func LiveMigrate

ResetNetwork is the admin operation to reset the network on a Compute Server.

func Migrate

Migrate is the admin operation to migrate a Compute Server.

func ResetNetwork

func ResetNetwork(client *gophercloud.ServiceClient, id string) gophercloud.ErrResult

ResetNetwork is the admin operation to reset the network on a Compute Server.

func ResetState

func ResetState(client *gophercloud.ServiceClient, id string, state string) gophercloud.ErrResult

ResetState is the admin operation to reset the state of a server.

Types

type CreateBackupOpts

type CreateBackupOpts struct {
	// Name: required, name of the backup.
	Name string

	// BackupType: required, type of the backup, such as "daily".
	BackupType string

	// Rotation: the number of backups to retain.
	Rotation int
}

func (CreateBackupOpts) ToCreateBackupMap

func (opts CreateBackupOpts) ToCreateBackupMap() (map[string]interface{}, error)

ToBackupCreateMap assembles a request body based on the contents of a CreateOpts.

type LiveMigrateOpts

type LiveMigrateOpts struct {
	// Host: optional, If you omit this parameter, the scheduler chooses a host.
	Host string

	// BlockMigration:  defaults to false. Set to true to migrate local disks
	// by using block migration. If the source or destination host uses shared storage
	// and you set this value to true, the live migration fails.
	BlockMigration bool

	//DiskOverCommit: defaults to false. Set to true to enable over commit when the
	// destination host is checked for available disk space.
	DiskOverCommit bool
}

func (LiveMigrateOpts) ToLiveMigrateMap

func (opts LiveMigrateOpts) ToLiveMigrateMap() (map[string]interface{}, error)

ToServerCreateMap assembles a request body based on the contents of a CreateOpts.

Jump to

Keyboard shortcuts

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