vr_ftosv: add interface-alias regexp (ethernet1/1/X) and interface help - #3354
Open
lz-networks wants to merge 1 commit into
Open
vr_ftosv: add interface-alias regexp (ethernet1/1/X) and interface help#3354lz-networks wants to merge 1 commit into
lz-networks wants to merge 1 commit into
Conversation
Add InterfaceRegexp/InterfaceOffset/InterfaceHelp to the vr_ftosv node, following the existing vr-kind pattern (vr_aoscx, vr_n9kv), so topology links can use CLI-style names (ethernet1/1/X, ethernet 1/1/X, 1/1/X) which map onto ethX. Setting InterfaceHelp also fixes the previously empty pattern hint in the CheckInterfaceName deploy error. Fixes srl-labs#3352 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.
Fixes #3352 (follow-up to the maintainer's go-ahead there).
What
Adds
InterfaceRegexp,InterfaceOffset, andInterfaceHelpto thevr_ftosvnode, following the existing vr-kind pattern (vr_aoscx,vr_n9kv):ethernet1/1/X(running-config form),ethernet 1/1/X(CLI-accepted spaced form), or bare1/1/X— all mapped ontoethX, while rawethXnames keep working unchanged.InterfaceHelpalso fixes the second half of the issue: theCheckInterfaceNamedeploy error previously printed an empty pattern hint (... does not match the required interface patterns: ""); it now names the accepted forms.vr-ftosv_test.go), modeled onvr_aoscx's: alias formsethernet1/1/1,ethernet 1/1/3,1/1/5map toeth1/eth3/eth5; rawethNpasses through.docs/manual/kinds/vr-ftosv.md) updated to the same "Interface naming" structure the sibling vr kinds use.Why offset 1 / why this mapping
Validated on real vrnetlab-built OS10 images (10.6.1.1.67 and 10.5.6.14, S5248F personality) while onboarding the kind on our platform: with links declared
eth1↔eth1,eth2↔eth2, both switches see each other via LLDP onethernet1/1/1/ethernet1/1/2and form OSPF FULL adjacencies onethernet1/1/1— i.e.ethN ↔ ethernet1/1/Nis 1:1 in declaration order, soport − 1 + FirstDataIfIndexis the correct index calculation. The empty-pattern error reproduced exactly as described in the issue wheneverethernet1/1/Nendpoint names were used pre-patch.Test
go vetandgolangci-lint run(v2.12, repo config) report 0 issues on the package.🤖 Generated with Claude Code