Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Range "568" is invalid when creating interface with names vlan [568,570] #13722

Closed
pv2b opened this issue Sep 8, 2023 · 5 comments · Fixed by #15301
Closed

Range "568" is invalid when creating interface with names vlan [568,570] #13722

pv2b opened this issue Sep 8, 2023 · 5 comments · Fixed by #15301
Assignees
Labels
severity: low Does not significantly disrupt application functionality, or a workaround is available status: accepted This issue has been accepted for implementation type: bug A confirmed report of unexpected behavior in the application

Comments

@pv2b
Copy link
Contributor

pv2b commented Sep 8, 2023

NetBox version

v3.6.1

Python version

3.11

Steps to Reproduce

  1. Go to an existing device and click on add interfaces.
  2. Set the interface name to vlan [568,570]
  3. Fill in a type (any type is fine)

Expected Behavior

Two interfaces named vlan 568 and vlan 570 are created.

Observed Behavior

An error message is shown:

Range "568" is invalid

NOTE: The below works but will of course not create the appropriate names:
vlan [a568,a570]

I believe the error is in parse_alphanumeric_range in netbox/utilities/forms/utils.py. I think that function is a little overdue for some refactoring, and I'm happy to take it on if accepted.

@pv2b pv2b added the type: bug A confirmed report of unexpected behavior in the application label Sep 8, 2023
@jeremystretch jeremystretch added the status: accepted This issue has been accepted for implementation label Sep 8, 2023
@jeremystretch
Copy link
Member

Thanks @pv2b, I've assigned this to you.

pv2b added a commit to pv2b/netbox that referenced this issue Sep 8, 2023
Range "568" is invalid when creating interface with names vlan [568,570]
@DanSheps
Copy link
Member

DanSheps commented Sep 8, 2023

This also shows up with interfaces, FYI.

@DanSheps DanSheps added the severity: low Does not significantly disrupt application functionality, or a workaround is available label Sep 8, 2023
pv2b added a commit to pv2b/netbox that referenced this issue Sep 8, 2023
@pv2b
Copy link
Contributor Author

pv2b commented Sep 8, 2023

This also shows up with interfaces, FYI.

This bug report is about interfaces, yes. I'm not sure what you mean to say with this?

@DanSheps
Copy link
Member

This also shows up with interfaces, FYI.

This bug report is about interfaces, yes. I'm not sure what you mean to say with this?

Sorry, case of the fridays, was thinking it was with vlans.

@markh0338
Copy link

I'll just add that we're running into this issue as well and merging in #13730 seems to resolve our problems. It would be nice to see this merged into a release.

@jeremystretch jeremystretch assigned DanSheps and unassigned pv2b Mar 11, 2024
jeremystretch added a commit that referenced this issue Mar 11, 2024
…ed (#15301)

* Fixes: #13722 - Correct range expansion code when a numeric set is used

* Correct to my own suggestion

* Clean up logic

* Simplify range detection

---------

Co-authored-by: Jeremy Stretch <[email protected]>
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
severity: low Does not significantly disrupt application functionality, or a workaround is available status: accepted This issue has been accepted for implementation type: bug A confirmed report of unexpected behavior in the application
Projects
None yet
4 participants