Skip to content
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

Refactor NetBoxModelViewSet to allow the creation of read-only API endpoints #11611

Closed
jeremystretch opened this issue Jan 27, 2023 · 0 comments
Assignees
Labels
status: accepted This issue has been accepted for implementation type: housekeeping Changes to the application which do not directly impact the end user
Milestone

Comments

@jeremystretch
Copy link
Member

Proposed Changes

Break out the methods of NetBoxModelViewSet which are not specific to write requests into a separate mixin or set of mixins. This should be done in a manner that backward compatibility for existing plugins is fully retained.

Justification

The NetBoxModelViewSet class is currently written with the assumption that all REST API endpoints will support the full suite of CRUDL functionality. However, in some cases it may be desirable to employ read-only endpoints which still leverage custom NetBox functionality, such as export template support. A recent example of this is FR #11558, which introduces a DataFile model that should not be mutable via the REST API, however it's likely we'll encounter similar requirements in the future.

@jeremystretch jeremystretch added status: accepted This issue has been accepted for implementation type: housekeeping Changes to the application which do not directly impact the end user labels Jan 27, 2023
@jeremystretch jeremystretch self-assigned this Jan 27, 2023
@jeremystretch jeremystretch added this to the v3.5 milestone Jan 27, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 28, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
status: accepted This issue has been accepted for implementation type: housekeeping Changes to the application which do not directly impact the end user
Projects
None yet
Development

No branches or pull requests

1 participant