solusvm

package
v0.0.0-...-15aa78f Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2016 License: Apache-2.0 Imports: 15 Imported by: 1

Documentation

Index

Constants

View Source
const DEFAULT_CORES = 1
View Source
const DEFAULT_DISK = 10
View Source
const DEFAULT_NAME = "cloug"
View Source
const DEFAULT_RAM = 512

Variables

This section is empty.

Functions

func SolusVMFromJSON

func SolusVMFromJSON(jsonData []byte) (compute.Provider, error)

Types

type API

type API struct {
	Url      string
	ApiId    string
	ApiKey   string
	Insecure bool // InsecureSkipVerify true in tls.Config
}

func (*API) VmAddAddress

func (this *API) VmAddAddress(vmIdentification int) error

func (*API) VmConsole

func (this *API) VmConsole(vmIdentification int) (*APIVmConsoleResponse, error)

func (*API) VmCreate

func (this *API) VmCreate(virtType string, nodeGroup string, hostname string, imageIdentification string, memory int, diskspace int, cpu int) (int, string, error)

func (*API) VmDelete

func (this *API) VmDelete(vmIdentification int) error

func (*API) VmDiskSwap

func (this *API) VmDiskSwap(vmIdentification int) error

func (*API) VmHostname

func (this *API) VmHostname(vmIdentification int, hostname string) error

func (*API) VmInfo

func (this *API) VmInfo(vmIdentification int) (*APIVmInfoResponse, error)

func (*API) VmReboot

func (this *API) VmReboot(vmIdentification int) error

func (*API) VmReimage

func (this *API) VmReimage(vmIdentification int, imageIdentification string) error

func (*API) VmRemoveAddress

func (this *API) VmRemoveAddress(vmIdentification int, ip string) error

func (*API) VmResizeCpu

func (this *API) VmResizeCpu(vmIdentification int, cpu int) error

func (*API) VmResizeDisk

func (this *API) VmResizeDisk(vmIdentification int, hdd int) error

func (*API) VmResizeMemory

func (this *API) VmResizeMemory(vmIdentification int, memory int) error

func (*API) VmStart

func (this *API) VmStart(vmIdentification int) error

func (*API) VmStop

func (this *API) VmStop(vmIdentification int) error

func (*API) VmTunTap

func (this *API) VmTunTap(vmIdentification int, enable bool) error

func (*API) VmVnc

func (this *API) VmVnc(vmIdentification int) (*APIVmVncResponse, error)

type APIGenericResponse

type APIGenericResponse struct {
	XMLName xml.Name `xml:"root"`
	Status  string   `xml:"status"`
	Message string   `xml:"statusmsg"`
}

type APIVmConsoleResponse

type APIVmConsoleResponse struct {
	XMLName  xml.Name `xml:"root"`
	Ip       string   `xml:"consoleip"`
	Port     string   `xml:"consoleport"`
	Username string   `xml:"consoleusername"`
	Password string   `xml:"consolepassword"`
}

type APIVmCreateResponse

type APIVmCreateResponse struct {
	XMLName      xml.Name `xml:"root"`
	VmId         string   `xml:"vserverid"`
	RootPassword string   `xml:"rootpassword"`
}

type APIVmInfoResponse

type APIVmInfoResponse struct {
	XMLName     xml.Name `xml:"root"`
	Ip          string   `xml:"mainipaddress"`
	Ips         string   `xml:"ipaddresses"`
	InternalIps string   `xml:"internalips"`
	State       string   `xml:"state"`
	Bandwidth   string   `xml:"bandwidth"`
}

type APIVmVncResponse

type APIVmVncResponse struct {
	XMLName  xml.Name `xml:"root"`
	Ip       string   `xml:"vncip"`
	Port     string   `xml:"vncport"`
	Password string   `xml:"vncpassword"`
}

type SolusJSONConfig

type SolusJSONConfig struct {
	URL       string `json:"url"`
	ApiID     string `json:"api_id"`
	ApiKey    string `json:"api_key"`
	Insecure  bool   `json:"insecure"`
	VirtType  string `json:"virt_type"`
	NodeGroup string `json:"node_group"`
}

type SolusVM

type SolusVM struct {
	VirtType  string
	NodeGroup string
	Api       *API
}

func (*SolusVM) AddAddressToInstance

func (solus *SolusVM) AddAddressToInstance(instanceID string, address *compute.Address) error

func (*SolusVM) ComputeService

func (solus *SolusVM) ComputeService() compute.Service

func (*SolusVM) CreateInstance

func (solus *SolusVM) CreateInstance(instance *compute.Instance) (*compute.Instance, error)

func (*SolusVM) DeleteInstance

func (solus *SolusVM) DeleteInstance(instanceID string) error

func (*SolusVM) GetInstance

func (solus *SolusVM) GetInstance(instanceID string) (*compute.Instance, error)

func (*SolusVM) GetVNC

func (solus *SolusVM) GetVNC(instanceID string) (string, error)

func (*SolusVM) ListInstanceAddresses

func (solus *SolusVM) ListInstanceAddresses(instanceID string) ([]*compute.Address, error)

func (*SolusVM) ListInstances

func (solus *SolusVM) ListInstances() ([]*compute.Instance, error)

func (*SolusVM) RebootInstance

func (solus *SolusVM) RebootInstance(instanceID string) error

func (*SolusVM) ReimageInstance

func (solus *SolusVM) ReimageInstance(instanceID string, image *compute.Image) error

func (*SolusVM) RemoveAddressFromInstance

func (solus *SolusVM) RemoveAddressFromInstance(instanceID string, addressID string) error

func (*SolusVM) RenameInstance

func (solus *SolusVM) RenameInstance(instanceID string, name string) error

func (*SolusVM) ResizeInstance

func (solus *SolusVM) ResizeInstance(instanceID string, flavor *compute.Flavor) error

func (*SolusVM) SetAddressHostname

func (solus *SolusVM) SetAddressHostname(addressID string, hostname string) error

func (*SolusVM) StartInstance

func (solus *SolusVM) StartInstance(instanceID string) error

func (*SolusVM) StopInstance

func (solus *SolusVM) StopInstance(instanceID string) error

Jump to

Keyboard shortcuts

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