waft.system.clients.client_command module¶
- class waft.system.clients.client_command.ClientCommand(cmd_seq: list, cmd_input: str | list[str] | None = None)¶
Bases:
object
Command and optional interactive input response(s) to be executed on client system.
- input_stream(default: Any = False)¶
Return an initialized input stream or default value.
- Parameters:
default – Default (non-empty) input string or value to return in case of no input. Defaults to False.
- Returns:
initialized input stream or default value
- Return type:
Any
- string(with_sudo: bool = False) str ¶
Return command string to be executed, with or without sudo command removed.
- Parameters:
with_sudo (bool) – True to preserve sudo command, False to strip sudo command. Defaults to False.
- Returns:
Command string to be executed
- Return type:
str
- property use_sudo: bool¶
Return True if the command requires sudo.
- Returns:
True if the command requires sudo, False otherwise.
- Return type:
bool