feat(device-discovery): vrf discovery for extreme_slx, dell_ftos, brocade_netiron, extreme_vsp#456
Conversation
…cade_netiron, extreme_vsp Final custom-driver batch implementing get_network_instances(): - extreme_slx: VRF membership from the Vrf column of "show ip interface brief" (the extreme_slxos ntc-template, validated against the upstream real-device capture), the same rows the IP getter consumes. default-vrf is the global table; mgmt-vrf is kept. Management rows are pre-stripped like the IP getter does. - dell_ftos: driver-local parse of "show ip vrf" — abbreviated comma-separated members with wrapped continuation lines and trailing-number ranges (Gi 1/3-1/5) expanded; continuation lines are discriminated from rows by being member-tokens-only. default (id 0) is the global table; management (id 511) is kept. - brocade_netiron: driver-local parse of "show vrf" (name, default RD with (null) sentinel handling, wrapped member lists); member shorthand (ve2, e1/1) canonicalised through the same bare-id map get_interfaces_vlans() uses so names join get_interfaces() output. - extreme_vsp: "show ip vrf" enumerates VRFs; one "show ip interface vrf <name>" per VRF lists members via the same row parser the IP getter uses. GlobalRouter is the global table; MgmtRouter is kept. SLX is grounded in a real capture; the other three are built from vendor-documented formats and marked as needing live-device validation in code and docs. Eight fixture scenarios; pin matrix now 22 drivers. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Coverage Report
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 860b70a5f9
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
There was a problem hiding this comment.
Pull request overview
Implements get_network_instances() (NAPALM OpenConfig network-instances shape) for the final batch of custom drivers to support opt-in VRF discovery via options.discover_vrfs, and adds fixtures/tests to pin behavior for each platform’s CLI output.
Changes:
- Added
get_network_instances()implementations forextreme_slx,dell_ftos,brocade_netiron, andextreme_vsp. - Added per-driver mock CLI captures + expected results for “normal” and “no_vrfs” scenarios.
- Extended the VRF-dispatch runner test matrix to include the four newly-supported drivers.
Reviewed changes
Copilot reviewed 20 out of 20 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| device-discovery/tests/test_runner_vrf_dispatch.py | Expands the pinned support matrix to include the four new VRF-capable drivers. |
| device-discovery/tests/custom_drivers/extreme_vsp/mock_data/test_get_network_instances/normal/show_ip_vrf.txt | Fixture for VSP VRF enumeration output. |
| device-discovery/tests/custom_drivers/extreme_vsp/mock_data/test_get_network_instances/normal/show_ip_interface_vrf_vrf-red.txt | Fixture for per-VRF interface membership (vrf-red). |
| device-discovery/tests/custom_drivers/extreme_vsp/mock_data/test_get_network_instances/normal/show_ip_interface_vrf_MgmtRouter.txt | Fixture for per-VRF interface membership (MgmtRouter). |
| device-discovery/tests/custom_drivers/extreme_vsp/mock_data/test_get_network_instances/normal/expected_result.json | Expected get_network_instances() result for VSP “normal” case. |
| device-discovery/tests/custom_drivers/extreme_vsp/mock_data/test_get_network_instances/no_vrfs/expected_result.json | Expected get_network_instances() result for VSP “no_vrfs” case. |
| device-discovery/tests/custom_drivers/extreme_slx/mock_data/test_get_network_instances/normal/show_ip_interface_brief.txt | Fixture for SLX VRF membership derived from show ip interface brief. |
| device-discovery/tests/custom_drivers/extreme_slx/mock_data/test_get_network_instances/normal/expected_result.json | Expected get_network_instances() result for SLX “normal” case. |
| device-discovery/tests/custom_drivers/extreme_slx/mock_data/test_get_network_instances/no_vrfs/expected_result.json | Expected get_network_instances() result for SLX “no_vrfs” case. |
| device-discovery/tests/custom_drivers/dell_ftos/mock_data/test_get_network_instances/normal/show_ip_vrf.txt | Fixture for OS9 show ip vrf output (wrapped members / ranges). |
| device-discovery/tests/custom_drivers/dell_ftos/mock_data/test_get_network_instances/normal/expected_result.json | Expected get_network_instances() result for FTOS “normal” case. |
| device-discovery/tests/custom_drivers/dell_ftos/mock_data/test_get_network_instances/no_vrfs/expected_result.json | Expected get_network_instances() result for FTOS “no_vrfs” case. |
| device-discovery/tests/custom_drivers/brocade_netiron/mock_data/test_get_network_instances/normal/show_vrf.txt | Fixture for NetIron show vrf output (with wrapped interface list). |
| device-discovery/tests/custom_drivers/brocade_netiron/mock_data/test_get_network_instances/normal/show_interfaces.txt | Fixture backing canonical interface-name mapping for NetIron member normalization. |
| device-discovery/tests/custom_drivers/brocade_netiron/mock_data/test_get_network_instances/normal/expected_result.json | Expected get_network_instances() result for NetIron “normal” case (incl. RD handling). |
| device-discovery/tests/custom_drivers/brocade_netiron/mock_data/test_get_network_instances/no_vrfs/expected_result.json | Expected get_network_instances() result for NetIron “no_vrfs” case. |
| device-discovery/custom_napalm/extreme_vsp.py | Adds VSP VRF parsing + get_network_instances() implementation. |
| device-discovery/custom_napalm/extreme_slx.py | Adds SLX get_network_instances() derived from the show ip interface brief parsed rows. |
| device-discovery/custom_napalm/dell_ftos.py | Adds OS9 VRF parser (wrapping + range expansion + abbrev expansion) + get_network_instances(). |
| device-discovery/custom_napalm/brocade_netiron.py | Adds NetIron VRF parser + canonicalization of member tokens + get_network_instances(). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…rows; vsp indented rows Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5fd51aa831
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…y; ftos indentation-gated continuations Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
@codex review |
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 017d47d3ba
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…single-vrf request skips n+1 calls Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
@codex review |
|
Codex Review: Didn't find any major issues. Chef's kiss. ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
…inherited members Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Summary
Final custom-driver batch implementing
get_network_instances()for VRF discovery (follows #452/#453/#454/#455). This completes the planned driver coverage: 22 drivers now supportoptions.discover_vrfs; everything else is documented as permanently-N/A or demand-driven.Per driver
extreme_slxshow ip interface brief(ntc-template)default-vrf= global table;mgmt-vrfkept. Management rows pre-stripped (template error-exits on them, mirroring the IP getter). Membership-derived enumeration; RD not collected.dell_ftosshow ip vrf, driver-local parseGi 1/2) expand to the full template forms interface discovery keys by — including OS9's lowercase-first speed names (fortyGigE). Wrapped continuation lines, trailing-number ranges (cross-slot ranges deliberately not expanded), paging-orphan continuations dropped.default(id 0) = global table;management(511) kept.brocade_netironshow vrf, driver-local parse(null)/Not Setsentinels → absent); member shorthand (ve2,e1/1) canonicalised through the driver's existing bare-id name map so names joinget_interfaces()output.default-vrf= global table.extreme_vspshow ip vrf+ per-VRFshow ip interface vrf <name>GlobalRouter= global table;MgmtRouterkept.Validation caveat — stated plainly
extreme_slxis grounded in a real capture.dell_ftos,brocade_netiron, andextreme_vspare built from vendor-documented output formats — mockit and ntc-templates carry no VRF command captures for these platforms. Each is marked in code and docs as needing live-device validation; parsers are deliberately conservative (unparseable tokens pass through and simply never join rather than guessing).Tests
Review trail
Two adversarial Claude rounds. Round 1 caught a HIGH (FTOS abbreviated member names provably could never join the driver's own full-name interface keys — the feature would have silently no-op'd on every OS9 box) plus NetIron
Not SetRD dropping whole VRF rows, cross-slot range fabrication, and stale-continuation attachment — all fixed with probes. Round 2: APPROVED, with its remaining LOW/INFO hardenings (OS9 lowercase speed casing, phantom-VRF orphan drop,NotSetsentinel) also applied. A codex final-gate pass was started but stopped for time; the two-round adversarial trail stands as the quality gate.🤖 Generated with Claude Code