Overview
CommandResult is a Pydantic model that encapsulates the result of executing a command on a guest VM. It provides exit code, stdout, stderr, and convenience properties for checking command success.
Model Definition
Fields
int
Exit code of the executed command. A value of
0 indicates success, while non-zero values indicate errors.str
Standard output captured from the command execution. Contains all text written to stdout during command execution.
str
Standard error captured from the command execution. Contains all text written to stderr during command execution.
Properties
ok
bool
True if the command succeeded (exit_code is 0), False otherwise.output
str
The stdout with leading and trailing whitespace removed.
