1
0
Fork 1
mirror of https://github.com/thatmattlove/hyperglass.git synced 2026-04-27 10:18:36 +00:00
thatmattlove-hyperglass/hyperglass/plugins/_builtin/bgp_route_ip_enrichment.py
Wilhelm Schonfeldt 9db9849a59
feat(structured): release structured feature set (squash merge)
Summary:
- Add structured traceroute support with comprehensive IP enrichment (ASN/org/RDNS).
- Improve MikroTik traceroute cleaning and aggregation; collapse repeated tables into a single representative table.
- Enhance traceroute logging for visibility and add traceroute-specific cleaning helpers.
- Add/adjust IP enrichment plugins and BGP/traceroute enrichment integrations.
- UI updates for traceroute output and path visualization; update docs and configuration for structured output.

This commit squashes changes from 'structured-dev' into a single release commit.
2025-09-30 16:46:01 +02:00

43 lines
1.1 KiB
Python

"""IP enrichment for structured BGP route data - show path functionality."""
# Standard Library
import typing as t
# Third Party
from pydantic import PrivateAttr
# Project
from hyperglass.log import log
from hyperglass.plugins._output import OutputPlugin
from hyperglass.models.data.bgp_route import BGPRouteTable
if t.TYPE_CHECKING:
from hyperglass.models.data import OutputDataModel
from hyperglass.models.api.query import Query
class ZBgpRouteIpEnrichment(OutputPlugin):
_hyperglass_builtin: bool = PrivateAttr(True)
platforms: t.Sequence[str] = (
"mikrotik_routeros",
"mikrotik_switchos",
"mikrotik",
"cisco_ios",
"juniper_junos",
"arista_eos",
"frr",
"huawei",
"huawei_vrpv8",
)
directives: t.Sequence[str] = ("bgp_route", "bgp_community")
common: bool = True
def process(self, *, output: "OutputDataModel", query: "Query") -> "OutputDataModel":
if not isinstance(output, BGPRouteTable):
return output
_log = log.bind(plugin=self.__class__.__name__)
return output