You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+8-3Lines changed: 8 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,6 +6,7 @@ A NetBox plugin that dynamically reloads plugins without requiring a server rest
6
6
7
7
- Dynamically registers plugin models that were missed during server startup
8
8
- Refreshes custom field form definitions to include newly registered models
9
+
- Refreshes tag form definitions to include newly registered models
9
10
- Helps solve integration issues between NetBox and other plugins
10
11
- No configuration required - works out of the box
11
12
@@ -14,6 +15,9 @@ A NetBox plugin that dynamically reloads plugins without requiring a server rest
14
15
| NetBox Version | Plugin Version |
15
16
|----------------|---------------|
16
17
| 4.2.x | 0.0.2 |
18
+
| 4.3.x | 4.3.x |
19
+
20
+
**Version Format**: X.X.Y where X.X = NetBox version (e.g., 4.3) and Y = plugin version increment
17
21
18
22
## Installation
19
23
@@ -54,9 +58,10 @@ When NetBox starts, Plugin Reloader:
54
58
55
59
1. Scans all enabled plugins for models that aren't properly registered in NetBox's feature registry
56
60
2. Registers any missed models with NetBox's registration system
57
-
3. Refreshes form field definitions to ensure they include all registered models
61
+
3. Refreshes custom field form definitions to ensure they include all registered models
62
+
4. Refreshes tag form definitions to ensure they include all registered models
58
63
59
-
This helps resolve issues where plugins might not fully integrate with NetBox due to load order problems without requiring a server restart.
64
+
This helps resolve issues where plugins might not fully integrate with NetBox due to load order problems without requiring a server restart. The reloader specifically updates custom field choices and tag choices to include newly registered plugin models.
60
65
61
66
## Contributing
62
67
@@ -71,4 +76,4 @@ This project is licensed under the MIT License - see the LICENSE file for detail
71
76
Jan Krupa <jan.krupa@cesnet.cz>
72
77
73
78
## Links
74
-
- Based on https://github.com/netbox-community/netbox/discussions/17836
79
+
- Based on https://github.com/netbox-community/netbox/discussions/17836
Register plugin models that weren't properly registered during application startup.
78
-
79
-
This method scans all enabled plugins, identifies models that haven't been
80
-
registered in NetBox's feature registry, and registers them.
81
-
82
-
Args:
83
-
plugin_list: List of enabled plugin names from settings
84
-
app_registry: Django application registry
85
-
netbox_registry: NetBox's internal registry for tracking features
86
-
feature_mixins_map: Dictionary mapping feature names to mixin classes
87
-
model_register_function: Function used to register models with NetBox
54
+
Registers plugin models that were not registered during initial application startup.
55
+
56
+
Iterates through the provided list of plugin names, identifies models that are missing from the NetBox feature registry, and registers them using the supplied registration function. Prints errors encountered during processing and reports the number of models registered if any were missed.
88
57
"""
89
58
unregistered_models= []
90
59
91
-
# For each enabled plugin
92
60
forplugin_nameinplugin_list:
93
61
try:
94
-
# Get the Django app configuration for this plugin
0 commit comments