-
Notifications
You must be signed in to change notification settings - Fork 2.6k
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
unexpected interface ordering behaviour #1173
Comments
This is happening because the intermingled alphabetic characters inside the numeric slot/position are not matched by the regexes we use for ordering. Only the leading "1" is being matched, so the interfaces are essentially unordered. I'm going to tweak the ordering so that it uses the entire name field as a tiebreaker. This will result in a deterministic order for the names listed above, however it won't be perfect. For example, |
Ah, I guess I expected that when it was set to alphabetic, it would sort the entire string... but you're saying it's just a subset? What's the goal there? |
@bleything The name is broken into segments so that we can
It's not a flawless approach but it's the best we have at the moment. |
Ah, got it! Thanks for the explanation. Totally makes sense; it's a complicated kind of thing to order. |
Oh, and thanks for the quick fix, too! |
Issue type: bug report
Python version: 2.7.5
NetBox version: v2.0.1
I've got switches that have ports named
1/g[1-48]
and1/xg[1-4]
. No matter how I set the interface ordering, they always display in a specific order that doesn't make sense to me. On the device type page:On a specific device page:
It's very possible that I am just misunderstanding how this is supposed to work... but I would expect the
xgN
interfaces to sort to the bottom in alphabetical mode, at the very least. And I'd expect the sorting to change when I change the interface ordering option. Aaaaaaaaand it's pretty weird thatxg3
andxg4
sort differently on the device type page vs. the device page.Is this an actual bug or am I just not understanding what's happening?
The text was updated successfully, but these errors were encountered: