Skip to content

Add documentation URLs to common topology error messages - #4202

Merged
ipspace merged 1 commit into
devfrom
error-doc-url
Nov 26, 2026
Merged

ipspace merged 1 commit into
devfrom
error-doc-url

Conversation

@ipspace

@ipspace ipspace commented Nov 26, 2026

Copy link
Copy Markdown
Owner

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

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>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 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_url references 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

@ipspace
ipspace merged commit a2b0f27 into dev Nov 26, 2026
9 checks passed
@ipspace
ipspace deleted the error-doc-url branch November 26, 2026 16:05
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.

2 participants