-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Closed
Labels
complexity: mediumRequires a substantial but not unusual amount of effort to implementRequires a substantial but not unusual amount of effort to implementstatus: acceptedThis issue has been accepted for implementationThis issue has been accepted for implementationtopic: pluginsRelates to the plugins frameworkRelates to the plugins frameworktype: featureIntroduction of new functionality to the applicationIntroduction of new functionality to the application
Milestone
Description
NetBox version
v3.7.2
Feature type
New functionality
Proposed functionality
3.7.0 introduced the events pipeline described in #14132
This involves making an entry in EVENTS_PIPELINE=[] within configuration.py, it would be more ergonomic if plugins could register for events by declaring intent within their configuration.
For example:
from netbox.plugins import PluginConfig
class FooBarConfig(PluginConfig):
name = 'foo_bar'
verbose_name = 'Foo Bar'
description = 'An example NetBox plugin'
version = '0.1'
author = 'Jeremy Stretch'
author_email = '[email protected]'
base_url = 'foo-bar'
required_settings = []
default_settings = {
'baz': True
}
events_pipeline_registrations = [
"foobar.mymodule.custom_event_handler"
]
django_apps = ["foo", "bar", "baz"]
config = FooBarConfigevents_pipeline_registrations would be optional to allow for backwards compatibility and default to []
It would allow plugins which require access to the events pipeline to have entries added into EVENTS_PIPELINE automatically. This reduces complexity on those installing Netbox plugins which need events access.
https://linear.app/netboxlabs/issue/BIZ-6/
Use case
Simplify access to the events pipeline for plugins, reduce configuration complexity.
Database changes
No response
External dependencies
No response
Metadata
Metadata
Assignees
Labels
complexity: mediumRequires a substantial but not unusual amount of effort to implementRequires a substantial but not unusual amount of effort to implementstatus: acceptedThis issue has been accepted for implementationThis issue has been accepted for implementationtopic: pluginsRelates to the plugins frameworkRelates to the plugins frameworktype: featureIntroduction of new functionality to the applicationIntroduction of new functionality to the application