mirror of
https://github.com/hansjone/oclaw.git
synced 2026-10-19 19:40:49 +08:00
Prefer hetero targets batch for multi-NE CLI instead of one-NE loops.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
42092423fb
commit
25d09d78ce
8 changed files with 63 additions and 20 deletions
|
|
@ -22,8 +22,12 @@ description: 面向 ops 专家的 netx 纳管网元(网元管理)作业手
|
|||
- **UME 清单(无需逐台纳管)**:`mcp__netx__listCliTargets`(`source=ume`)或 `queryUmeNeInventory` 取 `ne_id`,再用 `ume_ne_id` 执行 CLI(需先在 netx **UME → CLI 连接** 配置统一凭据/跳板)
|
||||
2. **登录查信息**
|
||||
- `mcp__netx__execManagedNe`:`ne_id` **或** `ume_ne_id` + `commands`(默认最多 5 条,可由 `NETX_NE_EXEC_MAX_COMMANDS` 调高,硬上限 50)
|
||||
- **多台同命令(推荐)**:一次调用传 `ne_ids` / `ume_ne_ids`(或 `targets`)+ 共享 `commands`,服务端并发执行(默认 concurrency=4,最多 20 台)。禁止对同一 show 命令逐台循环 `execManagedNe`
|
||||
- **一次会话内**:`listCliTargets` 最多调用一次,缓存返回的 id;多条 show 合并进同一次 `commands`,禁止「list→exec→list→exec」循环
|
||||
- **多台必须 batch-first(一次调用,服务端并发登录,默认 concurrency=4,最多 20 台)**:
|
||||
- **同命令**:`ne_ids` / `ume_ne_ids` + 共享 `commands`
|
||||
- **每台命令不同(厂商/角色不同)**:用 `targets=[{ume_ne_id|ne_id, commands:[…]}, …]` 一次提交;**不要**因为命令不同就退化成逐台 `execManagedNe`
|
||||
- 可按厂商拆成 1~2 次 batch(华为一批、Cisco 一批),仍远好于 N 次单台
|
||||
- **禁止**对多台排查逐台循环 `execManagedNe`(stdio 串行 + 重复登录)
|
||||
- **一次会话内**:`listCliTargets` 最多调用一次,缓存返回的 id;同台多条 show 合并进该台的 `commands[]`,禁止「list→exec→list→exec」循环
|
||||
- 超时:提高 `read_timeout_sec`(默认 60,慢命令 90–120)或减少命令条数,禁止对同一命令盲重试
|
||||
|
||||
## Field link recipes (WhatsApp EN)
|
||||
|
|
@ -49,9 +53,12 @@ Try in order; **one failure → switch command, do not retry the same spelling**
|
|||
|
||||
Cisco/Huawei: use `show interface transceiver` / `display optical-module` style allowlisted commands as applicable.
|
||||
|
||||
### Multi-NE same show
|
||||
### Multi-NE CLI (batch-first)
|
||||
|
||||
Prefer `execManagedNe(ume_ne_ids=[…], commands=[…])` once. Cap to the NEs on the asked path (usually 2).
|
||||
- **Same show on many NEs**: `execManagedNe(ume_ne_ids=[…], commands=[…])` once.
|
||||
- **Different commands per NE** (vendor / role): one call with
|
||||
`targets=[{ume_ne_id, commands:[…]}, {ume_ne_id, commands:[…]}, …]` — still concurrent on the server.
|
||||
- Cap to NEs on the asked path (usually 2–5). Never one-NE `execManagedNe` loops.
|
||||
|
||||
## CLI 约束(服务端强制)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue