This repository has been archived by the owner on May 24, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 19
Support for NetBox 3.4 #253
Merged
hatsat32
merged 21 commits into
auroraresearchlab:main
from
peteeckel:feature/netbox-3.4
Dec 16, 2022
Merged
Support for NetBox 3.4 #253
hatsat32
merged 21 commits into
auroraresearchlab:main
from
peteeckel:feature/netbox-3.4
Dec 16, 2022
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR provides support for the upcoming NetBox 3.4 release and utilises some of the new features provided by it.
Compatibility
The changes made in this PR require NetBox 3.4.
Major Changes
The PR makes some noticeable changes to the user interface of NetBox DNS. This is mainly due to the migration from home-grown view code to standard NetBox view classes and has the advantage of providing a more homogenous user interface across NetBox, as well as some new features that haven't been possible before.
Global Search
NetBox 3.4 provides an API to include plugin models into the global search feature. NetBox DNS makes use of this feature so that View, NameServer, Zone and Record objects can now be found using global search.
Child Object Lists
NetBox DNS provides lists of zones per name server and view, and list of records and managed records per zone. These views were formerly implemented in custom templates, which required a lot of duplicate code and some functional restrictions (e.g. the failure to include Quick Search, #250).
Using the new
ViewTab
class of NetBox, the lists have now been moved to separate tabs within the zone, view and nameserver detail views, which made it possible to eliminate much of the custom templates.Quick Search in Child Object Lists
As a side effect of re-implementing the child object lists using
ViewTab
andObjectChildrenView
instead of custom HTML templates, Quick Search now works out of the box for child object lists. Thanks, @jeremystretch!SOA Zones in NameServer Detail View
For each NameServer object now there is a list of zones using it as their primary name server (
SOA_MNAME
). As with all new child object lists, the tab will not be displayed if there is no such zone.NetBox DNS Menu
Another new feature of NetBox 3.4 is the option to include plugin specific top level menu bar entries for plugins. NetBox DNS now no longer hides under the generic "Plugins" menu entry but uses its own, which is a major improvement.
Bulk Import from YAML and JSON
NetBox 3.4 provides the functionality to import objects from YAML and JSON as well, not just from CSV. NetBox DNS inherits this functionality.
Bulk Updates
NetBox 3.4 provides the functionality to bulk update objects using YAML, CSV and JSON. NetBox DNS inherits this functionality as well.
Experimental Integration with NetBox IPAM Views
Another functionality NetBox 3.4 provides is the option to inject contents in core model views. With this PR, NetBox DNS gets an experimental feature that displays related address and pointer records for IPAM IP addresses (records that have that address as their value in case of address records, or provide a pointer for the address), and related
.arpa
zones for IPAM prefix objects (zones that contain pointers for all IP addresses in the prefix or pointers for a subnet of the prefix).This is an experimental feature and needs to be switched on explicitly. To enable it, set the plugin configuration variable
feature_ipam_integration
in the NetBox DNS configuration toTrue
:The panels in the IPAM IP Address and Prefix detail view currently look like this:
IPAM IP Address
IPAM Prefix
As always, feedback is very welcome.
Internal Changes
Some internal changes that should not be visible on the surface:
NetBoxCSVForm
now inherit fromNetBoxImportForm
instead. This change in NetBox' API has been made to reflect the new import formats, the old one will be deprecated in NetBox 3.5*CSVForm
subclasses have been renamed to the analogous*ImportForm
class name to remain consistent with NetBox.test_view.py
modules have been adjusted to includecsv_update_data
so the NetBox view test classes (still undocumented, but extremely useful` can still be used for testing.Known Issues
Very few issues have been found so far, all of which could be cleared by fixing the underlying issues in the NetBox 3.4-beta1 release (thanks again, @jeremystretch).
fixes #250
fixes #252
fixes #32