suspendresume

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package suspendresume provides functionality to suspend and resume servers that have been provisioned by the OpenStack Compute service.

Example to Suspend and Resume a Server

serverID := "47b6b7b7-568d-40e4-868c-d5c41735532e"

err := suspendresume.Suspend(computeClient, serverID).ExtractErr()
if err != nil {
	panic(err)
}

err := suspendresume.Resume(computeClient, serverID).ExtractErr()
if err != nil {
	panic(err)
}

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SuspendResult

type SuspendResult struct {
	gophercloud.ErrResult
}

SuspendResult is the response from a Suspend operation. Call its ExtractErr method to determine if the request succeeded or failed.

func Suspend

func Suspend(client *gophercloud.ServiceClient, id string) (r SuspendResult)

Suspend is the operation responsible for suspending a Compute server.

type UnsuspendResult

type UnsuspendResult struct {
	gophercloud.ErrResult
}

UnsuspendResult is the response from an Unsuspend operation. Call its ExtractErr method to determine if the request succeeded or failed.

func Resume

func Resume(client *gophercloud.ServiceClient, id string) (r UnsuspendResult)

Resume is the operation responsible for resuming a Compute server.

Directories

Path Synopsis
suspendresume unit tests
suspendresume unit tests

Jump to

Keyboard shortcuts

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