mirror of
https://github.com/hansjone/netx.git
synced 2026-10-15 02:33:23 +08:00
Add NE capability descriptors and native async exec jobs for agents.
Expose recommended_mode/hints on getManagedNe, support background exec-jobs with getNeExecJob in MCP, and allow linux_shell on MikroTik as well as Linux. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
c6a98e2526
commit
8bdaaaacbf
20 changed files with 928 additions and 88 deletions
|
|
@ -35,7 +35,7 @@ from .ne_service_common import (
|
|||
)
|
||||
from .ne_exec_guard import (
|
||||
EXEC_POLICY_READONLY,
|
||||
is_linux_device_type,
|
||||
allows_open_exec_policy,
|
||||
require_exec_policy_writable,
|
||||
)
|
||||
|
||||
|
|
@ -173,8 +173,8 @@ def update_managed_ne(db: Session, ne_id: str, body: ManagedNeUpdate) -> Managed
|
|||
str(data["exec_policy"]),
|
||||
device_type=row.device_type,
|
||||
)
|
||||
elif "device_type" in data and not is_linux_device_type(row.device_type):
|
||||
# Leaving linux clears any previously open policy.
|
||||
elif "device_type" in data and not allows_open_exec_policy(row.device_type):
|
||||
# Leaving linux/mikrotik clears any previously open policy.
|
||||
row.exec_policy = EXEC_POLICY_READONLY
|
||||
if "password" in data and data["password"]:
|
||||
_require_crypto()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue