Natural interface ordering broken (Gi and Te interfaces) #2602

Closed
opened 2025-12-29 18:20:18 +01:00 by adam · 2 comments
Owner

Originally created by @candlerb on GitHub (May 10, 2019).

Environment

  • Python version: 3.5.2
  • NetBox version: 2.5.12

Steps to Reproduce

  1. Create a new Device or Device Type
  2. Add ports Gi1/0/[1-48]
  3. Add ports Te1/0/[1-4]

Expected Behavior

Interfaces to be shown grouped by type as:

  • Gi1/0/1
  • Gi1/0/2
  • Gi1/0/3
  • ...
  • Gi1/0/24
  • Te1/0/1
  • Te1/0/2
  • Te1/0/3
  • Te1/0/4

Observed Behavior

Interfaces of different types are mixed together.

  • Gi1/0/1
  • Te1/0/1
  • Gi1/0/2
  • Te1/0/2
  • Gi1/0/3
  • Te1/0/3
  • Gi1/0/4
  • Te1/0/4
  • Gi1/0/5
  • Gi1/0/6
  • ...

Maybe relates to: #3097, #3127 (but the commit for #3127 made it into 2.5.12, which is what I'm running)

Originally created by @candlerb on GitHub (May 10, 2019). ### Environment * Python version: 3.5.2 * NetBox version: 2.5.12 ### Steps to Reproduce 1. Create a new Device or Device Type 2. Add ports `Gi1/0/[1-48]` 3. Add ports `Te1/0/[1-4]` ### Expected Behavior Interfaces to be shown grouped by type as: * Gi1/0/1 * Gi1/0/2 * Gi1/0/3 * ... * Gi1/0/24 * Te1/0/1 * Te1/0/2 * Te1/0/3 * Te1/0/4 ### Observed Behavior Interfaces of different types are mixed together. * Gi1/0/1 * Te1/0/1 * Gi1/0/2 * Te1/0/2 * Gi1/0/3 * Te1/0/3 * Gi1/0/4 * Te1/0/4 * Gi1/0/5 * Gi1/0/6 * ... Maybe relates to: #3097, #3127 (but the commit for #3127 made it into 2.5.12, which is what I'm running)
adam closed this issue 2025-12-29 18:20:18 +01:00
Author
Owner

@jeremystretch commented on GitHub (May 10, 2019):

This was raised in #2872:

Closing this out as there's not much we can do about it. Cisco made the unfortunate decision to reuse position indices for different types, which results in a sort of zipper effect when the interfaces are ordered. Previously, this was handled by a field on the DeviceType which informed which type of ordering to use for interfaces (media first or slot/position first), but this was removed because it made it impossible to list interfaces outside the context of a specific device.

@jeremystretch commented on GitHub (May 10, 2019): This was raised in #2872: > Closing this out as there's not much we can do about it. Cisco made the unfortunate decision to reuse position indices for different types, which results in a sort of zipper effect when the interfaces are ordered. Previously, this was handled by a field on the DeviceType which informed which type of ordering to use for interfaces (media first or slot/position first), but this was removed because it made it impossible to list interfaces outside the context of a specific device.
Author
Owner

@RHuehne commented on GitHub (Jan 13, 2020):

Well, if there was an Checkbox in the Device type whether to use "normal" sorting or "Alphanumerical" sorting and having two different sort logics in the background cloud solve this. Otherwise there could be a parent ordering on interface type so that by default it's sorted by device type (e.g. all GE1 and ALL SFP+ (10GE) would be listed together). Cheers

@RHuehne commented on GitHub (Jan 13, 2020): Well, if there was an Checkbox in the Device type whether to use "normal" sorting or "Alphanumerical" sorting and having two different sort logics in the background cloud solve this. Otherwise there could be a parent ordering on interface type so that by default it's sorted by device type (e.g. all GE1 and ALL SFP+ (10GE) would be listed together). Cheers
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#2602