mockprovider

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2016 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type VM

type VM struct {
	MockGetSSH    func(options libssh.Options) (libssh.Client, error)
	MockDestroy   func() error
	MockHalt      func() error
	MockSuspend   func() error
	MockResume    func() error
	MockStart     func() error
	MockGetIPs    func() ([]net.IP, error)
	MockGetName   func() string
	MockGetState  func() (string, error)
	MockProvision func() error
}

VM represents a Mock VM wrapper.

func (*VM) Destroy

func (vm *VM) Destroy() error

Destroy powers off the VM and deletes its files from disk.

func (*VM) GetIPs

func (vm *VM) GetIPs() ([]net.IP, error)

GetIPs returns a list of ip addresses associated with the vm through VMware tools

func (*VM) GetName

func (vm *VM) GetName() string

GetName returns the name of the virtual machine

func (*VM) GetSSH

func (vm *VM) GetSSH(options libssh.Options) (libssh.Client, error)

GetSSH returns an ssh client for the the vm.

func (*VM) GetState

func (vm *VM) GetState() (string, error)

GetState gets the power state of the VM through VMware tools.

func (*VM) Halt

func (vm *VM) Halt() error

Halt powers off the VM without destroying it

func (*VM) Provision

func (vm *VM) Provision() error

Provision clones this VM and powers it on, while waiting for it to get an IP address.

func (*VM) Resume

func (vm *VM) Resume() error

Resume suspends the active state of the VM.

func (*VM) Start

func (vm *VM) Start() error

Start powers on the VM

func (*VM) Suspend

func (vm *VM) Suspend() error

Suspend suspends the active state of the VM.

Jump to

Keyboard shortcuts

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