[PR #7662] [MERGED] Closes: #6732 - Add new ASN model #13261

Closed
opened 2025-12-29 22:26:19 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/7662
Author: @DanSheps
Created: 10/27/2021
Status: Merged
Merged: 11/3/2021
Merged by: @jeremystretch

Base: featureHead: 6732-asn-model


📝 Commits (10+)

📊 Changes

41 files changed (+902 additions, -39 deletions)

View changed files

📝 docs/core-functionality/ipam.md (+5 -1)
docs/models/ipam/asn.md (+15 -0)
📝 netbox/dcim/api/serializers.py (+6 -3)
📝 netbox/dcim/api/views.py (+2 -1)
📝 netbox/dcim/filtersets.py (+13 -0)
📝 netbox/dcim/forms/bulk_edit.py (+9 -3)
📝 netbox/dcim/forms/bulk_import.py (+1 -1)
📝 netbox/dcim/forms/filtersets.py (+9 -1)
📝 netbox/dcim/forms/models.py (+12 -17)
📝 netbox/dcim/graphql/types.py (+4 -0)
netbox/dcim/migrations/0141_asn_model.py (+19 -0)
📝 netbox/dcim/models/sites.py (+5 -0)
📝 netbox/dcim/tables/sites.py (+9 -4)
📝 netbox/dcim/tests/test_filtersets.py (+22 -1)
📝 netbox/dcim/tests/test_views.py (+29 -4)
📝 netbox/dcim/views.py (+7 -1)
📝 netbox/ipam/api/nested_serializers.py (+13 -0)
📝 netbox/ipam/api/serializers.py (+18 -0)
📝 netbox/ipam/api/urls.py (+3 -0)
📝 netbox/ipam/api/views.py (+11 -0)

...and 21 more files

📄 Description

Closes: #6732

Adds a new model for ASN management with associated API, views, forms, filters and views

TODO:

  • Add/update tests
  • Revert removal of ASN from site model to maintain compatibility
  • Check over code to ensure proper capitalization on "RIR" in the forms/tables
  • GraphQL support
  • Convert ASNField for GraphQL to string to support dot notation

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netbox-community/netbox/pull/7662 **Author:** [@DanSheps](https://github.com/DanSheps) **Created:** 10/27/2021 **Status:** ✅ Merged **Merged:** 11/3/2021 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `feature` ← **Head:** `6732-asn-model` --- ### 📝 Commits (10+) - [`a010689`](https://github.com/netbox-community/netbox/commit/a01068949c54c2ec6f428245f9cc68f400075e09) Initial work on #6732 - [`8b529ab`](https://github.com/netbox-community/netbox/commit/8b529abfe10f1a05b5449a964118a8608f96b750) Initial work on #6732 - [`3185cd0`](https://github.com/netbox-community/netbox/commit/3185cd0b1fa907b91e175ed4d01715e5f77f3959) #6732 - Correct incorrect field definition in field order - [`8235b33`](https://github.com/netbox-community/netbox/commit/8235b339eedc28b29d0b640c4523460ce7aaaf4e) #6732 - Revert some changes to legacy ASN field on site model - [`0ad440f`](https://github.com/netbox-community/netbox/commit/0ad440fea57cd5c252f8f9bb972cb257b7b20403) #6732 - GraphQL support - [`93de6c9`](https://github.com/netbox-community/netbox/commit/93de6c9f88cf0f3f786b755d775f66f3f3f2ea71) #6732 - Tests - [`9b5f45a`](https://github.com/netbox-community/netbox/commit/9b5f45aee1c06bb2752bdfb22e156791bcbd1042) #6732 - Serializers - [`96565c3`](https://github.com/netbox-community/netbox/commit/96565c31d93c8a1446020e449cf9dd04c3791c57) #6732 - ASN should be unique - [`1902e11`](https://github.com/netbox-community/netbox/commit/1902e112f643a134433b995610746bc62830cbd4) #6732 - Fix tests for utilities - [`0f68ecd`](https://github.com/netbox-community/netbox/commit/0f68ecda785a4512fbaee337dff18ba2218a3013) #6732 - Fix hiding of ASN field in Site creation form ### 📊 Changes **41 files changed** (+902 additions, -39 deletions) <details> <summary>View changed files</summary> 📝 `docs/core-functionality/ipam.md` (+5 -1) ➕ `docs/models/ipam/asn.md` (+15 -0) 📝 `netbox/dcim/api/serializers.py` (+6 -3) 📝 `netbox/dcim/api/views.py` (+2 -1) 📝 `netbox/dcim/filtersets.py` (+13 -0) 📝 `netbox/dcim/forms/bulk_edit.py` (+9 -3) 📝 `netbox/dcim/forms/bulk_import.py` (+1 -1) 📝 `netbox/dcim/forms/filtersets.py` (+9 -1) 📝 `netbox/dcim/forms/models.py` (+12 -17) 📝 `netbox/dcim/graphql/types.py` (+4 -0) ➕ `netbox/dcim/migrations/0141_asn_model.py` (+19 -0) 📝 `netbox/dcim/models/sites.py` (+5 -0) 📝 `netbox/dcim/tables/sites.py` (+9 -4) 📝 `netbox/dcim/tests/test_filtersets.py` (+22 -1) 📝 `netbox/dcim/tests/test_views.py` (+29 -4) 📝 `netbox/dcim/views.py` (+7 -1) 📝 `netbox/ipam/api/nested_serializers.py` (+13 -0) 📝 `netbox/ipam/api/serializers.py` (+18 -0) 📝 `netbox/ipam/api/urls.py` (+3 -0) 📝 `netbox/ipam/api/views.py` (+11 -0) _...and 21 more files_ </details> ### 📄 Description ### Closes: #6732 Adds a new model for ASN management with associated API, views, forms, filters and views TODO: - [x] Add/update tests - [x] Revert removal of ASN from site model to maintain compatibility - [x] Check over code to ensure proper capitalization on "RIR" in the forms/tables - [x] GraphQL support - [x] ~~Convert ASNField for GraphQL to string to support dot notation~~ --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-29 22:26:19 +01:00
adam closed this issue 2025-12-29 22:26:19 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#13261