vm

package
v1.13.0 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	HostsRemoveErr = errors.New("Error removing hosts")
	HostsAddErr    = errors.New("Error adding hosts")
)
View Source
var (
	VmNotFoundErr = errors.New("vm does not exist")
)

Functions

This section is empty.

Types

type HostsFileResolver

type HostsFileResolver struct {
	Hosts []string
	// contains filtered or unexported fields
}

func NewHostsFileResolver

func NewHostsFileResolver(hosts []string) *HostsFileResolver

func (*HostsFileResolver) AddHosts

func (h *HostsFileResolver) AddHosts(name string, ip string) error

TODO: remove Networkable interface

func (*HostsFileResolver) RemoveHosts

func (h *HostsFileResolver) RemoveHosts(name string) error

func (*HostsFileResolver) SudoersCommand

func (h *HostsFileResolver) SudoersCommand() []string

type HostsResolver

type HostsResolver interface {
	AddHosts(name string, ip string) error
	RemoveHosts(name string) error
}

func NewHostsResolver

func NewHostsResolver(resolverType string, hosts []string) (resolver HostsResolver, err error)

type Manager

type Manager interface {
	CreateInstance(name string) error
	DeleteInstance(name string) error
	InventoryPath() string
	StartInstance(name string) error
	StopInstance(name string) error
	OpenShell(name string, dir string, commandArgs []string) error
}

type MockVmManager

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

func NewMockManager

func NewMockManager(trellis *trellis.Trellis, ui cli.Ui) (manager *MockVmManager, err error)

func (*MockVmManager) CreateInstance

func (m *MockVmManager) CreateInstance(name string) error

func (*MockVmManager) DeleteInstance

func (m *MockVmManager) DeleteInstance(name string) error

func (*MockVmManager) InventoryPath

func (m *MockVmManager) InventoryPath() string

func (*MockVmManager) OpenShell

func (m *MockVmManager) OpenShell(name string, dir string, commandArgs []string) error

func (*MockVmManager) StartInstance

func (m *MockVmManager) StartInstance(name string) error

func (*MockVmManager) StopInstance

func (m *MockVmManager) StopInstance(name string) error

Jump to

Keyboard shortcuts

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