[PR #12935] [MERGED] 12180 available objects api #14080

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

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/12935
Author: @jeremystretch
Created: 6/19/2023
Status: Merged
Merged: 6/20/2023
Merged by: @jeremystretch

Base: featureHead: 12180-available-objects-api


📝 Commits (4)

  • 3cad649 Introduce AvailableObjectsView and refactor 'available objects' API views
  • 0a9dcd3 Restore advisory PostgreSQL locks
  • 7623694 Move get_next_available_prefix()
  • 0bc1849 Apply OpenAPI decorators for get() and post()

📊 Changes

3 files changed (+221 additions, -240 deletions)

View changed files

📝 netbox/ipam/api/serializers.py (+2 -0)
📝 netbox/ipam/api/views.py (+198 -239)
📝 netbox/ipam/utils.py (+21 -1)

📄 Description

Closes: #12180

  • Introduces the new AvailableObjectsView base class
  • Refactors all "available objects" views to use AvailableObjectsView
  • Relocates prefix availability logic to the get_next_available_prefix() utility function

To do:

  • Fix the OpenAPI schema definitions
  • Clean up serializers?

🔄 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/12935 **Author:** [@jeremystretch](https://github.com/jeremystretch) **Created:** 6/19/2023 **Status:** ✅ Merged **Merged:** 6/20/2023 **Merged by:** [@jeremystretch](https://github.com/jeremystretch) **Base:** `feature` ← **Head:** `12180-available-objects-api` --- ### 📝 Commits (4) - [`3cad649`](https://github.com/netbox-community/netbox/commit/3cad6494ee830fe3c3aa9c8092669de94464499a) Introduce AvailableObjectsView and refactor 'available objects' API views - [`0a9dcd3`](https://github.com/netbox-community/netbox/commit/0a9dcd31d9ad6ba8452a23f23ea532cb68934af9) Restore advisory PostgreSQL locks - [`7623694`](https://github.com/netbox-community/netbox/commit/76236945c84944dd1c4f4f1eb197d2eb8013c3da) Move get_next_available_prefix() - [`0bc1849`](https://github.com/netbox-community/netbox/commit/0bc1849d05da29af027ce474c85958e29bd621ab) Apply OpenAPI decorators for get() and post() ### 📊 Changes **3 files changed** (+221 additions, -240 deletions) <details> <summary>View changed files</summary> 📝 `netbox/ipam/api/serializers.py` (+2 -0) 📝 `netbox/ipam/api/views.py` (+198 -239) 📝 `netbox/ipam/utils.py` (+21 -1) </details> ### 📄 Description ### Closes: #12180 - Introduces the new `AvailableObjectsView` base class - Refactors all "available objects" views to use `AvailableObjectsView` - Relocates prefix availability logic to the `get_next_available_prefix()` utility function To do: - [x] Fix the OpenAPI schema definitions - [x] ~Clean up serializers?~ --- <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 23:22:23 +01:00
adam closed this issue 2025-12-29 23:22:23 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#14080