agent

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2026 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPlannerAgent

func NewPlannerAgent(sourceID uuid.UUID, name string, idForTest string, svc PlannerService) (*plannerAgentLibvirt, error)

NewPlannerAgent creates a new libvirt-based planner agent instance

func WaitForDomainState

func WaitForDomainState(duration time.Duration, domain *libvirt.Domain, desiredState libvirt.DomainState) error

WaitForDomainState polls the libvirt domain state until the desired state is reached or a timeout occurs. It checks the state once every second.

Types

type AgentApi

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

AgentApi provides a client to interact with the Planner Agent API

func DefaultAgentApi

func DefaultAgentApi(agentApiBaseUrl string) *AgentApi

DefaultAgentApi creates an AgentApi client with a default HTTP client that skips TLS verification

func NewAgentApi

func NewAgentApi(agentApiBaseUrl string, customHttpClient *http.Client) *AgentApi

NewAgentApi creates an AgentApi client with a custom HTTP client, useful for test customization

func (*AgentApi) Info

func (api *AgentApi) Info() (string, error)

Info retrieves the agent's version string

func (*AgentApi) Inventory

func (api *AgentApi) Inventory() (*v1alpha1.Inventory, error)

Inventory retrieves the inventory data collected by the agent

func (*AgentApi) Login

func (api *AgentApi) Login(url string, user string, pass string) (*http.Response, error)

Login put the vCenter credentials

func (*AgentApi) Status

func (api *AgentApi) Status() (*coreAgent.StatusReply, error)

Status retrieves the current status of the agent

type PlannerAgent

type PlannerAgent interface {
	DumpLogs(string)
	GetIp() (string, error)
	IsServiceRunning(string, string) bool
	Run() error
	Restart() error
	Remove() error
}

PlannerAgent defines the interface for interacting with a planner agent instance

Jump to

Keyboard shortcuts

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