models.options

Boundary specs for the per-protocol *_options tables.

Each *OptionsSpec validates the JSON-serializable curated fields of its protocol and builds the matching runtime dataclass from otto.host.options via to_runtime(). The runtime dataclasses (which carry the library adapters, callables, and open extra dicts) are never modified here.

class otto.models.options.SshOptionsSpec(*, port: int = 22, known_hosts: Any = None, connect_timeout: float | None = None, keepalive_interval: float | None = None, keepalive_count_max: int | None = None, client_keys: list[str] | None = None, client_host_keys: list[str] | None = None, agent_forwarding: bool = False, preferred_auth: str | list[str] | None = None, encryption_algs: list[str] | None = None, server_host_key_algs: list[str] | None = None, compression_algs: list[str] | None = None, local_forwards: list[LocalPortForward] = [], remote_forwards: list[RemotePortForward] = [], socks_forwards: list[SocksForward] = [], extra: dict[str, Any] = {})

Bases: OttoModel

port : int
known_hosts : Any
connect_timeout : float | None
keepalive_interval : float | None
keepalive_count_max : int | None
client_keys : list[str] | None
client_host_keys : list[str] | None
agent_forwarding : bool
preferred_auth : str | list[str] | None
encryption_algs : list[str] | None
server_host_key_algs : list[str] | None
compression_algs : list[str] | None
local_forwards : list[rt.LocalPortForward]
remote_forwards : list[rt.RemotePortForward]
socks_forwards : list[rt.SocksForward]
extra : dict[str, Any]
to_runtime() SshOptions
class otto.models.options.FtpOptionsSpec(*, port: int = 21, encoding: str = 'utf-8', socket_timeout: float | None = None, connection_timeout: float | None = None, path_timeout: float | None = None, read_speed_limit: int | None = None, write_speed_limit: int | None = None, ssl: Any = None, passive_commands: tuple[str, ...] = ('epsv', 'pasv'), extra: dict[str, Any] = {})

Bases: OttoModel

port : int
encoding : str
socket_timeout : float | None
connection_timeout : float | None
path_timeout : float | None
read_speed_limit : int | None
write_speed_limit : int | None
ssl : Any
passive_commands : tuple[str, ...]
extra : dict[str, Any]
to_runtime() FtpOptions
class otto.models.options.SftpOptionsSpec(*, env: dict[str, str] | None = None, send_env: list[str] | None = None, extra: dict[str, Any] = {})

Bases: OttoModel

env : dict[str, str] | None
send_env : list[str] | None
extra : dict[str, Any]
to_runtime() SftpOptions
class otto.models.options.ScpOptionsSpec(*, preserve: bool = False, recurse: bool = True, block_size: int = 16384, extra: dict[str, Any] = {})

Bases: OttoModel

preserve : bool
recurse : bool
block_size : int
extra : dict[str, Any]
to_runtime() ScpOptions
class otto.models.options.TelnetOptionsSpec(*, port: int = 23, write_chunk_size: int = 0, write_chunk_delay: float = 0.0, cols: int = 400, rows: int = 24, encoding: str | bool = False, connect_timeout: float | None = None, echo_negotiation_timeout: float = 3.0, login_prompt: bytes = b':', login: bool = True, single_client_console: bool = False, auto_window_resize: bool = False, extra: dict[str, Any] = {})

Bases: OttoModel

port : int
write_chunk_size : int
write_chunk_delay : float
cols : int
rows : int
encoding : str | bool
connect_timeout : float | None
echo_negotiation_timeout : float
login_prompt : bytes
login : bool
single_client_console : bool
auto_window_resize : bool
extra : dict[str, Any]
to_runtime() TelnetOptions
class otto.models.options.NcOptionsSpec(*, exec_name: str = 'nc', port: int = 9000, port_strategy: 'auto' | 'ss' | 'netstat' | 'python' | 'proc' | 'custom' = 'auto', port_cmd: str | None = None, listener_check: 'auto' | 'ss' | 'netstat' | 'proc' | 'custom' = 'auto', listener_cmd: str | None = None, listener_timeout: float = 30.0)

Bases: OttoModel

exec_name : str
port : int
port_strategy : NcPortStrategy
port_cmd : str | None
listener_check : NcListenerCheck
listener_cmd : str | None
listener_timeout : float
to_runtime() NcOptions
class otto.models.options.SnmpOptionsSpec(*, oids: tuple[str, ...] = (), community: str = 'public', port: int = 161, version: '1' | '2c' = '2c', address: str | None = None)

Bases: OttoModel

oids : tuple[str, ...]
community : str
port : int
version : Literal['1', '2c']
address : str | None
to_runtime() SnmpOptions
class otto.models.options.TftpOptionsSpec(*, port: int = 69, server_ip: str | None = None, block_size: int = 512, timeout: float = 5.0)

Bases: OttoModel

port : int
server_ip : str | None
block_size : int
timeout : float
to_runtime() TftpOptions
otto.models.options.OPTION_SPEC_RUNTIME_PAIRS : list[tuple[type[OttoModel], type]]

Each boundary option spec paired with the runtime dataclass it builds. Drives the drift guard so the duplicated field lists cannot silently diverge.