cmdclient

package
v0.56.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2022 License: Apache-2.0 Imports: 25 Imported by: 23

Documentation

Index

Constants

View Source
const StandardInitLauncherSocketFileName = "launcher-init-sock"
View Source
const StandardLauncherSocketFileName = "launcher-sock"
View Source
const StandardLauncherUnresponsiveFileName = "launcher-unresponsive"

Variables

This section is empty.

Functions

func FindPodDirOnHost added in v0.30.6

func FindPodDirOnHost(vmi *v1.VirtualMachineInstance) (string, error)

gets the cmd socket for a VMI

func FindSocketOnHost added in v0.29.0

func FindSocketOnHost(vmi *v1.VirtualMachineInstance) (string, error)

gets the cmd socket for a VMI

func IsDisconnected

func IsDisconnected(err error) bool

func IsLegacySocket added in v0.29.0

func IsLegacySocket(socket string) bool

func IsSocketUnresponsive added in v0.29.0

func IsSocketUnresponsive(socket string) bool

func LegacySocketsDirectory added in v0.29.0

func LegacySocketsDirectory() string

func ListAllSockets

func ListAllSockets() ([]string, error)

func MarkSocketUnresponsive added in v0.29.0

func MarkSocketUnresponsive(socket string) error

func SetLegacyBaseDir added in v0.29.0

func SetLegacyBaseDir(baseDir string)

func SetPodsBaseDir added in v0.29.0

func SetPodsBaseDir(baseDir string)

func SocketDirectoryOnHost added in v0.29.0

func SocketDirectoryOnHost(podUID string) string

func SocketFilePathOnHost added in v0.29.0

func SocketFilePathOnHost(podUID string) string

func SocketMonitoringEnabled added in v0.29.0

func SocketMonitoringEnabled(socket string) bool

func SocketOnGuest added in v0.29.0

func SocketOnGuest() string

func UninitializedSocketOnGuest added in v0.30.6

func UninitializedSocketOnGuest() string

Types

type LauncherClient

type LauncherClient interface {
	SyncVirtualMachine(vmi *v1.VirtualMachineInstance, options *cmdv1.VirtualMachineOptions) error
	PauseVirtualMachine(vmi *v1.VirtualMachineInstance) error
	UnpauseVirtualMachine(vmi *v1.VirtualMachineInstance) error
	FreezeVirtualMachine(vmi *v1.VirtualMachineInstance, unfreezeTimeoutSeconds int32) error
	UnfreezeVirtualMachine(vmi *v1.VirtualMachineInstance) error
	SyncMigrationTarget(vmi *v1.VirtualMachineInstance, options *cmdv1.VirtualMachineOptions) error
	SoftRebootVirtualMachine(vmi *v1.VirtualMachineInstance) error
	SignalTargetPodCleanup(vmi *v1.VirtualMachineInstance) error
	ShutdownVirtualMachine(vmi *v1.VirtualMachineInstance) error
	KillVirtualMachine(vmi *v1.VirtualMachineInstance) error
	MigrateVirtualMachine(vmi *v1.VirtualMachineInstance, options *MigrationOptions) error
	CancelVirtualMachineMigration(vmi *v1.VirtualMachineInstance) error
	FinalizeVirtualMachineMigration(vmi *v1.VirtualMachineInstance) error
	HotplugHostDevices(vmi *v1.VirtualMachineInstance) error
	DeleteDomain(vmi *v1.VirtualMachineInstance) error
	GetDomain() (*api.Domain, bool, error)
	GetDomainStats() (*stats.DomainStats, bool, error)
	GetGuestInfo() (*v1.VirtualMachineInstanceGuestAgentInfo, error)
	GetUsers() (v1.VirtualMachineInstanceGuestOSUserList, error)
	GetFilesystems() (v1.VirtualMachineInstanceFileSystemList, error)
	Exec(string, string, []string, int32) (int, string, error)
	Ping() error
	GuestPing(string, int32) error
	Close()
	VirtualMachineMemoryDump(vmi *v1.VirtualMachineInstance, dumpPath string) error
}

func NewClient added in v0.17.0

func NewClient(socketPath string) (LauncherClient, error)

func NewClientWithInfoClient added in v0.17.0

func NewClientWithInfoClient(infoClient info.CmdInfoClient, conn *grpc.ClientConn) (LauncherClient, error)

type MigrationOptions added in v0.16.0

type MigrationOptions struct {
	Bandwidth               resource.Quantity
	ProgressTimeout         int64
	CompletionTimeoutPerGiB int64
	UnsafeMigration         bool
	AllowAutoConverge       bool
	AllowPostCopy           bool
}

type MockLauncherClient

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

Mock of LauncherClient interface

func NewMockLauncherClient

func NewMockLauncherClient(ctrl *gomock.Controller) *MockLauncherClient

func (*MockLauncherClient) CancelVirtualMachineMigration added in v0.16.0

func (_m *MockLauncherClient) CancelVirtualMachineMigration(vmi *v1.VirtualMachineInstance) error

func (*MockLauncherClient) Close

func (_m *MockLauncherClient) Close()

func (*MockLauncherClient) DeleteDomain added in v0.8.0

func (_m *MockLauncherClient) DeleteDomain(vmi *v1.VirtualMachineInstance) error

func (*MockLauncherClient) EXPECT

func (_m *MockLauncherClient) EXPECT() *_MockLauncherClientRecorder

func (*MockLauncherClient) Exec added in v0.43.0

func (_m *MockLauncherClient) Exec(_param0 string, _param1 string, _param2 []string, _param3 int32) (int, string, error)

func (*MockLauncherClient) FinalizeVirtualMachineMigration added in v0.40.0

func (_m *MockLauncherClient) FinalizeVirtualMachineMigration(vmi *v1.VirtualMachineInstance) error

func (*MockLauncherClient) FreezeVirtualMachine added in v0.44.1

func (_m *MockLauncherClient) FreezeVirtualMachine(vmi *v1.VirtualMachineInstance, unfreezeTimeoutSeconds int32) error

func (*MockLauncherClient) GetDomain

func (_m *MockLauncherClient) GetDomain() (*api.Domain, bool, error)

func (*MockLauncherClient) GetDomainStats added in v0.15.0

func (_m *MockLauncherClient) GetDomainStats() (*stats.DomainStats, bool, error)

func (*MockLauncherClient) GetFilesystems added in v0.28.0

func (*MockLauncherClient) GetGuestInfo added in v0.27.0

func (*MockLauncherClient) GetUsers added in v0.28.0

func (*MockLauncherClient) GuestPing added in v0.44.1

func (_m *MockLauncherClient) GuestPing(_param0 string, _param1 int32) error

func (*MockLauncherClient) HotplugHostDevices added in v0.50.0

func (_m *MockLauncherClient) HotplugHostDevices(vmi *v1.VirtualMachineInstance) error

func (*MockLauncherClient) KillVirtualMachine

func (_m *MockLauncherClient) KillVirtualMachine(vmi *v1.VirtualMachineInstance) error

func (*MockLauncherClient) MigrateVirtualMachine added in v0.9.2

func (_m *MockLauncherClient) MigrateVirtualMachine(vmi *v1.VirtualMachineInstance, options *MigrationOptions) error

func (*MockLauncherClient) PauseVirtualMachine added in v0.24.0

func (_m *MockLauncherClient) PauseVirtualMachine(vmi *v1.VirtualMachineInstance) error

func (*MockLauncherClient) Ping

func (_m *MockLauncherClient) Ping() error

func (*MockLauncherClient) ShutdownVirtualMachine

func (_m *MockLauncherClient) ShutdownVirtualMachine(vmi *v1.VirtualMachineInstance) error

func (*MockLauncherClient) SignalTargetPodCleanup added in v0.36.3

func (_m *MockLauncherClient) SignalTargetPodCleanup(vmi *v1.VirtualMachineInstance) error

func (*MockLauncherClient) SoftRebootVirtualMachine added in v0.48.0

func (_m *MockLauncherClient) SoftRebootVirtualMachine(vmi *v1.VirtualMachineInstance) error

func (*MockLauncherClient) SyncMigrationTarget added in v0.9.2

func (_m *MockLauncherClient) SyncMigrationTarget(vmi *v1.VirtualMachineInstance, options *v10.VirtualMachineOptions) error

func (*MockLauncherClient) SyncVirtualMachine

func (_m *MockLauncherClient) SyncVirtualMachine(vmi *v1.VirtualMachineInstance, options *v10.VirtualMachineOptions) error

func (*MockLauncherClient) UnfreezeVirtualMachine added in v0.44.1

func (_m *MockLauncherClient) UnfreezeVirtualMachine(vmi *v1.VirtualMachineInstance) error

func (*MockLauncherClient) UnpauseVirtualMachine added in v0.24.0

func (_m *MockLauncherClient) UnpauseVirtualMachine(vmi *v1.VirtualMachineInstance) error

func (*MockLauncherClient) VirtualMachineMemoryDump added in v0.54.0

func (_m *MockLauncherClient) VirtualMachineMemoryDump(vmi *v1.VirtualMachineInstance, dumpPath string) error

type VirtLauncherClient

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

