mirror of
https://github.com/hansjone/netx.git
synced 2026-10-09 00:43:17 +08:00
Reorganize biz-state parsers by vendor folder and per-command modules.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
da6b159703
commit
d587bf7bb9
14 changed files with 473 additions and 434 deletions
|
|
@ -5,7 +5,8 @@ from __future__ import annotations
|
|||
import unittest
|
||||
from pathlib import Path
|
||||
|
||||
from netx_api.biz_state.parsers.zte_status import (
|
||||
from netx_api.biz_state.parsers.zte import (
|
||||
is_valid_arp_age,
|
||||
normalize_arp,
|
||||
normalize_bgp_peer,
|
||||
normalize_interface_brief,
|
||||
|
|
@ -95,7 +96,7 @@ class ZteStatusParserTests(unittest.TestCase):
|
|||
self.assertGreaterEqual(len(statics), 5)
|
||||
self.assertGreaterEqual(len(dynamics), 5)
|
||||
self.assertTrue(all(r["age"] == "H" or not r["age"][0].isdigit() for r in statics) or True)
|
||||
from netx_api.biz_state.parsers.zte_status import is_valid_arp_age
|
||||
from netx_api.biz_state.parsers.zte.arp import is_valid_arp_age
|
||||
|
||||
self.assertTrue(all(is_valid_arp_age(r["age"]) for r in dynamics))
|
||||
self.assertFalse(is_valid_arp_age("H"))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue