get_lldp_neighbors is identical apart from docstrings in napalm_openwrt/lldp_mixin.py:22 and napalm_tplink_jetstream/tplink_jetstream.py:680. netgear (netgear_smart.py:1035) is the same plus a mac key.
get_lldp_neighbors_detail is identical in lldp_mixin.py:111 and tplink_jetstream.py:753.
Parsing
The lldpctl -f keyvalue grouping loop in lldp_mixin.py:84–95 is a copy of napalm_linux/linux.py:599–609.
The detail label to NAPALM field mapping exists in netgear_smart.py:1163, procurve/parsers.py:482 and tplink_jetstream.py:780. The tplink copy, _parse_lldp_detail, has no caller.
Proposal: an LldpTableMixin with a _get_lldp_table() hook that returns rows. Concrete get_lldp_neighbors/get_lldp_neighbors_detail project them. Add pure helpers parse_lldpctl_keyvalue() and lldp_detail_from_pairs(), and delete the unused tplink parser. procurve's double read is part of this (NAPALM/napalm-hpe-aruba-procurve#6).
Prio P4.
From the NetOrk function index (NetOrk/netork#670); every location was checked against the current code. Paths are relative to each driver repo.
**Projecting rows into NAPALM dicts**
- `get_lldp_neighbors` is identical apart from docstrings in `napalm_openwrt/lldp_mixin.py`:22 and `napalm_tplink_jetstream/tplink_jetstream.py`:680. netgear (`netgear_smart.py`:1035) is the same plus a `mac` key.
- `get_lldp_neighbors_detail` is identical in `lldp_mixin.py`:111 and `tplink_jetstream.py`:753.
**Parsing**
- The `lldpctl -f keyvalue` grouping loop in `lldp_mixin.py`:84–95 is a copy of `napalm_linux/linux.py`:599–609.
- The detail label to NAPALM field mapping exists in `netgear_smart.py`:1163, `procurve/parsers.py`:482 and `tplink_jetstream.py`:780. The tplink copy, `_parse_lldp_detail`, has no caller.
**Proposal:** an `LldpTableMixin` with a `_get_lldp_table()` hook that returns rows. Concrete `get_lldp_neighbors`/`get_lldp_neighbors_detail` project them. Add pure helpers `parse_lldpctl_keyvalue()` and `lldp_detail_from_pairs()`, and delete the unused tplink parser. procurve's double read is part of this (NAPALM/napalm-hpe-aruba-procurve#6).
Prio P4.
From the NetOrk function index (NetOrk/netork#670); every location was checked against the current code. Paths are relative to each driver repo.
Re-homed by docs/STRUCTURE.md (NAPALM/napalm-device-types#37, NetOrk/netork#1105): the projection of LLDP rows into NAPALM's two shapes is agnostic and can stay here. The lldpctl -f keyvalue parser goes to napalm-unix (#35).
Re-homed by `docs/STRUCTURE.md` (NAPALM/napalm-device-types#37, NetOrk/netork#1105): the projection of LLDP rows into NAPALM's two shapes is agnostic and can stay here. The `lldpctl -f keyvalue` parser goes to napalm-unix (#35).
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Projecting rows into NAPALM dicts
get_lldp_neighborsis identical apart from docstrings innapalm_openwrt/lldp_mixin.py:22 andnapalm_tplink_jetstream/tplink_jetstream.py:680. netgear (netgear_smart.py:1035) is the same plus amackey.get_lldp_neighbors_detailis identical inlldp_mixin.py:111 andtplink_jetstream.py:753.Parsing
lldpctl -f keyvaluegrouping loop inlldp_mixin.py:84–95 is a copy ofnapalm_linux/linux.py:599–609.netgear_smart.py:1163,procurve/parsers.py:482 andtplink_jetstream.py:780. The tplink copy,_parse_lldp_detail, has no caller.Proposal: an
LldpTableMixinwith a_get_lldp_table()hook that returns rows. Concreteget_lldp_neighbors/get_lldp_neighbors_detailproject them. Add pure helpersparse_lldpctl_keyvalue()andlldp_detail_from_pairs(), and delete the unused tplink parser. procurve's double read is part of this (NAPALM/napalm-hpe-aruba-procurve#6).Prio P4.
From the NetOrk function index (NetOrk/netork#670); every location was checked against the current code. Paths are relative to each driver repo.
Re-homed by
docs/STRUCTURE.md(NAPALM/napalm-device-types#37, NetOrk/netork#1105): the projection of LLDP rows into NAPALM's two shapes is agnostic and can stay here. Thelldpctl -f keyvalueparser goes to napalm-unix (#35).