Closes #20309: Add ASDOT notation support for ASN ranges #713

Closed
opened 2026-04-05 17:17:03 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @pheus on 12/17/2025

Fixes: #20309

Introduces ASDOT notation for ASN ranges to improve readability of large AS numbers. Adds start_asdot and end_asdot properties, updates the relevant table columns, and adjusts display logic so ranges can show both ASPLAIN and ASDOT where appropriate.

Note

To avoid repeating the same ASDOT conversion logic (// 65536 / % 65536) in multiple places, the conversion is implemented once as ASNField.to_asdot() and reused by the model properties. This keeps the helper IPAM-scoped while ensuring consistent formatting across all ASN consumers.

I also reordered methods/properties in ASNRange to follow the common NetBox model style for readability. If maintainers would prefer the simpler (more repetitive) inline conversion and/or don’t want the reordering, I’m happy to adjust.

*Originally created by @pheus on 12/17/2025* <!-- Thank you for your interest in contributing to NetBox! Please note that our contribution policy requires that a feature request or bug report be approved and assigned prior to opening a pull request. This helps avoid waste time and effort on a proposed change that we might not be able to accept. IF YOUR PULL REQUEST DOES NOT REFERENCE AN ISSUE WHICH HAS BEEN ASSIGNED TO YOU, IT WILL BE CLOSED AUTOMATICALLY. Please specify your assigned issue number on the line below. --> ### Fixes: #20309 Introduces ASDOT notation for ASN ranges to improve readability of large AS numbers. Adds `start_asdot` and `end_asdot` properties, updates the relevant table columns, and adjusts display logic so ranges can show both ASPLAIN and ASDOT where appropriate. #### Note To avoid repeating the same ASDOT conversion logic (`// 65536` / `% 65536`) in multiple places, the conversion is implemented once as `ASNField.to_asdot()` and reused by the model properties. This keeps the helper IPAM-scoped while ensuring consistent formatting across all ASN consumers. I also reordered methods/properties in `ASNRange` to follow the common NetBox model style for readability. If maintainers would prefer the simpler (more repetitive) inline conversion and/or don’t want the reordering, I’m happy to adjust.
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/netbox#713