mirror of
https://github.com/hansjone/netx.git
synced 2026-10-09 03:10:46 +08:00
Add UME-managed NE sync and batch account tools.
Sync UME inventory into managed NE with source-aware dedupe and cleanup, add one-click account updates for selected or tagged NEs, and expose the new managed NE actions in the web UI while keeping bulk bastion flows compatible with optional target passwords. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
775989cad4
commit
572b0cfd9d
11 changed files with 480 additions and 19 deletions
|
|
@ -129,7 +129,7 @@ class HopProxyConfig(BaseModel):
|
|||
hop_port: int = 22
|
||||
hop_protocol: str = "ssh"
|
||||
hop_username: str
|
||||
hop_password: str
|
||||
hop_password: str = ""
|
||||
hop_command_template: str = ""
|
||||
hop_vrf: str = ""
|
||||
hop_target_auth_mode: str = "bastion_managed"
|
||||
|
|
@ -140,6 +140,16 @@ class BatchHopApplyRequest(BaseModel):
|
|||
hop: HopProxyConfig
|
||||
|
||||
|
||||
class BatchAccountConfig(BaseModel):
|
||||
username: str = ""
|
||||
password: str = ""
|
||||
|
||||
|
||||
class BatchAccountApplyRequest(BaseModel):
|
||||
ids: list[str] = Field(min_length=1)
|
||||
account: BatchAccountConfig
|
||||
|
||||
|
||||
class ImportFailure(BaseModel):
|
||||
row: int
|
||||
reason: str
|
||||
|
|
@ -149,3 +159,14 @@ class ImportResult(BaseModel):
|
|||
inserted: int
|
||||
updated: int
|
||||
failed: list[ImportFailure]
|
||||
|
||||
|
||||
class UmeManagedSyncResult(BaseModel):
|
||||
inserted: int
|
||||
updated: int
|
||||
deleted: int
|
||||
total_inventory: int
|
||||
|
||||
|
||||
class UmeManagedDeleteResult(BaseModel):
|
||||
deleted: int
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue