mirror of
https://github.com/hansjone/netx.git
synced 2026-10-15 08:33:20 +08:00
Add ZTE l2vpn forwardinfo detail biz_state metric with TextFSM and compare sheet.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
155db4af63
commit
3414137daa
8 changed files with 412 additions and 2 deletions
|
|
@ -375,6 +375,30 @@ _L2VPN_PW_FIELDS: list[FieldDef] = [
|
|||
FieldDef("vpn_owner", length=256, role="meta", display_name="VPNOwner"),
|
||||
]
|
||||
|
||||
_L2VPN_PW_DETAIL_FIELDS: list[FieldDef] = [
|
||||
FieldDef("pw_name", length=128, indexed=True, is_key=True, display_name="PW"),
|
||||
FieldDef("peer", length=64, indexed=True, is_key=True, display_name="Peer"),
|
||||
FieldDef("vcid", length=64, indexed=True, is_key=True, display_name="VCID"),
|
||||
FieldDef("vc_status", length=32, role="state", display_name="VC Status"),
|
||||
FieldDef("remote_status", length=32, role="state", display_name="Remote"),
|
||||
FieldDef("activation_status", length=32, role="state", display_name="Activation"),
|
||||
FieldDef("service_instance", length=256, role="meta", display_name="Service"),
|
||||
FieldDef("conn_mode", length=32, role="meta", display_name="Mode"),
|
||||
FieldDef("signaling", length=32, role="meta", display_name="Signaling"),
|
||||
FieldDef("vc_type", length=32, role="meta", display_name="VC Type"),
|
||||
FieldDef("control_word", length=32, role="meta", display_name="CW"),
|
||||
FieldDef("local_label", length=32, role="meta", display_name="Local Label"),
|
||||
FieldDef("remote_label", length=32, role="meta", display_name="Remote Label"),
|
||||
FieldDef("tunnel_dest", length=64, role="meta", display_name="Tunnel Dest"),
|
||||
FieldDef("related_if", length=128, is_interface=True, role="meta", display_name="Related IF"),
|
||||
FieldDef("frr_type", length=32, role="meta", display_name="FRR"),
|
||||
FieldDef("vccv_cc", length=64, role="meta", display_name="VCCV CC"),
|
||||
FieldDef("vccv_cv", length=64, role="meta", display_name="VCCV CV"),
|
||||
FieldDef("bandwidth", length=64, role="meta", display_name="Bandwidth"),
|
||||
FieldDef("create_time", length=64, role="meta", display_name="Create"),
|
||||
FieldDef("last_change", length=64, role="meta", display_name="Last Change"),
|
||||
]
|
||||
|
||||
_L2VPN_MAC_FIELDS: list[FieldDef] = [
|
||||
FieldDef("mac", length=64, indexed=True, is_key=True, display_name="MAC"),
|
||||
FieldDef("vpn", length=128, indexed=True, is_key=True, display_name="VPN"),
|
||||
|
|
@ -1085,15 +1109,31 @@ def _zte_status_profiles() -> list[ParseProfile]:
|
|||
parser_id="l2vpn_pw",
|
||||
title="L2VPN PW State",
|
||||
command_template="show l2vpn forwardinfo | one-line",
|
||||
match=r"(?i)^\s*show\s+l2vpn\s+forwardinfo(?:\s*\|\s*one-line)?\s*$",
|
||||
match=r"(?i)^\s*show\s+l2vpn\s+forwardinfo(?!\s+detail)(?:\s*\|\s*one-line)?\s*$",
|
||||
textfsm_command="show l2vpn forwardinfo",
|
||||
description="L2VPN pseudowire forwardinfo state.",
|
||||
description="L2VPN pseudowire forwardinfo state (brief table).",
|
||||
fields=list(_L2VPN_PW_FIELDS),
|
||||
tags=["l2vpn", "pw", "status"],
|
||||
sort_order=470,
|
||||
enabled=True,
|
||||
kind="collect",
|
||||
),
|
||||
ParseProfile(
|
||||
profile_id="zte.l2vpn_pw_detail",
|
||||
vendor_key="zte",
|
||||
metric_id="l2vpn_pw_detail",
|
||||
parser_id="l2vpn_pw_detail",
|
||||
title="L2VPN PW Detail",
|
||||
command_template="show l2vpn forwardinfo detail",
|
||||
match=r"(?i)^\s*show\s+l2vpn\s+forwardinfo\s+detail(?:\s*\|.*)?\s*$",
|
||||
textfsm_command="show l2vpn forwardinfo detail",
|
||||
description="L2VPN PW forwardinfo detail (VPLS/VPWS block: VC/remote/activation).",
|
||||
fields=list(_L2VPN_PW_DETAIL_FIELDS),
|
||||
tags=["l2vpn", "pw", "status", "detail"],
|
||||
sort_order=475,
|
||||
enabled=True,
|
||||
kind="collect",
|
||||
),
|
||||
ParseProfile(
|
||||
profile_id="zte.l2vpn_mac",
|
||||
vendor_key="zte",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue