feat(device-discovery): vrf discovery for aruba_aoscx, nokia_sros_ssh, cisco_viptela_ssh, paloalto_panos, paloalto_panos_ssh#455
Merged
Conversation
…, cisco_viptela_ssh, paloalto_panos, paloalto_panos_ssh
Third custom-driver batch implementing get_network_instances():
- aruba_aoscx: VRFs from the system/vrfs REST resource (with the EVPN
route distinguisher when the firmware exposes it); member interfaces
from each interface's vrf reference in system/interfaces — the same
resource the IP getter reads. The factory "default" VRF is the
global routing table.
- nokia_sros_ssh: VPRNs from "show service service-using vprn"
(ntc-template) plus one "show service id <id> interface" per
service. Members keyed by plain interface name to match this
driver's flat get_interfaces_ip() naming (the NETCONF sibling keys
them "<service>/<interface>" because its IP getter does). RD not
collected in this first pass — on the classic CLI it lives in
per-service BGP config, not the templated service views.
- cisco_viptela_ssh: SD-WAN VPN segments from the VPN column of the
same "show interface" rows the interface getters parse. Transport
VPN 0 is the underlay and maps to the DEFAULT_INSTANCE; service VPNs
and the management VPN 512 map to VRFs named by VPN number.
- paloalto_panos / paloalto_panos_ssh: virtual routers from the
forwarding field of each driver's existing interface command
("vr:<name>", or "logical-router:<name>" with Advanced Routing on
PAN-OS 10.2+). VSYS are never mapped. The factory "default" VR maps
to the DEFAULT_INSTANCE. Both transports emit identical envelopes
for the same topology. Limitation: enumeration is membership-derived,
so an interface-less VR does not appear.
Nine fixture scenarios; driver-pin matrix extended to eighteen drivers.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Coverage Report
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Contributor
There was a problem hiding this comment.
Pull request overview
Implements NAPALM get_network_instances() for VRF discovery across five additional custom drivers (Aruba AOS-CX, Nokia SR OS SSH, Cisco Viptela SSH, PAN-OS XML, PAN-OS SSH), emitting the OpenConfig-shaped payload consumed by options.discover_vrfs and extending fixtures/tests to pin behavior.
Changes:
- Added
get_network_instances()implementations foraruba_aoscx,nokia_sros_ssh,cisco_viptela_ssh,paloalto_panos, andpaloalto_panos_ssh. - Added/extended mock-data fixtures for the new VRF discovery behaviors (including edge cases like unnamed VPRNs and Advanced Routing logical routers).
- Updated the runner dispatch test matrix to assert these drivers now own a real
get_network_instances()implementation.
Reviewed changes
Copilot reviewed 29 out of 29 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| device-discovery/custom_napalm/aruba_aoscx.py | Adds VRF enumeration via REST (system/vrfs) and membership via interface VRF references. |
| device-discovery/custom_napalm/nokia_sros_ssh.py | Adds driver-local parsing of VPRN services + per-service interface membership, avoiding ntc-template failure modes. |
| device-discovery/custom_napalm/cisco_viptela_ssh.py | Adds VPN-segment → VRF mapping based on parsed show interface rows. |
| device-discovery/custom_napalm/paloalto_panos.py | Adds VRF discovery from XML API show interface all fwd field (vr/logical-router). |
| device-discovery/custom_napalm/paloalto_panos_ssh.py | Adds VRF discovery from show interface logical FORWARDING column (ntc-templates). |
| device-discovery/tests/test_runner_vrf_dispatch.py | Extends the “driver implements get_network_instances” pin set to include the five new drivers. |
| device-discovery/tests/custom_drivers/aruba_aoscx/mock_data/... | Adds AOS-CX VRF/interface REST fixtures + expected OC payloads. |
| device-discovery/tests/custom_drivers/nokia_sros_ssh/mock_data/... | Adds SR OS SSH fixtures for normal/unnamed/no-VPRN scenarios + expected payloads. |
| device-discovery/tests/custom_drivers/cisco_viptela_ssh/mock_data/... | Adds Viptela show interface fixtures + expected payloads. |
| device-discovery/tests/custom_drivers/paloalto_panos/mock_data/... | Adds PAN-OS XML show interface all fixtures + expected payloads. |
| device-discovery/tests/custom_drivers/paloalto_panos_ssh/mock_data/... | Adds PAN-OS SSH show interface logical fixtures + expected payloads. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
samiura
approved these changes
Jun 11, 2026
jajeffries
approved these changes
Jun 11, 2026
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.
Summary
Third custom-driver batch implementing
get_network_instances()for VRF discovery (follows #452 / #453 / #454). Five drivers across four transports, all returning the NAPALM OpenConfig shape consumed byoptions.discover_vrfs.Per driver
aruba_aoscxsystem/vrfs+ interfacevrfrefs insystem/interfacesdefaultVRF = global table.nokia_sros_sshshow service service-using vprn+ per-serviceshow service id <id> interface<service>/<interface>like the NETCONF sibling — SR OS interface names are per-instance scoped, so plain names could false-join onto same-named Base interfaces. RD not collected in this pass (classic CLI keeps it in per-service BGP config).cisco_viptela_sshshow interfacerowspaloalto_panosfwdfield of the existingshow interface allop-commandvr:<name>andlogical-router:<name>(Advanced Routing, 10.2+) both handled. VSYS never mapped. FactorydefaultVR = global table.paloalto_panos_sshshow interface logical(ntc-template)Both PAN-OS drivers share a documented limitation: enumeration is membership-derived, so a virtual router with no interfaces assigned does not appear.
Tests
Review trail
Two adversarial Claude rounds: round 1 found two majors in
nokia_sros_ssh(ntc-template error-exit on unnamed VPRNs wiping the whole VPRN list; plain-name member keying able to false-join VPRN membership onto same-named Base-router interfaces) plus minors — all fixed with pinning fixtures; round 2 probed the fixes against 21 adversarial line forms and full realistic captures: APPROVED.🤖 Generated with Claude Code