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- known_hosts : Any¶
- local_forwards : list[rt.LocalPortForward]¶
- remote_forwards : list[rt.RemotePortForward]¶
- socks_forwards : list[rt.SocksForward]¶
- 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- ssl : 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- to_runtime() SftpOptions¶
-
class otto.models.options.ScpOptionsSpec(*, preserve: bool =
False, recurse: bool =True, block_size: int =16384, extra: dict[str, Any] ={})¶ Bases:
OttoModel- 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- 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- port_strategy : NcPortStrategy¶
- listener_check : NcListenerCheck¶
-
class otto.models.options.SnmpOptionsSpec(*, oids: tuple[str, ...] =
(), community: str ='public', port: int =161, version: '1' | '2c' ='2c', address: str | None =None)¶ Bases:
OttoModel- version : Literal['1', '2c']¶
- to_runtime() SnmpOptions¶