console

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: May 1, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PromptExpression = `(\$ |\# )`
	CRLF             = "\r\n"
)

Variables

This section is empty.

Functions

func RetValue

func RetValue(retcode string) string

Types

type Expecter

type Expecter struct {
	// contains filtered or unexported fields
}

func NewExpecter

func NewExpecter(serialConsoleClient vmiSerialConsoleClient,
	vmiNamespace,
	vmiName string,
	opts ...expect.Option) Expecter

NewExpecter will connect to an already logged in VMI console and return the generated expecter it will wait `timeout` for the connection.

func (Expecter) GetGuestKernelArgs added in v0.3.0

func (e Expecter) GetGuestKernelArgs() (string, error)

func (Expecter) LoginToCentOSAsRoot added in v0.3.1

func (e Expecter) LoginToCentOSAsRoot(password string) error

func (Expecter) SafeExpectBatchWithResponse

func (e Expecter) SafeExpectBatchWithResponse(expected []expect.Batcher,
	timeout time.Duration) ([]expect.BatchRes, error)

SafeExpectBatchWithResponse runs the batch from `expected`, connecting to a VMI's console and waiting for the batch to return with a response until timeout. It validates that the commands arrive to the console. NOTE: This functions inherits limitations from `expectBatchWithValidatedSend`, refer to it for more information.

Jump to

Keyboard shortcuts

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