Add paloalto_panos show lldp neighbors all#2325
Open
julmanglano wants to merge 2 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ISSUE TYPE
COMPONENT
paloalto_panos_show_lldp_neighbors_allSUMMARY
New template for
show lldp neighbors allon PAN-OS firewalls. 18 captured fields covering both local-side and neighbor-side LLDP TLVs.Cross-vendor field naming — aligned with
docs/dev/data_model.mdand sibling LLDP-detail templates (cisco_ios,cisco_nxos,hp_procurve,aruba_aoscx):LOCAL_INTERFACE,NEIGHBOR_NAME,NEIGHBOR_INTERFACE,NEIGHBOR_INTERFACE_DESCRIPTION,NEIGHBOR_DESCRIPTION,CHASSIS_ID,MGMT_ADDRESS,CAPABILITIES,CAPABILITIES_SUPPORTEDINDEX,LOCAL_PORT_ID,NEIGHBOR_CHASSIS_TYPE,PORT_TYPE,TTL,MGMT_ADDRESS_TYPE,INTERFACE_NUMBER,INTERFACE_TYPE,OIDMulti-line System Description handling — HPE Comware platforms emit a 3-line
System description(model line + copyright). Handled via a dedicatedSysDescrstate, scoped so the continuation-swallow doesn't bleed into theStartstate. Exit signal isSystem capabilities:which carries no data, so no information is lost. Only the first (model+version) line is captured — matches the convention in sibling LLDP-detail templates that don't multi-line-capture either.Fixtures (two):
paloalto_panos_show_lldp_neighbors_all.raw— standard mix. Aruba CX neighbors with mgmt block, HP 2930M withLocally assignedport type and emptyoid, PAN-OS firewall neighbor without mgmt block, and an empty-fields record (peer not advertising Port description / System name / System description / capabilities).paloalto_panos_show_lldp_neighbors_all2.raw— exercises the Comware multi-line description path (HPE 10504), plus quoted port descriptions ("UPLINK_TO_FIREWALL-2") and HP J9726ALocally assignedrows.Other notes:
Required LOCAL_INTERFACEgates empty leading-record emission (standard pattern in sibling templates).Supported: O, P, B, R,) preserved as-is in capture.show_interface_hardwareandshow_running_nat-policy).Test output
```
$ poetry run pytest tests/test_structured_data_against_parsed_reference_files.py -k "paloalto_panos/show_lldp_neighbors_all" tests/test_capture_group.py tests/test_index_order.py tests/test_testcases_exists.py
...
====================== 3 passed, 4798 deselected in 0.57s ======================
$ poetry run pytest tests/test_capture_group.py tests/test_index_order.py tests/test_testcases_exists.py
...
============================= 2923 passed in 3.05s =============================
```