netbox-community / netbox

The premier source of truth powering network automation. Open source under Apache 2. Try NetBox Cloud free: https://netboxlabs.com/free-netbox-cloud/
http://netboxlabs.com/oss/netbox/
Apache License 2.0
15.77k stars 2.54k forks source link

Add option to import custom configuration from configuration.py #14333

Closed drobnymichal closed 9 months ago

drobnymichal commented 9 months ago

NetBox version

v3.6.5

Feature type

New functionality

Proposed functionality

Add the ability to import settings from configuration.py other than what is defined in settings.py.

Use case

I am developing a new NetBox plugin that adds some middleware to NetBox. This middleware requires a special configuration, which it looks for in the settings.py file.

In our organization, we have solved this by editing the settings.py file directly. However, this is impossible from a sustainability point of view because this file is changed between releases.

Database changes

None.

External dependencies

None.

abhi1693 commented 9 months ago

Thank you for your interest in extending NetBox. Unfortunately, the information you have provided does not constitute an actionable feature request. Per our contributing guide, a feature request must include a thorough description of the proposed functionality, including any database changes, new views or API endpoints, and so on. It must also include a detailed use case justifying its implementation. If you would like to elaborate on your proposal, please modify your post above. If sufficient detail is not added, this issue will be closed.

jeremystretch commented 9 months ago

I'll go ahead and nip this in the bud: We aren't going to allow arbitrary modifications to the content of settings.py. To do so would be extremely irresponsible and open the application to myriad potential issues.

However, this is impossible from a sustainability point of view because this file is changed between releases.

If by "impossible," you mean it would impose a slight burden on you, then yes. But if you need to modify core settings to accommodate some third party software, I'm afraid that yes, you'll need to be responsible for testing and maintaining those changes over time.