Skip to content

Connect to external databases #18780

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

Closed
fmluizao opened this issue Feb 28, 2025 · 1 comment
Closed

Connect to external databases #18780

fmluizao opened this issue Feb 28, 2025 · 1 comment
Assignees
Labels
complexity: low Requires minimal effort to implement status: accepted This issue has been accepted for implementation type: feature Introduction of new functionality to the application
Milestone

Comments

@fmluizao
Copy link

NetBox version

4.1.11

Feature type

Data model extension

Proposed functionality

I have a very specific use case, I'm developing a plugin, and I need to query an external DB.

I thought about being able to define the connection on configuration.py and them merging with Netbox's default db

Here's POC:

fmluizao@ce478be

Would you accept a PR for this?

Use case

You can create a model in a plugin which can query other databases, like

class MyPluginModel(models.model):
   # ...

MyPluginModel.objects.using('otherdbconnection')

Maybe we can even define a custom router to avoid using:

https://docs.djangoproject.com/en/5.2/topics/db/multi-db/#using-routers

Database changes

No response

External dependencies

No response

@fmluizao fmluizao added status: needs triage This issue is awaiting triage by a maintainer type: feature Introduction of new functionality to the application labels Feb 28, 2025
@Leo-scs
Copy link

Leo-scs commented Feb 28, 2025

Can you please approve this PR? It would be something very important and useful to use in Netbox

@jeremystretch jeremystretch added needs milestone Awaiting prioritization for inclusion with a future NetBox release status: backlog Awaiting selection for work complexity: low Requires minimal effort to implement and removed status: needs triage This issue is awaiting triage by a maintainer labels Mar 6, 2025
@jeremystretch jeremystretch self-assigned this Mar 14, 2025
@jeremystretch jeremystretch added this to the v4.3 milestone Mar 14, 2025
@jeremystretch jeremystretch added status: accepted This issue has been accepted for implementation and removed needs milestone Awaiting prioritization for inclusion with a future NetBox release status: backlog Awaiting selection for work labels Mar 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
complexity: low Requires minimal effort to implement status: accepted This issue has been accepted for implementation type: feature Introduction of new functionality to the application
Projects
None yet
Development

No branches or pull requests

3 participants