mirror of
https://github.com/hansjone/netx.git
synced 2026-10-11 09:10:50 +08:00
Improve UME ops triage APIs and slim fabric path payloads.
Add severity/time filters, exclude missing hosts from aggregates, and default topology paths to compact summary fields for MCP-friendly alarm triage. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
753740d64e
commit
78d174232d
6 changed files with 505 additions and 50 deletions
|
|
@ -2547,9 +2547,24 @@ Management Addresses:
|
|||
max_hops=6,
|
||||
)
|
||||
self.assertEqual(out["path_count"], 2)
|
||||
self.assertEqual(out["detail"], "summary")
|
||||
self.assertEqual(out["paths"][0]["hops"], 1)
|
||||
self.assertEqual(out["paths"][1]["hops"], 2)
|
||||
self.assertEqual(len(out["paths"][0]["nodes"]), 2)
|
||||
self.assertNotIn("attrs", out["paths"][0]["nodes"][0])
|
||||
self.assertIn("label", out["paths"][0])
|
||||
self.assertIn("gi0/0", out["paths"][0]["label"].lower())
|
||||
|
||||
full = svc.find_fabric_paths(
|
||||
self.db,
|
||||
from_managed_ne_id=nes[0].id,
|
||||
to_managed_ne_id=nes[1].id,
|
||||
max_paths=1,
|
||||
max_hops=6,
|
||||
detail="full",
|
||||
)
|
||||
self.assertEqual(full["detail"], "full")
|
||||
self.assertIn("attrs", full["paths"][0]["nodes"][0])
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue