-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Release v2.7.0 #3938
Merged
Merged
Release v2.7.0 #3938
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
Introduce power port and outlet types
Closed
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.
Note: This release completely removes the topology map feature (#2745).
Note: NetBox v2.7 is the last major release that will support Python 3.5. Beginning with NetBox v2.8, Python 3.6 or
higher will be required.
New Features
Enhanced Device Type Import (#451)
NetBox now supports the import of device types and related component templates using definitions written in YAML or
JSON. For example, the following will create a new device type with four network interfaces, two power ports, and a
console port:
This new functionality replaces the old CSV-based import form, which did not allow for bulk import of component
templates.
Bulk Import of Device Components (#822)
Device components such as console ports, power ports, and interfaces can now be imported in bulk to multiple devices in
CSV format. Here's an example showing the bulk import of interfaces to several devices:
The import form for each type of device component is available under the "Devices" item in the navigation menu.
External File Storage (#1814)
In prior releases, the only option for storing uploaded files (e.g. image attachments) was to save them to the local
filesystem on the NetBox server. This release introduces support for several remote storage backends provided by the
django-storages
library. These include:To enable remote file storage, first install the
django-storages
package:Then, set the appropriate storage backend and its configuration in
configuration.py
. Here's an example using AmazonS3:
Thanks to @steffann for contributing this work!
Rack Elevations Rendered via SVG (#2248)
NetBox v2.7 introduces a new method of rendering rack elevations as an
SVG image via a REST API endpoint. This replaces the prior
method of rendering elevations using pure HTML and CSS, which was cumbersome and had several shortcomings. Rendering
rack elevations as SVG images via the REST API allows users to retrieve and make use of the drawings in their own
tooling. This also opens the door to other feature requests related to rack elevations in the NetBox backlog.
This feature implements a new REST API endpoint:
By default, this endpoint returns a paginated JSON response representing each rack unit in the given elevation. This is
the same response returned by the existing rack units detail endpoint at
/api/dcim/racks/<id>/units/
, which will beremoved in v2.8 (see #3753).
To render the elevation as an SVG image, include the
render=svg
query parameter in the request. You may also controlthe width and height of the elevation drawing (in pixels) by passing the
unit_width
andunit_height
parameters. (Thedefault values for these parameters are 230 and 20, respectively.) Additionally, the
face
parameter may be used torequest either the
front
orrear
of the elevation. Below is in example request:Thanks to @hellerve for doing the heavy lifting on this!
Changes
Topology Maps Removed (#2745)
The topology maps feature has been removed to help focus NetBox development efforts. Please replicate any required data
to another source before upgrading NetBox to v2.7, as any existing topology maps will be deleted.
Supervisor Replaced with systemd (#2902)
The NetBox installation documentation has been updated to
provide instructions for managing the WSGI and RQ services using systemd instead of supervisor. This removes the need to
install supervisor and simplifies administration of the processes.
Redis Configuration (#3282)
NetBox v2.6 introduced request caching and added the
CACHE_DATABASE
option to the existingREDIS
databaseconfiguration parameter. This did not, however, allow for using two different Redis connections for the separate caching
and webhook queuing functions. This release modifies the
REDIS
parameter to accept two discrete subsections namedwebhooks
andcaching
. This requires modification of theREDIS
parameter inconfiguration.py
as follows:Old Redis configuration:
New Redis configuration:
Note that the
CACHE_DATABASE
parameter has been removed and the connection settings have been duplicated for bothwebhooks
andcaching
. This allows the user to make use of separate Redis instances if desired. It is fine to use thesame Redis service for both functions, although the database identifiers should be different.
WEBHOOKS_ENABLED Configuration Setting Removed (#3408)
As
django-rq
is now a required library, NetBox assumes that the RQ worker process is running. The installation andupgrade documentation has been updated to reflect this, and the
WEBHOOKS_ENABLED
configuration parameter is no longerused. Please ensure that both the NetBox WSGI service and the RQ worker process are running on all production
installations.
API Choice Fields Now Use String Values (#3569)
NetBox's REST API presents fields which reference a particular choice as a dictionary with two keys:
value
andlabel
. In previous versions,value
was an integer which represented a particular choice in the database. This hasbeen changed to a more human-friendly "slug" string, which is essentially a simplified version of the choice's
label
.For example, The site model's
status
field was previously represented as:In NetBox v2.7, it now looks like this:
This change allows for much more intuitive representation and manipulation of values, and removes the need for API
consumers to maintain local mappings of static integer values.
Note that that all v2.7 releases will continue to accept the legacy integer values in write requests (
POST
,PUT
, andPATCH
) to maintain backward compatibility. Additionally, the legacy numeric identifier is conveyed in theid
fieldfor convenient reference as consumers adopt to the new string values. This behavior will be discontinued in NetBox v2.8.
Enhancements
add another"
supervisord
withsystemd
parameters
scripts
description
field to organizational modelsavailable_power
maximum value onPowerFeed
Bug Fixes
utilization > 100%
assigned
family
field foraggregates
Bug Fixes (From Beta)
API Changes
#3569).
/api/extras/scripts/
endpoint for retrieving and executing custom scriptsdescription
type
type
type
type
description
type
type
type
type
description
template_language
(to indicatedjango
orjinja2
)type
field has been changed to a content type foreign key. Models are specified as<app>.<model>
; e.g.dcim.site
.description
description
tenant