machine

package
v0.57.0 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TempDir string

Functions

func Create

func Create(sshPort string)

func CreateDisk

func CreateDisk(imageName, size string) error

func Delete

func Delete()

func DetachCD

func DetachCD() error

func EventuallyConnects

func EventuallyConnects(t ...int)

func GatherAllLogs

func GatherAllLogs(services []string, logFiles []string)

GatherAllLogs will try to gather as much info from the system as possible, including services, dmesg and os related info.

func GatherLog

func GatherLog(logPath string)

GatherLog will try to scp the given log from the machine to a local file.

func HasDir

func HasDir(s string)

func Restart

func Restart() error

func SSHCommand

func SSHCommand(cmd string) (string, error)

func SSHDialTimeout

func SSHDialTimeout(network, addr string, config *ssh.ClientConfig, timeout time.Duration) (*ssh.Client, error)

func Screenshot

func Screenshot() (string, error)

func SendFile

func SendFile(src, dst, permission string) error

func Sudo

func Sudo(c string) (string, error)

Types

type Config

type Config struct {
	StateDir        string
	SSHPort         string
	ISO, DataSource string
	Drive           string
}
var SUT *Config

type Conn

type Conn struct {
	net.Conn
	ReadTimeout  time.Duration
	WriteTimeout time.Duration
}

func (*Conn) Read

func (c *Conn) Read(b []byte) (int, error)

func (*Conn) Write

func (c *Conn) Write(b []byte) (int, error)

type QEMU

type QEMU struct {
}

func (*QEMU) Alive

func (q *QEMU) Alive(m *Config) bool

func (*QEMU) Clean

func (q *QEMU) Clean(m *Config) error

func (*QEMU) Run

func (q *QEMU) Run(m *Config) error

func (*QEMU) Stop

func (q *QEMU) Stop(m *Config) error

Jump to

Keyboard shortcuts

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