updateservers

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type UpdateServersInput

type UpdateServersInput struct {
	// Ids of the instances/vms which has to be updated
	InstanceIds []string `json:"instanceids"`

	// Action item that has to be performed on the VM
	Action string `json:"action"`

	Cloud cmn.Cloud
}

UpdateServersInput actually implements UpdateServers and it holds the data for updating server.

func New

func New() *UpdateServersInput

New returns the new UpdateServersInput instance with empty values

func (*UpdateServersInput) UpdateServers

func (serv *UpdateServersInput) UpdateServers() (UpdateServersResponse, error)

UpdateServers will update servers (start/stop, change ebs etc)

with the instructions passed to him and give back the response who called this.

Below method will take care of fetching details of appropriate user and his cloud profile details which was passed while calling it.

type UpdateServersResponse

type UpdateServersResponse struct {

	// Contains filtered/unfiltered response of AWS.
	AwsResponse []server.ServerResponse `json:"AwsResponse,omitempty"`

	// Contains filtered/unfiltered response of Azure.
	AzureResponse string `json:"AzureResponse,omitempty"`

	// Default response if no inputs or matching the values required.
	DefaultResponse string `json:"Response,omitempty"`
}

UpdateServersResponse will return the filtered/unfiltered responses of variuos clouds.

Jump to

Keyboard shortcuts

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