mirror of
https://github.com/hansjone/netx.git
synced 2026-10-15 17:13:21 +08:00
Add ZTE BGP VRF summary aux FIB collect with optional all-VRF expand.
Wire config_vrf plus ipv4/ipv6 forwarding as aux for VPN VRF summaries, and allow unbound items to expand all AF-filtered VRFs at collect time. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
parent
78f7032d7b
commit
3576e4a69c
9 changed files with 390 additions and 18 deletions
|
|
@ -148,10 +148,25 @@ def discover_params(
|
|||
|
||||
candidates = []
|
||||
seen: set[str] = set()
|
||||
filt_field = ""
|
||||
filt_contains = ""
|
||||
if collect_profile_id:
|
||||
collect = get_profile(collect_profile_id)
|
||||
if collect:
|
||||
for ph in collect.placeholders:
|
||||
if placeholder and ph.name != placeholder:
|
||||
continue
|
||||
filt_field = str(ph.discover_filter_field or "").strip()
|
||||
filt_contains = str(ph.discover_filter_contains or "").strip().lower()
|
||||
break
|
||||
for rec in records:
|
||||
val = str(rec.get(value_field) or "").strip()
|
||||
if not val or val in seen:
|
||||
continue
|
||||
if filt_field and filt_contains:
|
||||
hay = str(rec.get(filt_field) or "").strip().lower()
|
||||
if filt_contains not in hay:
|
||||
continue
|
||||
seen.add(val)
|
||||
label = str(rec.get(label_field) or val).strip() or val
|
||||
candidates.append(
|
||||
|
|
@ -159,7 +174,7 @@ def discover_params(
|
|||
"value": val,
|
||||
"label": label,
|
||||
"rd": str(rec.get("rd") or ""),
|
||||
"protocols": str(rec.get("protocols") or ""),
|
||||
"protocols": str(rec.get("protocols") or rec.get("address_families") or ""),
|
||||
"extra": rec,
|
||||
}
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue