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

Introduce a utility function for accessing plugin configuration parameters #10543

Closed
jeremystretch opened this issue Oct 3, 2022 · 2 comments
Assignees
Labels
status: accepted This issue has been accepted for implementation topic: plugins Relates to the plugins framework type: feature Introduction of new functionality to the application
Milestone

Comments

@jeremystretch
Copy link
Member

NetBox version

v3.3.4

Feature type

New functionality

Proposed functionality

Introduce a simple utility function that plugin authors can use to reference specific plugin configuration parameters. Such a solution might look like this:

from extras.plugins import get_plugin_config

myvar = get_plugin_config('plugin_name', 'myvar')

Use case

This proposal was prompted by #10346, which seeks to better document the intended method for referencing plugin configuration parameters (which is currently achieved by referencing settings.PLUGINS_CONFIG). This approach is offered as a more convenient mechanism for plugin authors.

Database changes

No response

External dependencies

No response

@jeremystretch jeremystretch added type: feature Introduction of new functionality to the application status: under review Further discussion is needed to determine this issue's scope and/or implementation topic: plugins Relates to the plugins framework labels Oct 3, 2022
@cyberndj
Copy link

cyberndj commented Oct 3, 2022

Would this mean we could change plugin entries in plugins.py through the web interface?

@jeremystretch
Copy link
Member Author

Would this mean we could change plugin entries in plugins.py through the web interface?

No; it has nothing to do with manipulating installed plugins.

@jeremystretch jeremystretch added needs milestone Awaiting prioritization for inclusion with a future NetBox release status: accepted This issue has been accepted for implementation and removed status: under review Further discussion is needed to determine this issue's scope and/or implementation needs milestone Awaiting prioritization for inclusion with a future NetBox release labels Nov 2, 2022
@jeremystretch jeremystretch added this to the v3.4 milestone Nov 2, 2022
@jeremystretch jeremystretch self-assigned this Nov 3, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 2, 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 topic: plugins Relates to the plugins framework type: feature Introduction of new functionality to the application
Projects
None yet
Development

No branches or pull requests

2 participants