mirror of
https://github.com/hansjone/netxops.git
synced 2026-10-18 17:30:53 +08:00
Drop the local python -m netx_mcp / mcp-client path so terminal users only need API URL + token. Co-authored-by: Cursor <cursoragent@cursor.com>
4.1 KiB
4.1 KiB
| name | description |
|---|---|
| ops-netx-managed-ne-playbook | Netx Ops managed-NE playbook: device list, connect status, read-only CLI via SSH/Telnet (batch-first). Trigger: execManagedNe, show/display, optical, capacity A<>B. |
Ops Netx managed NE playbook
Scope
Load this skill whenever you must log into devices registered under netx managed NE (or UME CLI profiles) to run show/display/ping.
Differs from UME inventory (ops-netx-ume-playbook): this is SSH/Telnet (ZTE/Huawei/Cisco hops, Linux tunnels, bastion), not UME REST sync alone.
Tool order
Use netx__*.
- Locate
listManagedNe:keyword,connect_status=pass(preferred)getManagedNe: only forconnect_detail; managedne_idonly- Do not pass UME alarm UUIDs as managed
ne_id; on failure follow returnedhint - UME without per-device managed rows:
listCliTargets(source=ume)or inventory →execManagedNe(ume_ne_id=…)(requires netx UME → CLI profile)
- Execute
execManagedNe:ne_idorume_ne_id+commands(default max 5;NETX_NE_EXEC_MAX_COMMANDS, hard cap 50)- Multi-NE = batch-first (one tool call; server concurrency default 4, max 20):
- Same commands:
ne_ids/ume_ne_ids+ sharedcommands - Different commands per NE:
targets=[{ume_ne_id|ne_id, commands:[…]}, …]
- Same commands:
- Many single-NE calls in one turn are serial — forbidden for multi-NE work
- Per session: call
listCliTargetsat most once; merge shows into each target'scommands[] - Timeouts: raise
read_timeout_sec(default 60; slow 90–120) or fewer commands — no blind retry
Field link recipes
Capacity / optical between two names
User says capacity, bandwidth between A and B, optical power A <> B, or site pairs:
- Resolve nicknames → real
host_namevia inventory. - Interconnect:
findTopologyPathsand/or LLDP — both ports. - Optics on both ends with correct vendor command. Summarize interface, RX/TX, thresholds, link up.
- Do not answer with only UME bandwidth-usage or optical-threshold alarm tallies unless asked.
- Prefer one batch (
targetsif vendors differ).
Area optical-power alarm list (UME only)
Use UME keyword=optical power + hostname prefix — not this CLI recipe.
ZTE optical CLI
Try in order; one failure → switch command (do not retry same spelling):
| Prefer | Notes |
|---|---|
show opticalinfo brief |
Field-confirmed on many ZXR10 |
show optical brief |
Some EN platforms |
show opticalinfo brief | begin <if> |
After port known |
Cisco/Huawei: allowlisted show interface transceiver / display optical-module style.
Multi-NE examples
Same command, many NEs (one call):
{
"ume_ne_ids": ["uuid-a", "uuid-b", "uuid-c"],
"commands": ["show version"],
"read_timeout_sec": 60,
"concurrency": 4
}
Different commands (still one call):
{
"targets": [
{"ume_ne_id": "uuid-zte", "commands": ["show opticalinfo brief"]},
{"ume_ne_id": "uuid-hw", "commands": ["display optical-module brief"]},
{"ume_ne_id": "uuid-cisco", "commands": ["show interface transceiver"]}
],
"read_timeout_sec": 90
}
Wrong: N× single-NE execManagedNe in one turn (serial + budget burn).
CLI constraints (server-enforced)
- Allowed prefixes:
show,display,ping,ping6,traceroute,tracert,trace,trace6 - Pipes: whitelist filters only (
include/exclude/begin/…); noredirect/tee - Forbidden:
;, newlines, config/write/reload/delete - Examples:
show version,display current-configuration | include sysname,ping 192.168.0.1
Troubleshooting
connect_status=fail: readgetManagedNeconnect_detail— do not blind-exec.- Hop / bastion: verify
hop_enabled,hop_vendor, templates. - Timeout: raise
read_timeout_sec(max 120) or fewer commands.
Output
- Conclusion + tool output excerpts (never invent CLI).
- Prefer name/IP for users; keep
ne_idas correlation key only. - English sessions: no Chinese in user-visible prose (device output may be quoted as device text).