func (*VirtLauncherClient) CancelVirtualMachineMigration added in v0.16.0

func (c *VirtLauncherClient) CancelVirtualMachineMigration(vmi *v1.VirtualMachineInstance) error

func (*VirtLauncherClient) Close

func (c *VirtLauncherClient) Close()

func (*VirtLauncherClient) DeleteDomain added in v0.8.0

func (c *VirtLauncherClient) DeleteDomain(vmi *v1.VirtualMachineInstance) error

func (*VirtLauncherClient) Exec added in v0.43.0

func (c *VirtLauncherClient) Exec(domainName, command string, args []string, timeoutSeconds int32) (int, string, error)

Exec the command with args on the guest and return the resulting status code, stdOut and error

func (*VirtLauncherClient) FinalizeVirtualMachineMigration added in v0.40.0

func (c *VirtLauncherClient) FinalizeVirtualMachineMigration(vmi *v1.VirtualMachineInstance) error

func (*VirtLauncherClient) FreezeVirtualMachine added in v0.44.1

func (c *VirtLauncherClient) FreezeVirtualMachine(vmi *v1.VirtualMachineInstance, unfreezeTimeoutSeconds int32) error

func (*VirtLauncherClient) GetDomain

func (c *VirtLauncherClient) GetDomain() (*api.Domain, bool, error)

func (*VirtLauncherClient) GetDomainStats added in v0.15.0

func (c *VirtLauncherClient) GetDomainStats() (*stats.DomainStats, bool, error)

func (*VirtLauncherClient) GetFilesystems added in v0.28.0

GetFilesystems returns the list of active filesystems on the guest machine

func (*VirtLauncherClient) GetGuestInfo added in v0.27.0

GetGuestInfo is a counterpart for virt-launcher call to gather guest agent data

func (*VirtLauncherClient) GetUsers added in v0.28.0

GetUsers returns the list of the active users on the guest machine

func (*VirtLauncherClient) GuestPing added in v0.44.1

func (c *VirtLauncherClient) GuestPing(domainName string, timeoutSeconds int32) error

func (*VirtLauncherClient) HotplugHostDevices added in v0.50.0

func (c *VirtLauncherClient) HotplugHostDevices(vmi *v1.VirtualMachineInstance) error

func (*VirtLauncherClient) KillVirtualMachine

func (c *VirtLauncherClient) KillVirtualMachine(vmi *v1.VirtualMachineInstance) error

func (*VirtLauncherClient) MigrateVirtualMachine added in v0.9.2

func (c *VirtLauncherClient) MigrateVirtualMachine(vmi *v1.VirtualMachineInstance, options *MigrationOptions) error

func (*VirtLauncherClient) PauseVirtualMachine added in v0.24.0

func (c *VirtLauncherClient) PauseVirtualMachine(vmi *v1.VirtualMachineInstance) error

func (*VirtLauncherClient) Ping

func (c *VirtLauncherClient) Ping() error

func (*VirtLauncherClient) ShutdownVirtualMachine

func (c *VirtLauncherClient) ShutdownVirtualMachine(vmi *v1.VirtualMachineInstance) error

func (*VirtLauncherClient) SignalTargetPodCleanup added in v0.36.3

func (c *VirtLauncherClient) SignalTargetPodCleanup(vmi *v1.VirtualMachineInstance) error

func (*VirtLauncherClient) SoftRebootVirtualMachine added in v0.48.0

func (c *VirtLauncherClient) SoftRebootVirtualMachine(vmi *v1.VirtualMachineInstance) error

func (*VirtLauncherClient) SyncMigrationTarget added in v0.9.2

func (c *VirtLauncherClient) SyncMigrationTarget(vmi *v1.VirtualMachineInstance, options *cmdv1.VirtualMachineOptions) error

func (*VirtLauncherClient) SyncVirtualMachine

func (c *VirtLauncherClient) SyncVirtualMachine(vmi *v1.VirtualMachineInstance, options *cmdv1.VirtualMachineOptions) error

func (*VirtLauncherClient) UnfreezeVirtualMachine added in v0.44.1

func (c *VirtLauncherClient) UnfreezeVirtualMachine(vmi *v1.VirtualMachineInstance) error

func (*VirtLauncherClient) UnpauseVirtualMachine added in v0.24.0

func (c *VirtLauncherClient) UnpauseVirtualMachine(vmi *v1.VirtualMachineInstance) error

func (*VirtLauncherClient) VirtualMachineMemoryDump added in v0.54.0

func (c *VirtLauncherClient) VirtualMachineMemoryDump(vmi *v1.VirtualMachineInstance, dumpPath string) error

Jump to

Keyboard shortcuts

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