!!! warning
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.
NetBox now supports the import of device types and related component templates using a YAML- or JSON-based definition. For example, the following will create a new device type with four network interfaces, two power ports, and a console port:
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
This new functionality replaces the existing CSV-based import form, which did not allow for component template import.
NetBox now supports the bulk import of device components such as console ports, power ports, and interfaces. Device components can be imported in CSV-format.
In prior releases, the only option for storing uploaded file (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 via the
django-storages package. These include:
To enable remote file storage, first install django-storages:
pip install django-storages
Then, set the appropriate storage backend and its configuration in configuration.py. Here's an example using Amazon
S3:
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',
}
The topology maps feature has been removed to help focus NetBox development efforts.
v2.6.0 introduced caching and added the CACHE_DATABASE option to the existing REDIS database configuration section.
This did not however, allow for using two different Redis connections for the seperate caching and webhooks features.
This change separates the Redis connection configurations in the REDIS section into distinct webhooks and caching subsections.
This requires modification of the REDIS section of the configuration.py file as follows:
Old Redis configuration:
REDIS = {
'HOST': 'localhost',
'PORT': 6379,
'PASSWORD': '',
'DATABASE': 0,
'CACHE_DATABASE': 1,
'DEFAULT_TIMEOUT': 300,
'SSL': False,
}
New Redis configuration:
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,
}
}
Note that CACHE_DATABASE 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 and/or databases if desired. Full connection
details are required in both sections, even if they are the same.
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.
NetBox's REST API presents fields which reference a particular choice as a dictionary with two keys: value and
label. In previous versions, value was an integer which represented the particular choice in the database. This has
been changed to a more human-friendly "slug" string, which is essentially a simplified version of the choice's label.
For example, The site status field was previously represented as:
"status": {
"value": 1,
"label": "Active"
},
Beginning with v2.7.0, it now looks like this:
"status": {
"value": "active",
"label": "Active"
},
This change allows for much more intuitive representation of values, and obviates the need for API consumers to maintain a mapping of static integer values.
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. This behavior will be discontinued beginning in v2.8.0.
supervisord with systemddescription field to organizational models/api/extras/scripts/ endpoint for retrieving and executing custom scriptsdescriptiontypetypetypetypedescriptiontypetypetypetypedescriptiontype field has been changed to a content type foreign key. Models are specified as <app>.<model>; e.g. dcim.site.descriptiondescriptiontenant