Alphanumeric Range Expansion - Skip and Group #11363

Closed
opened 2025-12-29 21:44:12 +01:00 by adam · 1 comment
Owner

Originally created by @kcaoneill on GitHub (Jul 9, 2025).

NetBox version

v4.3.3

Feature type

Change to existing functionality

Proposed functionality

I propose adding skip and group functions to alphanumeric expansion.

My proposed syntax is a range suffix as such: [range:skip:group,...] with skip and group both being optional, with a single suffix being skip only.

Examples:
1 - 48 odd [1-48:1] yielding 1,3,5,...,47
2 - 48 even [2-48:1] yielding 2,4,6,...,48
1 - 48 in groups of 2, skipping 2, [1-48:2:2] yielding 1,2,4,5,8,9...45,46

Use case

This would greatly reduce the effort for some spatial port configurations, such as application traffic on odds and storage traffic on evens, or for creating power outlets on PDUs where phasing is A A B B C C A A ... without manually creating each outlet.

I implemented this locally a few versions ago, and I can probably port it forward or reimplement if a pull request is desired.

Database changes

n/a

External dependencies

n/a

Originally created by @kcaoneill on GitHub (Jul 9, 2025). ### NetBox version v4.3.3 ### Feature type Change to existing functionality ### Proposed functionality I propose adding skip and group functions to alphanumeric expansion. My proposed syntax is a range suffix as such: [range:skip:group,...] with skip and group both being optional, with a single suffix being skip only. Examples: 1 - 48 odd [1-48:1] yielding 1,3,5,...,47 2 - 48 even [2-48:1] yielding 2,4,6,...,48 1 - 48 in groups of 2, skipping 2, [1-48:2:2] yielding 1,2,4,5,8,9...45,46 ### Use case This would greatly reduce the effort for some spatial port configurations, such as application traffic on odds and storage traffic on evens, or for creating power outlets on PDUs where phasing is A A B B C C A A ... without manually creating each outlet. I implemented this locally a few versions ago, and I can probably port it forward or reimplement if a pull request is desired. ### Database changes n/a ### External dependencies n/a
adam added the type: feature label 2025-12-29 21:44:12 +01:00
adam closed this issue 2025-12-29 21:44:12 +01:00
Author
Owner

@jeremystretch commented on GitHub (Jul 10, 2025):

I'm sorry but this is a bridge too far for this specific piece of functionality. Anything that requires logic beyond basic ranges and lists will need to be achieved via alternate means (i.e. bulk import). Otherwise this will quickly end up becoming a burden to maintain and test.

@jeremystretch commented on GitHub (Jul 10, 2025): I'm sorry but this is a bridge too far for this specific piece of functionality. Anything that requires logic beyond basic ranges and lists will need to be achieved via alternate means (i.e. bulk import). Otherwise this will quickly end up becoming a burden to maintain and test.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#11363