mirror of
https://github.com/hansjone/netx.git
synced 2026-10-09 00:50:46 +08:00
feat(ne-exec): make max CLI commands configurable and allow traceroute
Add NETX_NE_EXEC_MAX_COMMANDS (default 5, cap 50) and whitelist traceroute/tracert/trace/trace6 prefixes for lab/ops use. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
a6a5abc9ef
commit
88479245bb
9 changed files with 116 additions and 15 deletions
|
|
@ -117,7 +117,8 @@ class ManagedNeExecRequest(BaseModel):
|
|||
|
||||
ne_id: str | None = None
|
||||
ume_ne_id: str | None = None
|
||||
commands: list[str] = Field(min_length=1, max_length=5)
|
||||
# Absolute ceiling; runtime limit is settings.ne_exec_max_commands (default 5).
|
||||
commands: list[str] = Field(min_length=1, max_length=50)
|
||||
read_timeout_sec: int | None = Field(default=None, ge=10, le=120)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue