resetstate

package
v0.0.0-...-1fd1e9e Latest Latest
Warning

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

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

Documentation

Overview

Package resetstate provides functionality to reset the state of a server that has been provisioned by the OpenStack Compute service.

Example to Reset a Server

serverID := "47b6b7b7-568d-40e4-868c-d5c41735532e"
err := resetstate.ResetState(client, id, resetstate.StateActive).ExtractErr()
if err != nil {
	panic(err)
}

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ResetResult

type ResetResult struct {
	gophercloud.ErrResult
}

ResetResult is the response of a ResetState operation. Call its ExtractErr method to determine if the request suceeded or failed.

func ResetState

func ResetState(client *gophercloud.ServiceClient, id string, state ServerState) (r ResetResult)

ResetState will reset the state of a server

type ServerState

type ServerState string

ServerState refers to the states usable in ResetState Action

const (
	// StateActive returns the state of the server as active
	StateActive ServerState = "active"

	// StateError returns the state of the server as error
	StateError ServerState = "error"
)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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