client

package
v0.0.0-...-4221c17 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2019 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Clouds            CloudService
	VirtualMachines   VirtualMachineService
	VirtualDiskDrives VirtualDiskDriveService
	VirtualHardDisks  VirtualHardDiskService
	VMTemplates       VMTemplateService
	Jobs              JobService
	// contains filtered or unexported fields
}

Client used to make calls the the spf vmm api

func NewClient

func NewClient(credentials NTLMCredentials, baseURL url.URL, stampID string) *Client

NewClient constructs a client object for communicating with the Service Provider Foundation (SPF)

type CloudService

type CloudService struct {
	getting.CloudGetter
}

CloudService service

func (*CloudService) GetByName

func (s *CloudService) GetByName(name string) (*getting.Cloud, error)

GetByName returns a cloud object given its name, returns an error if the name matches more that one or not found

type JobService

type JobService struct {
	getting.JobGetter
	updating.JobUpdater
}

JobService service

func (*JobService) WaitForJobToComplete

func (s *JobService) WaitForJobToComplete(id string, timeout int) error

WaitForJobToComplete blocks until the job is completed or the timeout in seconds expires

type NTLMCredentials

type NTLMCredentials struct {
	Username string
	Password string
	Domain   string
}

NTLMCredentials object

type VMTemplateService

type VMTemplateService struct {
	getting.VMTemplateGetter
}

VMTemplateService service

func (*VMTemplateService) GetByName

func (s *VMTemplateService) GetByName(name string) (*getting.VMTemplate, error)

GetByName returns a vm template object given its name, returns an error if the name matches more that one or not found

type VirtualDiskDriveService

VirtualDiskDriveService service

type VirtualHardDiskService

type VirtualHardDiskService struct {
	getting.VirtualHardDiskGetter
}

VirtualHardDiskService service

func (*VirtualHardDiskService) GetByName

GetByName returns a virtual hard disk object given its name, returns an error if the name matches more that one or not found

type VirtualMachineService

VirtualMachineService service

func (*VirtualMachineService) GetByName

func (s *VirtualMachineService) GetByName(name string) (*getting.VirtualMachine, error)

GetByName returns a virtual machine object given its name, returns an error if the name matches more that one VM or not found

func (*VirtualMachineService) Repair

func (s *VirtualMachineService) Repair(id string) error

Repair a virtual machine by its ID

func (*VirtualMachineService) Start

func (s *VirtualMachineService) Start(id string) error

Start a virtual machine by its ID

func (*VirtualMachineService) Stop

func (s *VirtualMachineService) Stop(id string) error

Stop a virtual machine by its ID

Jump to

Keyboard shortcuts

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