mirror of
https://github.com/hansjone/netx.git
synced 2026-10-09 03:10:46 +08:00
Fix ZTE BGP RR *i/RD parsing and add batch collect detail UX.
Decouple heavy CLI parse via ParsePool, keep ECMP/multi-RD keys, and expose per-command CLI lines vs DB rows with raw.txt export. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
4c5738e48e
commit
05357e971e
31 changed files with 1952 additions and 269 deletions
|
|
@ -49,6 +49,19 @@ class PortMapSubifTests(unittest.TestCase):
|
|||
self.assertEqual(resolve_mapped_iface("gei-0/0/0/1.100", pmap), "xgei-0/1/0/1.100")
|
||||
self.assertEqual(resolve_mapped_iface("gei-0/0/0/2.100", pmap), "gei-0/0/0/2.100")
|
||||
|
||||
def test_qinq_multi_level_parent(self) -> None:
|
||||
"""QinQ a.b.c: map parent a.b or a, keep remaining suffix."""
|
||||
pmap = {"gei-0/1/0/1": "xgei-0/2/0/1"}
|
||||
self.assertEqual(
|
||||
resolve_mapped_iface("gei-0/1/0/1.100.200", pmap),
|
||||
"xgei-0/2/0/1.100.200",
|
||||
)
|
||||
pmap2 = {"gei-0/1/0/1.100": "xgei-0/2/0/1.100"}
|
||||
self.assertEqual(
|
||||
resolve_mapped_iface("gei-0/1/0/1.100.200", pmap2),
|
||||
"xgei-0/2/0/1.100.200",
|
||||
)
|
||||
|
||||
def test_apply_port_map_row(self) -> None:
|
||||
row = apply_port_map(
|
||||
{"interface": "gei-0/0/0/1.55", "admin": "up"},
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue