2020-01-16 23:43:32 -05:00
|
|
|
# v2.7.1 (2020-01-16)
|
2020-01-16 23:03:16 +00:00
|
|
|
|
|
|
|
## Bug Fixes
|
|
|
|
|
|
|
|
* [#3941](https://github.com/netbox-community/netbox/issues/3941) - Fixed exception when attempting to assign IP to interface
|
2020-01-16 23:41:52 -05:00
|
|
|
* [#3943](https://github.com/netbox-community/netbox/issues/3943) - Prevent rack elevation links from opening new tabs/windows
|
2020-01-16 21:39:46 -05:00
|
|
|
* [#3944](https://github.com/netbox-community/netbox/issues/3944) - Fix AttributeError exception when viewing prefixes list
|
2020-01-16 23:03:16 +00:00
|
|
|
|
|
|
|
---
|
|
|
|
|
2020-01-16 12:57:24 -05:00
|
|
|
# v2.7.0 (2020-01-16)
|
2019-10-30 10:34:26 -04:00
|
|
|
|
2020-01-16 11:28:54 -05:00
|
|
|
**Note:** This release completely removes the topology map feature ([#2745](https://github.com/netbox-community/netbox/issues/2745)).
|
|
|
|
|
2019-12-11 17:22:41 -05:00
|
|
|
**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.
|
2019-12-10 13:44:45 -05:00
|
|
|
|
2019-10-30 10:34:26 -04:00
|
|
|
## New Features
|
|
|
|
|
|
|
|
### Enhanced Device Type Import ([#451](https://github.com/netbox-community/netbox/issues/451))
|
|
|
|
|
2020-01-16 11:28:54 -05:00
|
|
|
NetBox now supports the import of device types and related component templates using definitions written in YAML or
|
2019-12-11 17:22:41 -05:00
|
|
|
JSON. For example, the following will create a new device type with four network interfaces, two power ports, and a
|
|
|
|
console port:
|
2019-10-30 10:34:26 -04:00
|
|
|
|
|
|
|
```yaml
|
|
|
|
manufacturer: Acme
|
|
|
|
model: Packet Shooter 9000
|
|
|
|
slug: packet-shooter-9000
|
|
|
|
u_height: 1
|
|
|
|
interfaces:
|
|
|
|
- name: ge-0/0/0
|
|
|
|
type: 1000base-t
|
|
|
|
- name: ge-0/0/1
|
|
|
|
type: 1000base-t
|
|
|
|
- name: ge-0/0/2
|
|
|
|
type: 1000base-t
|
|
|
|
- name: ge-0/0/3
|
|
|
|
type: 1000base-t
|
|
|
|
power-ports:
|
|
|
|
- name: PSU0
|
|
|
|
- name: PSU1
|
|
|
|
console-ports:
|
|
|
|
- name: Console
|
|
|
|
```
|
|
|
|
|
2020-01-16 11:28:54 -05:00
|
|
|
This new functionality replaces the old CSV-based import form, which did not allow for bulk import of component
|
|
|
|
templates.
|
2019-10-10 13:41:10 -04:00
|
|
|
|
2019-12-05 15:54:29 -05:00
|
|
|
### Bulk Import of Device Components ([#822](https://github.com/netbox-community/netbox/issues/822))
|
|
|
|
|
2020-01-16 11:28:54 -05:00
|
|
|
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:
|
2019-12-11 17:22:41 -05:00
|
|
|
|
|
|
|
```
|
|
|
|
device,name,type
|
|
|
|
Switch1,Vlan100,Virtual
|
|
|
|
Switch1,Vlan200,Virtual
|
|
|
|
Switch2,Vlan100,Virtual
|
|
|
|
Switch2,Vlan200,Virtual
|
|
|
|
```
|
2019-12-05 15:54:29 -05:00
|
|
|
|
2020-01-16 11:28:54 -05:00
|
|
|
The import form for each type of device component is available under the "Devices" item in the navigation menu.
|
|
|
|
|
2019-12-11 11:01:08 -05:00
|
|
|
### External File Storage ([#1814](https://github.com/netbox-community/netbox/issues/1814))
|
|
|
|
|
2019-12-11 17:22:41 -05:00
|
|
|
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`](https://django-storages.readthedocs.io/en/stable/) library. These include:
|
2019-12-11 11:01:08 -05:00
|
|
|
|
|
|
|
* Amazon S3
|
|
|
|
* ApacheLibcloud
|
|
|
|
* Azure Storage
|
2020-01-16 09:38:23 -05:00
|
|
|
* netbox-community Spaces
|
2019-12-11 11:01:08 -05:00
|
|
|
* Dropbox
|
|
|
|
* FTP
|
|
|
|
* Google Cloud Storage
|
|
|
|
* SFTP
|
|
|
|
|
2020-01-16 11:28:54 -05:00
|
|
|
To enable remote file storage, first install the `django-storages` package:
|
2019-12-11 11:01:08 -05:00
|
|
|
|
|
|
|
```
|
|
|
|
pip install django-storages
|
|
|
|
```
|
|
|
|
|
|
|
|
Then, set the appropriate storage backend and its configuration in `configuration.py`. Here's an example using Amazon
|
|
|
|
S3:
|
|
|
|
|
|
|
|
```python
|
|
|
|
STORAGE_BACKEND = 'storages.backends.s3boto3.S3Boto3Storage'
|
|
|
|
STORAGE_CONFIG = {
|
|
|
|
'AWS_ACCESS_KEY_ID': '<Key>',
|
|
|
|
'AWS_SECRET_ACCESS_KEY': '<Secret>',
|
|
|
|
'AWS_STORAGE_BUCKET_NAME': 'netbox',
|
|
|
|
'AWS_S3_REGION_NAME': 'eu-west-1',
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
2019-12-11 17:22:41 -05:00
|
|
|
Thanks to [@steffann](https://github.com/steffann) for contributing this work!
|
|
|
|
|
2019-12-11 10:34:44 -05:00
|
|
|
### Rack Elevations Rendered via SVG ([#2248](https://github.com/netbox-community/netbox/issues/2248))
|
|
|
|
|
2019-12-11 17:22:41 -05:00
|
|
|
NetBox v2.7 introduces a new method of rendering rack elevations as an
|
2020-01-16 11:28:54 -05:00
|
|
|
[SVG image](https://en.wikipedia.org/wiki/Scalable_Vector_Graphics) 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.
|
2019-12-11 10:34:44 -05:00
|
|
|
|
|
|
|
This feature implements a new REST API endpoint:
|
|
|
|
|
|
|
|
```
|
|
|
|
/api/dcim/racks/<id>/elevation/
|
|
|
|
```
|
|
|
|
|
2019-12-11 17:22:41 -05:00
|
|
|
By default, this endpoint returns a paginated JSON response representing each rack unit in the given elevation. This is
|
2020-01-16 11:28:54 -05:00
|
|
|
the same response returned by the existing rack units detail endpoint at `/api/dcim/racks/<id>/units/`, which will be
|
|
|
|
removed in v2.8 (see [#3753](https://github.com/netbox-community/netbox/issues/3753)).
|
2019-12-11 10:34:44 -05:00
|
|
|
|
2020-01-16 11:28:54 -05:00
|
|
|
To render the elevation as an SVG image, include the `render=svg` query parameter in the request. You may also control
|
|
|
|
the width and height of the elevation drawing (in pixels) by passing the `unit_width` and `unit_height` parameters. (The
|
|
|
|
default values for these parameters are 230 and 20, respectively.) Additionally, the `face` parameter may be used to
|
|
|
|
request either the `front` or `rear` of the elevation. Below is in example request:
|
2019-12-11 13:39:10 -05:00
|
|
|
|
|
|
|
```
|
2019-12-11 17:33:58 -05:00
|
|
|
/api/dcim/racks/<id>/elevation/?render=svg&face=rear&unit_width=300&unit_height=35
|
2019-12-11 13:39:10 -05:00
|
|
|
```
|
2019-12-11 10:34:44 -05:00
|
|
|
|
|
|
|
Thanks to [@hellerve](https://github.com/hellerve) for doing the heavy lifting on this!
|
|
|
|
|
2020-01-16 11:28:54 -05:00
|
|
|
## Changes
|
|
|
|
|
2019-10-30 10:34:26 -04:00
|
|
|
### Topology Maps Removed ([#2745](https://github.com/netbox-community/netbox/issues/2745))
|
|
|
|
|
2020-01-16 11:28:54 -05:00
|
|
|
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](https://github.com/netbox-community/netbox/issues/2902))
|
|
|
|
|
|
|
|
The NetBox [installation documentation](https://netbox.readthedocs.io/en/stable/installation/) 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.
|
2019-10-30 10:34:26 -04:00
|
|
|
|
2019-10-13 02:49:54 -04:00
|
|
|
### Redis Configuration ([#3282](https://github.com/netbox-community/netbox/issues/3282))
|
|
|
|
|
2020-01-16 11:28:54 -05:00
|
|
|
NetBox v2.6 introduced request caching and added the `CACHE_DATABASE` option to the existing `REDIS` database
|
|
|
|
configuration 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 named
|
|
|
|
`webhooks` and `caching`. This requires modification of the `REDIS` parameter in `configuration.py` as follows:
|
2019-10-13 02:49:54 -04:00
|
|
|
|
|
|
|
Old Redis configuration:
|
2020-01-16 11:28:54 -05:00
|
|
|
|
2019-10-13 02:49:54 -04:00
|
|
|
```python
|
|
|
|
REDIS = {
|
|
|
|
'HOST': 'localhost',
|
|
|
|
'PORT': 6379,
|
|
|
|
'PASSWORD': '',
|
|
|
|
'DATABASE': 0,
|
|
|
|
'CACHE_DATABASE': 1,
|
|
|
|
'DEFAULT_TIMEOUT': 300,
|
|
|
|
'SSL': False,
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
New Redis configuration:
|
2020-01-16 11:28:54 -05:00
|
|
|
|
2019-10-13 02:49:54 -04:00
|
|
|
```python
|
|
|
|
REDIS = {
|
|
|
|
'webhooks': {
|
|
|
|
'HOST': 'redis.example.com',
|
|
|
|
'PORT': 1234,
|
|
|
|
'PASSWORD': 'foobar',
|
|
|
|
'DATABASE': 0,
|
|
|
|
'DEFAULT_TIMEOUT': 300,
|
|
|
|
'SSL': False,
|
|
|
|
},
|
|
|
|
'caching': {
|
|
|
|
'HOST': 'localhost',
|
|
|
|
'PORT': 6379,
|
|
|
|
'PASSWORD': '',
|
|
|
|
'DATABASE': 1,
|
|
|
|
'DEFAULT_TIMEOUT': 300,
|
|
|
|
'SSL': False,
|
|
|
|
}
|
|
|
|
}
|
2020-01-16 23:03:16 +00:00
|
|
|
```
|
2019-10-13 02:49:54 -04:00
|
|
|
|
2020-01-16 11:28:54 -05:00
|
|
|
Note that the `CACHE_DATABASE` parameter has been removed and the connection settings have been duplicated for both
|
|
|
|
`webhooks` and `caching`. This allows the user to make use of separate Redis instances if desired. It is fine to use the
|
|
|
|
same Redis service for both functions, although the database identifiers should be different.
|
2019-12-05 20:49:56 -05:00
|
|
|
|
2019-12-06 11:52:28 -05:00
|
|
|
### WEBHOOKS_ENABLED Configuration Setting Removed ([#3408](https://github.com/netbox-community/netbox/issues/3408))
|
|
|
|
|
|
|
|
As `django-rq` is now a required library, NetBox assumes that the RQ worker process is running. The installation and
|
|
|
|
upgrade documentation has been updated to reflect this, and the `WEBHOOKS_ENABLED` configuration parameter is no longer
|
|
|
|
used. Please ensure that both the NetBox WSGI service and the RQ worker process are running on all production
|
|
|
|
installations.
|
|
|
|
|
2019-12-05 20:49:56 -05:00
|
|
|
### API Choice Fields Now Use String Values ([#3569](https://github.com/netbox-community/netbox/issues/3569))
|
|
|
|
|
|
|
|
NetBox's REST API presents fields which reference a particular choice as a dictionary with two keys: `value` and
|
2020-01-16 11:28:54 -05:00
|
|
|
`label`. In previous versions, `value` was an integer which represented a particular choice in the database. This has
|
2019-12-05 20:49:56 -05:00
|
|
|
been changed to a more human-friendly "slug" string, which is essentially a simplified version of the choice's `label`.
|
|
|
|
|
2020-01-16 11:28:54 -05:00
|
|
|
For example, The site model's `status` field was previously represented as:
|
2019-12-05 20:49:56 -05:00
|
|
|
|
|
|
|
```json
|
|
|
|
"status": {
|
|
|
|
"value": 1,
|
|
|
|
"label": "Active"
|
|
|
|
},
|
|
|
|
```
|
|
|
|
|
2020-01-16 11:28:54 -05:00
|
|
|
In NetBox v2.7, it now looks like this:
|
2019-12-05 20:49:56 -05:00
|
|
|
|
|
|
|
```json
|
|
|
|
"status": {
|
|
|
|
"value": "active",
|
2020-01-16 11:28:54 -05:00
|
|
|
"label": "Active",
|
|
|
|
"id": 1
|
2019-12-05 20:49:56 -05:00
|
|
|
},
|
|
|
|
```
|
|
|
|
|
2020-01-16 11:28:54 -05:00
|
|
|
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.
|
2019-12-05 20:49:56 -05:00
|
|
|
|
2020-01-16 11:28:54 -05:00
|
|
|
Note that that all v2.7 releases will continue to accept the legacy integer values in write requests (`POST`, `PUT`, and
|
|
|
|
`PATCH`) to maintain backward compatibility. Additionally, the legacy numeric identifier is conveyed in the `id` field
|
|
|
|
for convenient reference as consumers adopt to the new string values. This behavior will be discontinued in NetBox v2.8.
|
2019-10-13 02:49:54 -04:00
|
|
|
|
2019-10-10 13:41:10 -04:00
|
|
|
## Enhancements
|
|
|
|
|
2020-01-16 09:38:23 -05:00
|
|
|
* [#33](https://github.com/netbox-community/netbox/issues/33) - Add ability to clone objects (pre-populate form fields)
|
2020-01-16 11:28:54 -05:00
|
|
|
* [#648](https://github.com/netbox-community/netbox/issues/648) - Pre-populate form fields when selecting "create and
|
|
|
|
add another"
|
2020-01-16 09:38:23 -05:00
|
|
|
* [#792](https://github.com/netbox-community/netbox/issues/792) - Add power port and power outlet types
|
|
|
|
* [#1865](https://github.com/netbox-community/netbox/issues/1865) - Add console port and console server port types
|
|
|
|
* [#2669](https://github.com/netbox-community/netbox/issues/2669) - Relax uniqueness constraint on device and VM names
|
|
|
|
* [#2902](https://github.com/netbox-community/netbox/issues/2902) - Replace `supervisord` with `systemd`
|
2020-01-16 11:28:54 -05:00
|
|
|
* [#3455](https://github.com/netbox-community/netbox/issues/3455) - Add tenant assignment to virtual machine clusters
|
|
|
|
* [#3520](https://github.com/netbox-community/netbox/issues/3520) - Add Jinja2 template support for graphs
|
|
|
|
* [#3525](https://github.com/netbox-community/netbox/issues/3525) - Enable IP address filtering using multiple address
|
|
|
|
parameters
|
|
|
|
* [#3564](https://github.com/netbox-community/netbox/issues/3564) - Add list views for all device components
|
2020-01-16 09:38:23 -05:00
|
|
|
* [#3538](https://github.com/netbox-community/netbox/issues/3538) - Introduce a REST API endpoint for executing custom
|
2019-12-11 17:22:41 -05:00
|
|
|
scripts
|
2020-01-16 09:38:23 -05:00
|
|
|
* [#3655](https://github.com/netbox-community/netbox/issues/3655) - Add `description` field to organizational models
|
|
|
|
* [#3664](https://github.com/netbox-community/netbox/issues/3664) - Enable applying configuration contexts by tags
|
2020-01-16 11:28:54 -05:00
|
|
|
* [#3706](https://github.com/netbox-community/netbox/issues/3706) - Increase `available_power` maximum value on
|
|
|
|
PowerFeed
|
2020-01-16 09:38:23 -05:00
|
|
|
* [#3731](https://github.com/netbox-community/netbox/issues/3731) - Change Graph.type to a ContentType foreign key field
|
|
|
|
* [#3801](https://github.com/netbox-community/netbox/issues/3801) - Use YAML for export of device types
|
2019-10-23 11:55:45 -04:00
|
|
|
|
2020-01-15 13:25:07 -05:00
|
|
|
## Bug Fixes
|
|
|
|
|
2020-01-16 09:38:23 -05:00
|
|
|
* [#3830](https://github.com/netbox-community/netbox/issues/3830) - Ensure deterministic ordering for all models
|
|
|
|
* [#3900](https://github.com/netbox-community/netbox/issues/3900) - Fix exception when deleting device types
|
|
|
|
* [#3914](https://github.com/netbox-community/netbox/issues/3914) - Fix interface filter field when unauthenticated
|
2020-01-16 11:28:54 -05:00
|
|
|
* [#3919](https://github.com/netbox-community/netbox/issues/3919) - Fix utilization graph extending out of bounds when
|
|
|
|
utilization > 100%
|
|
|
|
* [#3927](https://github.com/netbox-community/netbox/issues/3927) - Fix exception when deleting devices with secrets
|
|
|
|
assigned
|
|
|
|
* [#3930](https://github.com/netbox-community/netbox/issues/3930) - Fix API rendering of the `family` field for
|
|
|
|
aggregates
|
2020-01-15 13:25:07 -05:00
|
|
|
|
2020-01-09 14:53:18 -05:00
|
|
|
## Bug Fixes (From Beta)
|
|
|
|
|
2020-01-16 09:38:23 -05:00
|
|
|
* [#3868](https://github.com/netbox-community/netbox/issues/3868) - Fix creation of interfaces for virtual machines
|
|
|
|
* [#3878](https://github.com/netbox-community/netbox/issues/3878) - Fix database migration for cable status field
|
2020-01-09 14:53:18 -05:00
|
|
|
|
2019-10-23 11:55:45 -04:00
|
|
|
## API Changes
|
|
|
|
|
2019-12-11 17:22:41 -05:00
|
|
|
* Choice fields now use human-friendly strings for their values instead of integers (see
|
|
|
|
[#3569](https://github.com/netbox-community/netbox/issues/3569)).
|
2020-01-16 11:28:54 -05:00
|
|
|
* Introduced the `/api/extras/scripts/` endpoint for retrieving and executing custom scripts
|
2019-12-10 13:24:02 -05:00
|
|
|
* circuits.CircuitType: Added field `description`
|
2019-10-30 14:25:55 -04:00
|
|
|
* dcim.ConsolePort: Added field `type`
|
|
|
|
* dcim.ConsolePortTemplate: Added field `type`
|
|
|
|
* dcim.ConsoleServerPort: Added field `type`
|
|
|
|
* dcim.ConsoleServerPortTemplate: Added field `type`
|
2019-12-10 13:09:41 -05:00
|
|
|
* dcim.DeviceRole: Added field `description`
|
2019-12-05 20:49:56 -05:00
|
|
|
* dcim.PowerPort: Added field `type`
|
|
|
|
* dcim.PowerPortTemplate: Added field `type`
|
|
|
|
* dcim.PowerOutlet: Added field `type`
|
|
|
|
* dcim.PowerOutletTemplate: Added field `type`
|
2019-12-10 13:09:41 -05:00
|
|
|
* dcim.RackRole: Added field `description`
|
2020-01-10 11:53:29 -05:00
|
|
|
* extras.Graph: Added field `template_language` (to indicate `django` or `jinja2`)
|
2019-12-11 17:22:41 -05:00
|
|
|
* extras.Graph: The `type` field has been changed to a content type foreign key. Models are specified as
|
|
|
|
`<app>.<model>`; e.g. `dcim.site`.
|
2019-12-10 13:09:41 -05:00
|
|
|
* ipam.Role: Added field `description`
|
|
|
|
* secrets.SecretRole: Added field `description`
|
2019-10-23 11:55:45 -04:00
|
|
|
* virtualization.Cluster: Added field `tenant`
|