mirror of
https://github.com/hansjone/netx.git
synced 2026-10-10 18:10:45 +08:00
Add biz_state monitoring with shared LLDP parse and batch collect.
Introduce ParseProfile-based business state tasks that reuse LLDP parsing for snapshot batches (separate from topology Fabric writes), with scheduler, export, and a Phase1 UI under network tasks. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
066158d2f7
commit
4fa1b9b4dc
27 changed files with 2487 additions and 1 deletions
35
netx_api/lldp_shared.py
Normal file
35
netx_api/lldp_shared.py
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
"""Shared LLDP parse API (template + TextFSM + normalize).
|
||||
|
||||
Topology discovery and biz_state monitoring both call this module.
|
||||
Downstream flows diverge: Fabric edges vs biz_state batches.
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from .topology_lldp import (
|
||||
STUB_PARSER_KEYS,
|
||||
VENDOR_LLDP_PROFILES,
|
||||
NeighborHit,
|
||||
VendorLldpProfile,
|
||||
can_discover_lldp,
|
||||
get_vendor_profile,
|
||||
lldp_command_for_vendor,
|
||||
parse_neighbor_output,
|
||||
parser_meta,
|
||||
pick_neighbor_command,
|
||||
resolve_vendor_key,
|
||||
)
|
||||
|
||||
__all__ = [
|
||||
"NeighborHit",
|
||||
"VendorLldpProfile",
|
||||
"VENDOR_LLDP_PROFILES",
|
||||
"STUB_PARSER_KEYS",
|
||||
"resolve_vendor_key",
|
||||
"get_vendor_profile",
|
||||
"lldp_command_for_vendor",
|
||||
"pick_neighbor_command",
|
||||
"can_discover_lldp",
|
||||
"parser_meta",
|
||||
"parse_neighbor_output",
|
||||
]
|
||||
Loading…
Add table
Add a link
Reference in a new issue