mirror of
https://github.com/hansjone/netx.git
synced 2026-10-09 05:30:46 +08:00
Harden ZTE biz-state parsers and default | one-line collect CLIs.
Append secondary IPs with M/S tags, skip ND6 clock banners, split optical power vs thresholds including QSFP lanes, broaden static-route egress ifnames, and add | one-line to ZTE collect templates except interface detail. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
d900aca633
commit
ac4f115ee8
13 changed files with 373 additions and 109 deletions
|
|
@ -107,12 +107,17 @@ class ZteConfigRealDumpTests(unittest.TestCase):
|
|||
if m:
|
||||
block_vrf = m.group(1)
|
||||
continue
|
||||
m = re.match(r"(?i)^\s*ip\s+address\s+(\S+)(?:\s+(\S+))?\s*$", line)
|
||||
m = re.match(
|
||||
r"(?i)^\s*ip\s+address\s+(\S+)(?:\s+(\S+))?(?:\s+secondary)?\s*$",
|
||||
line,
|
||||
)
|
||||
if m:
|
||||
a, mask = m.group(1), m.group(2) or ""
|
||||
if mask.lower() == "secondary":
|
||||
mask = ""
|
||||
block_ips.append(f"{a}/{mask}" if mask else a)
|
||||
continue
|
||||
m = re.match(r"(?i)^\s*ipv6\s+address\s+(\S+)\s*$", line)
|
||||
m = re.match(r"(?i)^\s*ipv6\s+address\s+(\S+)(?:\s+secondary)?\s*$", line)
|
||||
if m:
|
||||
block_ip6s.append(m.group(1))
|
||||
continue
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue