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
Exit code of the executed command. A value of
0 indicates success, while non-zero values indicate errors.Standard output captured from the command execution. Contains all text written to stdout during command execution.
Standard error captured from the command execution. Contains all text written to stderr during command execution.
Properties
ok
True if the command succeeded (exit_code is 0), False otherwise.output
The stdout with leading and trailing whitespace removed.
