Skip to content

Commit

Permalink
Merge pull request #15975 from netbox-community/develop
Browse files Browse the repository at this point in the history
Release v4.0.0
  • Loading branch information
jeremystretch authored May 6, 2024
2 parents be903a6 + fce54f3 commit 91f156d
Show file tree
Hide file tree
Showing 1,146 changed files with 228,986 additions and 57,960 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ body:
attributes:
label: NetBox Version
description: What version of NetBox are you currently running?
placeholder: v3.7.8
placeholder: v4.0.0
validations:
required: true
- type: dropdown
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ body:
attributes:
label: NetBox version
description: What version of NetBox are you currently running?
placeholder: v3.7.8
placeholder: v4.0.0
validations:
required: true
- type: dropdown
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ jobs:
NETBOX_CONFIGURATION: netbox.configuration_testing
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11']
node-version: ['14.x']
python-version: ['3.10', '3.11', '3.12']
node-version: ['18.x']
services:
redis:
image: redis
Expand Down
4 changes: 2 additions & 2 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
version: 2
build:
os: ubuntu-20.04
os: ubuntu-22.04
tools:
python: "3.9"
python: "3.12"
mkdocs:
configuration: mkdocs.yml
python:
Expand Down
37 changes: 19 additions & 18 deletions base_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
# HTML sanitizer
# https://github.com/mozilla/bleach/blob/main/CHANGES
bleach

# The Python web framework on which NetBox is built
# https://docs.djangoproject.com/en/stable/releases/
Django<5.0
Django<5.1

# Django middleware which permits cross-domain API requests
# https://github.com/adamchainz/django-cors-headers/blob/main/CHANGELOG.rst
Expand All @@ -18,14 +14,13 @@ django-debug-toolbar
# https://github.com/carltongibson/django-filter/blob/main/CHANGES.rst
django-filter

# Django debug toolbar extension with support for GraphiQL
# https://github.com/flavors/django-graphiql-debug-toolbar/blob/main/CHANGES.rst
django-graphiql-debug-toolbar
# HTMX utilities for Django
# https://django-htmx.readthedocs.io/en/latest/changelog.html
django-htmx

# Modified Preorder Tree Traversal (recursive nesting of objects)
# Pinned to 0.14.0; 0.15.0 requires Python 3.9+
# https://github.com/django-mptt/django-mptt/blob/main/CHANGELOG.rst
django-mptt==0.14.0
django-mptt

# Context managers for PostgreSQL advisory locks
# https://github.com/Xof/django-pglocks/blob/master/CHANGES.txt
Expand Down Expand Up @@ -61,8 +56,7 @@ django-timezone-field

# A REST API framework for Django projects
# https://www.django-rest-framework.org/community/release-notes/
# Pinned to 3.14 for NetBox v3.7
djangorestframework<3.15
djangorestframework

# Sane and flexible OpenAPI 3 schema generation for Django REST framework.
# https://github.com/tfranzel/drf-spectacular/blob/master/CHANGELOG.rst
Expand All @@ -76,11 +70,6 @@ drf-spectacular-sidecar
# https://github.com/kurtmckee/feedparser/blob/develop/CHANGELOG.rst
feedparser

# Django wrapper for Graphene (GraphQL support)
# https://github.com/graphql-python/graphene-django/releases
# Pinned to v3.0.0 for GraphiQL UI issue (see #12762)
graphene_django==3.0.0

# WSGI HTTP server
# https://docs.gunicorn.org/en/latest/news.html
gunicorn
Expand Down Expand Up @@ -109,6 +98,10 @@ mkdocstrings[python-legacy]
# https://github.com/netaddr/netaddr/blob/master/CHANGELOG.rst
netaddr

# Python bindings to the ammonia HTML sanitization library.
# https://github.com/messense/nh3
nh3

# Fork of PIL (Python Imaging Library) for image processing
# https://github.com/python-pillow/Pillow/blob/main/CHANGES.rst
Pillow
Expand All @@ -133,8 +126,16 @@ social-auth-core
# https://github.com/python-social-auth/social-app-django/blob/master/CHANGELOG.md
social-auth-app-django

# Strawberry GraphQL
# https://github.com/strawberry-graphql/strawberry/blob/main/CHANGELOG.md
strawberry-graphql

# Strawberry GraphQL Django extension
# https://github.com/strawberry-graphql/strawberry-django/blob/main/CHANGELOG.md
strawberry-graphql-django

# SVG image rendering (used for rack elevations)
# hhttps://github.com/mozman/svgwrite/blob/master/NEWS.rst
# https://github.com/mozman/svgwrite/blob/master/NEWS.rst
svgwrite

# Tabular dataset library (for table-based exports)
Expand Down
4 changes: 4 additions & 0 deletions contrib/netbox.service
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,12 @@ Group=netbox
PIDFile=/var/tmp/netbox.pid
WorkingDirectory=/opt/netbox

# Remove the following line if using uWSGI instead of Gunicorn
ExecStart=/opt/netbox/venv/bin/gunicorn --pid /var/tmp/netbox.pid --pythonpath /opt/netbox/netbox --config /opt/netbox/gunicorn.py netbox.wsgi

# Uncomment the following line if using uWSGI instead of Gunicorn
#ExecStart=/opt/netbox/venv/bin/uwsgi --ini /opt/netbox/uwsgi.ini

Restart=on-failure
RestartSec=30
PrivateTmp=true
Expand Down
10 changes: 10 additions & 0 deletions contrib/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,20 @@ server {
}

location / {
# Remove these lines if using uWSGI instead of Gunicorn
proxy_pass http://127.0.0.1:8001;
proxy_set_header X-Forwarded-Host $http_host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;

# Uncomment these lines if using uWSGI instead of Gunicorn
# include uwsgi_params;
# uwsgi_pass 127.0.0.1:8001;
# uwsgi_param Host $host;
# uwsgi_param X-Real-IP $remote_addr;
# uwsgi_param X-Forwarded-For $proxy_add_x_forwarded_for;
# uwsgi_param X-Forwarded-Proto $http_x_forwarded_proto;

}
}

Expand Down
18 changes: 18 additions & 0 deletions contrib/uwsgi.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[uwsgi]
; bind to the specified UNIX/TCP socket and port (usually localhost)
socket = 127.0.0.1:8001

; fail to start if any parameter in the configuration file isn’t explicitly understood by uWSGI.
strict = true

; re-spawn and pre-fork workers
master = true

; clear environment on exit
vacuum = true

; exit if no app can be loaded
need-app = true

; do not use multiple interpreters
single-interpreter = true
2 changes: 1 addition & 1 deletion docs/administration/authentication/microsoft-azure-ad.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ You should be redirected to Microsoft's authentication portal. Enter the usernam

If successful, you will be redirected back to the NetBox UI, and will be logged in as the AD user. You can verify this by navigating to your profile (using the button at top right).

This user account has been replicated locally to NetBox, and can now be assigned groups and permissions by navigating to Admin > Permissions.
This user account has been replicated locally to NetBox, and can now be assigned groups and permissions.

## Troubleshooting

Expand Down
2 changes: 1 addition & 1 deletion docs/administration/authentication/okta.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,4 @@ You should be redirected to Okta's authentication portal. Enter the username/ema

If successful, you will be redirected back to the NetBox UI, and will be logged in as the Okta user. You can verify this by navigating to your profile (using the button at top right).

This user account has been replicated locally to NetBox, and can now be assigned groups and permissions by navigating to Admin > Permissions.
This user account has been replicated locally to NetBox, and can now be assigned groups and permissions.
2 changes: 1 addition & 1 deletion docs/administration/authentication/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

Local user accounts and groups can be created in NetBox under the "Authentication" section in the "Admin" menu. This section is available only to users with the "staff" permission enabled.

At a minimum, each user account must have a username and password set. User accounts may also denote a first name, last name, and email address. [Permissions](../permissions.md) may also be assigned to users and/or groups under Admin > Permissions.
At a minimum, each user account must have a username and password set. User accounts may also denote a first name, last name, and email address. [Permissions](../permissions.md) may also be assigned to individual users and/or groups as needed.

## Remote Authentication

Expand Down
2 changes: 0 additions & 2 deletions docs/administration/permissions.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,6 @@ The `$user` token can be used only as a constraint value, or as an item within a

### Default Permissions

!!! info "This feature was introduced in NetBox v3.6."

While permissions are typically assigned to specific groups and/or users, it is also possible to define a set of default permissions that are applied to _all_ authenticated users. This is done using the [`DEFAULT_PERMISSIONS`](../configuration/security.md#default_permissions) configuration parameter. Note that statically configuring permissions for specific users or groups is **not** supported.

### Example Constraint Definitions
Expand Down
23 changes: 0 additions & 23 deletions docs/configuration/date-time.md

This file was deleted.

23 changes: 8 additions & 15 deletions docs/configuration/miscellaneous.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@ This defines custom content to be displayed on the login page above the login fo

!!! tip "Dynamic Configuration Parameter"

!!! note
This parameter was added in NetBox v3.5.

This adds a banner to the top of every page when maintenance mode is enabled. HTML is allowed.

---
Expand Down Expand Up @@ -99,6 +96,14 @@ The maximum size (in bytes) of an incoming HTTP request (i.e. `GET` or `POST` da

---

## DJANGO_ADMIN_ENABLED

Default: False

Setting this to True installs the `django.contrib.admin` app and enables the [Django admin UI](https://docs.djangoproject.com/en/5.0/ref/contrib/admin/). This may be necessary to support older plugins which do not integrate with the native NetBox interface.

---

## ENFORCE_GLOBAL_UNIQUE

!!! tip "Dynamic Configuration Parameter"
Expand All @@ -107,9 +112,6 @@ Default: True

By default, NetBox will prevent the creation of duplicate prefixes and IP addresses in the global table (that is, those which are not assigned to any VRF). This validation can be disabled by setting `ENFORCE_GLOBAL_UNIQUE` to False.

!!! info "Changed in v3.7"
The default value for this parameter was changed from False to True in NetBox v3.7.

---

## FILE_UPLOAD_MAX_MEMORY_SIZE
Expand All @@ -134,9 +136,6 @@ Setting this to False will disable the GraphQL API.

!!! tip "Dynamic Configuration Parameter"

!!! note
This parameter was renamed from `JOBRESULT_RETENTION` in NetBox v3.5.

Default: 90

The number of days to retain job results (scripts and reports). Set this to `0` to retain job results in the database indefinitely.
Expand Down Expand Up @@ -231,9 +230,6 @@ The maximum execution time of a background task (such as running a custom script

## RQ_RETRY_INTERVAL

!!! note
This parameter was added in NetBox v3.5.

Default: `60`

This parameter controls how frequently a failed job is retried, up to the maximum number of times specified by `RQ_RETRY_MAX`. This must be either an integer specifying the number of seconds to wait between successive attempts, or a list of such values. For example, `[60, 300, 3600]` will retry the task after 1 minute, 5 minutes, and 1 hour.
Expand All @@ -242,9 +238,6 @@ This parameter controls how frequently a failed job is retried, up to the maximu

## RQ_RETRY_MAX

!!! note
This parameter was added in NetBox v3.5.

Default: `0` (retries disabled)

The maximum number of times a background task will be retried before being marked as failed.
2 changes: 0 additions & 2 deletions docs/configuration/security.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,6 @@ CSRF_TRUSTED_ORIGINS = (

## DEFAULT_PERMISSIONS

!!! info "This parameter was introduced in NetBox v3.6."

Default:

```python
Expand Down
14 changes: 6 additions & 8 deletions docs/configuration/system.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,6 @@ Email is sent from NetBox only for critical events or if configured for [logging

---

## ENABLE_LOCALIZATION

Default: False

Determines if localization features are enabled or not. This should only be enabled for development or testing purposes as netbox is not yet fully localized. Turning this on will localize numeric and date formats (overriding any configured [system defaults](./date-time.md#date-and-time-formatting)) based on the browser locale as well as translate certain strings from third party modules.

---

## HTTP_PROXIES

Default: None
Expand Down Expand Up @@ -200,3 +192,9 @@ A dictionary of configuration parameters for the storage backend configured as `
If `STORAGE_BACKEND` is not defined, this setting will be ignored.

---

## TIME_ZONE

Default: UTC

The time zone NetBox will use when dealing with dates and times. It is recommended to use UTC time unless you have a specific need to use a local time zone. Please see the [list of available time zones](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones).
2 changes: 0 additions & 2 deletions docs/customization/custom-fields.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,6 @@ This parameter has no effect on the API representation of custom field data.

### Visibility & Editing

!!! info "This feature was improved in NetBox v3.7."

When creating a custom field, users can control the conditions under which it may be displayed and edited within the NetBox user interface. The following choices are available for controlling the display of a custom field on an object:

* **Always** (default): The custom field is included when viewing an object.
Expand Down
Loading

0 comments on commit 91f156d

Please sign in to comment.