mirror of
https://github.com/hansjone/netx.git
synced 2026-10-09 03:10:46 +08:00
feat(ne): add managed NE read-only exec API
Add a guarded managed-ne exec endpoint for oclaw ops tools to login managed devices and run read-only CLI safely. Include request schema and unit tests for command guardrails and execution flow. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
dc17f9d15a
commit
981347b5b1
4 changed files with 208 additions and 1 deletions
|
|
@ -109,6 +109,14 @@ class ConnectTestRequest(BaseModel):
|
|||
ids: list[str] = Field(min_length=1)
|
||||
|
||||
|
||||
class ManagedNeExecRequest(BaseModel):
|
||||
"""Run read-only show/display CLI on a managed NE (oclaw ops integration)."""
|
||||
|
||||
ne_id: str
|
||||
commands: list[str] = Field(min_length=1, max_length=5)
|
||||
read_timeout_sec: int | None = Field(default=None, ge=10, le=120)
|
||||
|
||||
|
||||
class HopProxyConfig(BaseModel):
|
||||
"""Shared jump-host (proxy) settings applied to one or many NEs."""
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue