Repository navigation
Add documentation URLs to common topology error messages - #4202
Merged
Merged
Conversation
Add 'doc_url' parameter to 20 log.error calls in node, link, group, lag, gateway, vlan and vrf transformation code. All URLs use existing MyST anchors. Explain the errors in the target documentation sections: * Link types: number of nodes must match explicit link type * Loopback links: single node, not all devices support loopbacks * Interface names: explicit ifname needed for virtual interfaces on devices without an interface name template Update the expected error test outputs and add the "add doc_url to new error messages" guideline to AGENTS.md Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
There was a problem hiding this comment.
🟢 Approval recommended
The review identifies no active issues, and the documentation links, expanded guidance, updated error fixtures, and contributor instructions are covered across the listed changes.
No open issues 🎉
What changed in this PR
This pull request adds links from topology transformation errors to relevant Netlab documentation, expands guidance for common link and interface errors, and updates expected error outputs.
Changes:
- Added
doc_urlreferences to 20 node, link, group, LAG, gateway, VLAN, and VRF errors. - Documented explicit link-type cardinality, loopback support, and virtual-interface naming requirements.
- Updated error fixtures and added contributor guidance for documentation URLs.
| File | Description |
|---|---|
| tests/errors/vlan-link-error.log | Updates the expected VLAN validation error output with its documentation URL. |
| tests/errors/node-wrong-device.log | Updates the expected missing-device error output with its documentation URL. |
| tests/errors/node-unmanaged-device-type.log | Updates the expected unmanaged-device error output with its documentation URL. |
| tests/errors/node-no-device.log | Updates the expected missing-device output for nodes with no device specified. |
| tests/errors/invalid-group-member.log | Updates the expected invalid group-member error output with its documentation URL. |
| tests/errors/invalid-group-member-element.log | Updates the expected invalid group-member-element error output with its documentation URL. |
| tests/errors/groups-recursive.log | Updates the expected recursive-group error output with its documentation URL. |
| tests/errors/bgp-auto-group.log | Updates the expected automatic BGP-group error output with its documentation URL. |
| tests/coverage/errors/group-device-no-members.log | Updates the expected empty group-device error output with its documentation URL. |
| tests/coverage/errors/device-image-missing.log | Updates the expected missing-device-image error output with its documentation URL. |
| netsim/modules/vrf.py | Adds a documentation link to undefined VRF interface errors. |
| netsim/modules/vlan.py | Adds documentation links to undefined VLAN and invalid VLAN-interface errors. |
| netsim/modules/lag.py | Adds documentation links to LAG platform and MLAG validation errors. |
| netsim/modules/gateway.py | Adds documentation links to gateway support and global-parameter errors. |
| netsim/augment/nodes.py | Adds documentation links to missing-device and device-image errors. |
| netsim/augment/links.py | Adds documentation links to link-type, loopback, interface-name, and address-pool errors. |
| netsim/augment/groups.py | Adds documentation links to group membership, hierarchy, inheritance, and BGP-group errors. |
| docs/links.md | Documents explicit link-type node counts, loopback limitations, and virtual-interface naming requirements. |
| AGENTS.md | Adds guidance to include relevant documentation URLs in new user-facing errors and warnings. |
Review effort: Lite
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.
Add 'doc_url' parameter to 20 log.error calls in node, link, group,
lag, gateway, vlan and vrf transformation code. All URLs use existing
MyST anchors.
Explain the errors in the target documentation sections:
on devices without an interface name template
Update the expected error test outputs and add the "add doc_url to
new error messages" guideline to AGENTS.md
Co-Authored-By: Claude Opus 5.5 noreply@anthropic.com