Scaffold vendor parser packages for cisco/huawei/h3c/juniper/nokia/ericsson.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
oliver 2026-09-17 21:46:21 +08:00
parent d587bf7bb9
commit 24a1a853af
19 changed files with 324 additions and 4 deletions

View file

@ -0,0 +1,21 @@
"""Huawei VRP parsers.
LLDP already works via ``common.lldp_neighbors`` (``display lldp neighbor``).
Stub modules (not registered until implemented)::
interface_brief.py arp.py isis_adjacency.py nd6_cache.py bgp_peer.py
When ready, import and add to ``PARSERS``.
"""
from __future__ import annotations
from typing import Any, Callable
NormalizeFn = Callable[..., list[dict[str, Any]]]
# Do not register stubs yet — they raise NotImplementedError.
PARSERS: dict[str, NormalizeFn] = {}
__all__ = ["PARSERS"]

View file

@ -0,0 +1,17 @@
"""Huawei: display arp all / display arp — TODO implement."""
from __future__ import annotations
from typing import Any
def normalize_arp(
*,
raw_text: str,
vendor: str = "",
device_type: str = "",
command: str = "",
params: dict[str, str] | None = None,
) -> list[dict[str, Any]]:
_ = (raw_text, vendor, device_type, command, params)
raise NotImplementedError("huawei arp parser not implemented yet")

View file

@ -0,0 +1,17 @@
"""Huawei: display bgp peer / display bgp vpnv4 all peer — TODO implement."""
from __future__ import annotations
from typing import Any
def normalize_bgp_peer(
*,
raw_text: str,
vendor: str = "",
device_type: str = "",
command: str = "",
params: dict[str, str] | None = None,
) -> list[dict[str, Any]]:
_ = (raw_text, vendor, device_type, command, params)
raise NotImplementedError("huawei bgp_peer parser not implemented yet")

View file

@ -0,0 +1,17 @@
"""Huawei: display interface brief — TODO implement."""
from __future__ import annotations
from typing import Any
def normalize_interface_brief(
*,
raw_text: str,
vendor: str = "",
device_type: str = "",
command: str = "",
params: dict[str, str] | None = None,
) -> list[dict[str, Any]]:
_ = (raw_text, vendor, device_type, command, params)
raise NotImplementedError("huawei interface_brief parser not implemented yet")

View file

@ -0,0 +1,17 @@
"""Huawei: display isis peer / display isis interface — TODO implement."""
from __future__ import annotations
from typing import Any
def normalize_isis_adjacency(
*,
raw_text: str,
vendor: str = "",
device_type: str = "",
command: str = "",
params: dict[str, str] | None = None,
) -> list[dict[str, Any]]:
_ = (raw_text, vendor, device_type, command, params)
raise NotImplementedError("huawei isis_adjacency parser not implemented yet")

View file

@ -0,0 +1,17 @@
"""Huawei: display ipv6 neighbors — TODO implement."""
from __future__ import annotations
from typing import Any
def normalize_nd6_cache(
*,
raw_text: str,
vendor: str = "",
device_type: str = "",
command: str = "",
params: dict[str, str] | None = None,
) -> list[dict[str, Any]]:
_ = (raw_text, vendor, device_type, command, params)
raise NotImplementedError("huawei nd6_cache parser not implemented yet")