Skip to content

Add paloalto_panos show lldp neighbors all#2325

Open
julmanglano wants to merge 2 commits into
networktocode:masterfrom
julmanglano:pr/paloalto-panos-show-lldp-neighbors-all
Open

Add paloalto_panos show lldp neighbors all#2325
julmanglano wants to merge 2 commits into
networktocode:masterfrom
julmanglano:pr/paloalto-panos-show-lldp-neighbors-all

Conversation

@julmanglano

Copy link
Copy Markdown
Contributor
ISSUE TYPE
  • New Template Pull Request
COMPONENT

paloalto_panos_show_lldp_neighbors_all

SUMMARY

New template for show lldp neighbors all on 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.md and 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_SUPPORTED
  • PAN-OS-specific fields (no cross-vendor analog): INDEX, LOCAL_PORT_ID, NEIGHBOR_CHASSIS_TYPE, PORT_TYPE, TTL, MGMT_ADDRESS_TYPE, INTERFACE_NUMBER, INTERFACE_TYPE, OID

Multi-line System Description handling — HPE Comware platforms emit a 3-line System description (model line + copyright). Handled via a dedicated SysDescr state, scoped so the continuation-swallow doesn't bleed into the Start state. Exit signal is System 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 with Locally assigned port type and empty oid, 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 J9726A Locally assigned rows.

Other notes:

  • Required LOCAL_INTERFACE gates empty leading-record emission (standard pattern in sibling templates).
  • Trailing commas in capabilities (Supported: O, P, B, R,) preserved as-is in capture.
  • Index entry added in length-sorted + alphabetical order (length 31 — between show_interface_hardware and show_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 =============================
```

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant