mirror of
https://github.com/hansjone/netx.git
synced 2026-10-12 15:23:19 +08:00
Allow compare templates to split one collected metric into filtered sheets.
BGP/ISIS (and any other metric) can share a metric_id with distinct sheet_id + row_filters; drop conflicting bgp state_or_pfx and keep state/pfx_rcd. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
88b7558a48
commit
a65c9fc420
17 changed files with 745 additions and 230 deletions
|
|
@ -145,6 +145,12 @@ class ZteStatusParserTests(unittest.TestCase):
|
|||
conn = [r for r in rows if r["state"] == "Connect"]
|
||||
self.assertGreaterEqual(len(est), 3)
|
||||
self.assertGreaterEqual(len(conn), 3)
|
||||
self.assertTrue(all("state_or_pfx" not in r for r in rows))
|
||||
self.assertTrue(all(r["pfx_rcd"].isdigit() for r in est))
|
||||
self.assertTrue(all(r["pfx_rcd"] == "" for r in conn))
|
||||
one = next(r for r in rows if r["neighbor"] == "10.206.63.205")
|
||||
self.assertEqual(one["state"], "Established")
|
||||
self.assertEqual(one["pfx_rcd"], "642")
|
||||
|
||||
ipv4 = _section(self.log, "show bgp ipv4 unicast summary", ("show bgp vpnv6",))
|
||||
rows2 = normalize_bgp_peer(raw_text=ipv4, command="show bgp ipv4 unicast summary")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue