LocalProxmoxHostCommandExecutor

Executes bash commands directly on the local Proxmox VE host via BashCommand.

public sealed class LocalProxmoxHostCommandExecutor : IProxmoxHostCommandExecutor

1. Constructors

1.1. LocalProxmoxHostCommandExecutor(ILogger)

Initializes a new instance of the LocalProxmoxHostCommandExecutor class.

public LocalProxmoxHostCommandExecutor(ILogger logger)
Table 1. Parameters
Name Type Description

logger

ILogger

Logger every command is written to before it runs.

2. Methods

2.1. Run(string, TimeSpan)

Runs bashCommand on the target Proxmox host with a timeout.

public ProxmoxHostCommandResult Run(string bashCommand, TimeSpan timeout)
Table 2. Parameters
Name Type Description

bashCommand

string

Bash command line to execute.

timeout

TimeSpan

Maximum execution duration.

Returns: ProxmoxHostCommandResult — Command execution result.