getservers

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: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GetServerResponse

type GetServerResponse 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"`
}

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

type GetServersInput

type GetServersInput struct {
	// Ids of the instance of which the data has to be fetched
	InstanceIds []string `json:"instanceids"`

	// Ids of the network from which the details of VM's has to be fetched. (make sure you pass either of them and not both)
	VpcIds []string `json:"vpcids"`

	// Ids of subnetwork from which the details of VM's has to be fetched.
	SubnetIds []string `json:"subnetids"`

	Cloud cmn.Cloud
}

GetServersInput actually implements GetAllServers and GetServersDetails it holds the data for fetching server.

func New

func New() *GetServersInput

New returns the new GetServersInput instance with empty values

func (*GetServersInput) GetAllServers

func (serv *GetServersInput) GetAllServers() ([]GetServerResponse, error)

GetAllServers will fetch the details of all servers across the cloud appropriate user and his cloud profile details which was passed while calling it.

func (*GetServersInput) GetServersDetails

func (serv *GetServersInput) GetServersDetails() (GetServerResponse, error)

GetServersDetails will fetch the details of servers with the instructions passed to it appropriate user and his cloud profile details which was passed while calling it.

Jump to

Keyboard shortcuts

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