Documentation ¶
Index ¶
- type TestVM
- type TestVMInterface
- type VMInLibvirt
- func (v *VMInLibvirt) Delete() (err error)
- func (v *VMInLibvirt) Exists() (bool, error)
- func (v *VMInLibvirt) ForceDelete() (err error)
- func (v *VMInLibvirt) GetConsoleOutput() string
- func (v *VMInLibvirt) IsRunning() (exists bool, err error)
- func (v *VMInLibvirt) Run() error
- func (v *VMInLibvirt) RunAndWaitForSSH() error
- func (v *VMInLibvirt) Shutdown() (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TestVM ¶
type TestVM struct { TestDir string VMName string LibvirtUri string //linux only DiskImagePath string VMUser string //user to use when connecting to the VM CloudInitDir string NoCredentials bool CloudInitData bool SSHPassword string SSHPort int Cmd []string RemoveVm bool // contains filtered or unexported fields }
func (*TestVM) ParseCloudInit ¶
func (*TestVM) SSHCommand ¶
RunSSH runs a command over ssh or starts an interactive ssh connection if no command is provided
func (*TestVM) WaitForSSHToBeReady ¶
type TestVMInterface ¶
type TestVMInterface interface { Run() error ForceDelete() error Shutdown() error Delete() error IsRunning() (bool, error) WaitForSSHToBeReady() error RunAndWaitForSSH() error SSHCommand(inputArgs []string) *exec.Cmd RunSSH(inputArgs []string, stdin *bytes.Buffer) (*bytes.Buffer, error) Exists() (bool, error) GetConsoleOutput() string }
func StartAndWaitForSSH ¶
func StartAndWaitForSSH(params TestVM) (vm TestVMInterface, err error)
type VMInLibvirt ¶
type VMInLibvirt struct { TestVM // contains filtered or unexported fields }
func NewVM ¶
func NewVM(params TestVM) (vm *VMInLibvirt, err error)
func (*VMInLibvirt) Exists ¶
func (v *VMInLibvirt) Exists() (bool, error)
func (*VMInLibvirt) ForceDelete ¶
func (v *VMInLibvirt) ForceDelete() (err error)
ForceDelete stops and removes the VM
func (*VMInLibvirt) GetConsoleOutput ¶
func (v *VMInLibvirt) GetConsoleOutput() string
cummulatively read console output from the VM
func (*VMInLibvirt) IsRunning ¶
func (v *VMInLibvirt) IsRunning() (exists bool, err error)
func (*VMInLibvirt) Run ¶
func (v *VMInLibvirt) Run() error
func (*VMInLibvirt) RunAndWaitForSSH ¶
func (v *VMInLibvirt) RunAndWaitForSSH() error
Click to show internal directories.
Click to hide internal directories.