runner

package
v0.0.0-...-aa71c40 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrAllDevicesBusy = errors.New("no available devices found, possible runners but busy")
View Source
var ErrAllDevicesBusyTimeout = errors.New("timed out waiting for devices to become available")
View Source
var ErrNoDevices = errors.New("no suitable devices were found")

basic errors

Functions

func RunScript

func RunScript(device_id, driver, yaml_file string, disableCleanup bool) error

Types

type CommentStep

type CommentStep string

type ExpectStep

type ExpectStep struct {
	This         string `yaml:"this"`
	Fatal        string `yaml:"fatal"`
	Echo         bool   `default:"true" yaml:"echo"`
	DebugEscapes bool   `default:"false" yaml:"debug_escapes"`
	Timeout      uint   `yaml:"timeout"`
}

func (*ExpectStep) UnmarshalYAML

func (e *ExpectStep) UnmarshalYAML(unmarshal func(interface{}) error) error

type JumpstarterScript

type JumpstarterScript struct {
	Name          string            `yaml:"name"`
	Selector      []string          `yaml:"selector"`
	Timeout       uint              `default:"1800" yaml:"timeout"`
	Drivers       []string          `yaml:"drivers"`
	ExpectTimeout uint              `default:"120" yaml:"expect-timeout"`
	Steps         []JumpstarterStep `yaml:"steps"`
	Cleanup       []JumpstarterStep `yaml:"cleanup"`
}

func (*JumpstarterScript) UnmarshalYAML

func (e *JumpstarterScript) UnmarshalYAML(unmarshal func(interface{}) error) error

type JumpstarterStep

type JumpstarterStep struct {
	// name of the task
	Name                  string                     `yaml:"name"`
	SetDiskImage          *SetDiskImageStep          `yaml:"set-disk-image,omitempty"`
	Expect                *ExpectStep                `yaml:"expect,omitempty"`
	Send                  *SendStep                  `yaml:"send,omitempty"`
	Storage               *StorageStep               `yaml:"storage,omitempty"`
	Power                 *PowerStep                 `yaml:"power,omitempty"`
	Reset                 *ResetStep                 `yaml:"reset,omitempty"`
	Pause                 *PauseStep                 `yaml:"pause,omitempty"`
	Comment               *CommentStep               `yaml:"comment,omitempty"`
	WriteAnsibleInventory *WriteAnsibleInventoryStep `yaml:"write-ansible-inventory,omitempty"`
	LocalShell            *LocalShellStep            `yaml:"local-shell,omitempty"`
	// contains filtered or unexported fields
}

type LocalShellStep

type LocalShellStep struct {
	Script string `yaml:"script"`
}

type PauseStep

type PauseStep uint

type PowerStep

type PowerStep string

type ResetStep

type ResetStep struct {
	TimeMs uint `yaml:"time_ms"`
}

type SendStep

type SendStep struct {
	This         []string `yaml:"this"`
	DelayMs      uint     `default:"100" yaml:"delay_ms"`
	Echo         bool     `default:"true" yaml:"echo"`
	DebugEscapes bool     `default:"false" yaml:"debug_escapes"`
}

func (*SendStep) UnmarshalYAML

func (s *SendStep) UnmarshalYAML(unmarshal func(interface{}) error) error

type SetDiskImageStep

type SetDiskImageStep struct {
	Image         string `yaml:"image"`
	AttachStorage bool   `yaml:"attach_storage"`
	OffsetGB      uint   `yaml:"offset-gb"`
}

type StepResult

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

type StorageStep

type StorageStep string

type TaskStatus

type TaskStatus int

a type enum with changed, ok, error

const (
	Done TaskStatus = iota
	SilentOk
	Fatal
)

type WriteAnsibleInventoryStep

type WriteAnsibleInventoryStep struct {
	Filename string `default:"inventory" yaml:"filename"`
	User     string `default:"root" yaml:"user"`
	SshKey   string `yaml:"ssh_key"`
}

func (*WriteAnsibleInventoryStep) UnmarshalYAML

func (e *WriteAnsibleInventoryStep) UnmarshalYAML(unmarshal func(interface{}) error) error

Jump to

Keyboard shortcuts

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