Skip to content

Commit 7b90481

Browse files
Merge pull request #14636 from netbox-community/develop
Release v3.7.0
2 parents 0c06725 + d99e651 commit 7b90481

File tree

400 files changed

+81924
-3878
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

400 files changed

+81924
-3878
lines changed

.github/ISSUE_TEMPLATE/bug_report.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ body:
2323
attributes:
2424
label: NetBox Version
2525
description: What version of NetBox are you currently running?
26-
placeholder: v3.6.9
26+
placeholder: v3.7.0
2727
validations:
2828
required: true
2929
- type: dropdown

.github/ISSUE_TEMPLATE/feature_request.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ body:
1414
attributes:
1515
label: NetBox version
1616
description: What version of NetBox are you currently running?
17-
placeholder: v3.6.9
17+
placeholder: v3.7.0
1818
validations:
1919
required: true
2020
- type: dropdown

base_requirements.txt

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,7 @@ django-tables2
5353

5454
# User-defined tags for objects
5555
# https://github.com/jazzband/django-taggit/blob/master/CHANGELOG.rst
56-
# TODO: Upgrade to v5.0 for NetBox v3.7 beta
57-
django-taggit<5.0
56+
django-taggit
5857

5958
# A Django field for representing time zones
6059
# https://github.com/mfogel/django-timezone-field/
@@ -90,9 +89,8 @@ gunicorn
9089
Jinja2
9190

9291
# Simple markup language for rendering HTML
93-
# https://python-markdown.github.io/change_log/
94-
# mkdocs currently requires Markdown v3.3
95-
Markdown<3.4
92+
# https://python-markdown.github.io/changelog/
93+
Markdown
9694

9795
# File inclusion plugin for Python-Markdown
9896
# https://github.com/cmacmackin/markdown-include
@@ -126,10 +124,6 @@ PyYAML
126124
# https://github.com/psf/requests/blob/main/HISTORY.md
127125
requests
128126

129-
# Sentry SDK
130-
# https://github.com/getsentry/sentry-python/blob/master/CHANGELOG.md
131-
sentry-sdk
132-
133127
# Social authentication framework
134128
# https://github.com/python-social-auth/social-core/blob/master/CHANGELOG.md
135129
social-auth-core

docs/administration/error-reporting.md

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -4,27 +4,15 @@
44

55
### Enabling Error Reporting
66

7-
NetBox supports native integration with [Sentry](https://sentry.io/) for automatic error reporting. To enable this functionality, simply set `SENTRY_ENABLED` to True in `configuration.py`. Errors will be sent to a Sentry ingestor maintained by the NetBox team for analysis.
8-
9-
```python
10-
SENTRY_ENABLED = True
11-
```
12-
13-
### Using a Custom DSN
14-
15-
If you prefer instead to use your own Sentry ingestor, you'll need to first create a new project under your Sentry account to represent your NetBox deployment and obtain its corresponding data source name (DSN). This looks like a URL similar to the example below:
16-
17-
```
18-
19-
```
20-
21-
Once you have obtained a DSN, configure Sentry in NetBox's `configuration.py` file with the following parameters:
7+
NetBox supports native integration with [Sentry](https://sentry.io/) for automatic error reporting. To enable this functionality, set `SENTRY_ENABLED` to True and define your unique [data source name (DSN)](https://docs.sentry.io/product/sentry-basics/concepts/dsn-explainer/) in `configuration.py`.
228

239
```python
2410
SENTRY_ENABLED = True
2511
SENTRY_DSN = "https://[email protected]/0"
2612
```
2713

14+
Setting `SENTRY_ENABLED` to False will disable the Sentry integration.
15+
2816
### Assigning Tags
2917

3018
You can optionally attach one or more arbitrary tags to the outgoing error reports if desired by setting the `SENTRY_TAGS` parameter:

docs/configuration/data-validation.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,3 +87,24 @@ The following colors are supported:
8787
* `gray`
8888
* `black`
8989
* `white`
90+
91+
---
92+
93+
## PROTECTION_RULES
94+
95+
!!! tip "Dynamic Configuration Parameter"
96+
97+
This is a mapping of models to [custom validators](../customization/custom-validation.md) against which an object is evaluated immediately prior to its deletion. If validation fails, the object is not deleted. An example is provided below:
98+
99+
```python
100+
PROTECTION_RULES = {
101+
"dcim.site": [
102+
{
103+
"status": {
104+
"eq": "decommissioning"
105+
}
106+
},
107+
"my_plugin.validators.Validator1",
108+
]
109+
}
110+
```

docs/configuration/error-reporting.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@ Default: False
1818

1919
Set to True to enable automatic error reporting via [Sentry](https://sentry.io/).
2020

21+
!!! note
22+
The `sentry-sdk` Python package is required to enable Sentry integration.
23+
2124
---
2225

2326
## SENTRY_SAMPLE_RATE

docs/configuration/miscellaneous.md

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,17 @@ changes in the database indefinitely.
8080

8181
---
8282

83+
## CHANGELOG_SKIP_EMPTY_CHANGES
84+
85+
Default: True
86+
87+
If enabled, a change log record will not be created when an object is updated without any changes to its existing field values.
88+
89+
!!! note
90+
The object's `last_updated` field will always reflect the time of the most recent update, regardless of this parameter.
91+
92+
---
93+
8394
## DATA_UPLOAD_MAX_MEMORY_SIZE
8495

8596
Default: `2621440` (2.5 MB)
@@ -92,9 +103,12 @@ The maximum size (in bytes) of an incoming HTTP request (i.e. `GET` or `POST` da
92103

93104
!!! tip "Dynamic Configuration Parameter"
94105

95-
Default: False
106+
Default: True
107+
108+
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.
96109

97-
By default, NetBox will permit users to create duplicate prefixes and IP addresses in the global table (that is, those which are not assigned to any VRF). This behavior can be disabled by setting `ENFORCE_GLOBAL_UNIQUE` to True.
110+
!!! info "Changed in v3.7"
111+
The default value for this parameter was changed from False to True in NetBox v3.7.
98112

99113
---
100114

docs/configuration/required-parameters.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,7 @@ DATABASE = {
5959

6060
## REDIS
6161

62-
[Redis](https://redis.io/) is an in-memory data store similar to memcached. While Redis has been an optional component of
63-
NetBox since the introduction of webhooks in version 2.4, it is required starting in 2.6 to support NetBox's caching
64-
functionality (as well as other planned features). In 2.7, the connection settings were broken down into two sections for
65-
task queuing and caching, allowing the user to connect to different Redis instances/databases per feature.
62+
[Redis](https://redis.io/) is a lightweight in-memory data store similar to memcached. NetBox employs Redis for background task queuing and other features.
6663

6764
Redis is configured using a configuration setting similar to `DATABASE` and these settings are the same for both of the `tasks` and `caching` subsections:
6865

@@ -81,15 +78,15 @@ REDIS = {
8178
'tasks': {
8279
'HOST': 'redis.example.com',
8380
'PORT': 1234,
84-
'USERNAME': 'netbox'
81+
'USERNAME': 'netbox',
8582
'PASSWORD': 'foobar',
8683
'DATABASE': 0,
8784
'SSL': False,
8885
},
8986
'caching': {
9087
'HOST': 'localhost',
9188
'PORT': 6379,
92-
'USERNAME': ''
89+
'USERNAME': '',
9390
'PASSWORD': '',
9491
'DATABASE': 1,
9592
'SSL': False,

docs/customization/custom-fields.md

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,22 @@ Related custom fields can be grouped together within the UI by assigning each th
4040

4141
This parameter has no effect on the API representation of custom field data.
4242

43-
### Visibility
43+
### Visibility & Editing
4444

45-
When creating a custom field, there are three options for UI visibility. These control how and whether the custom field is displayed within the NetBox UI.
45+
!!! info "This feature was improved in NetBox v3.7."
4646

47-
* **Read/write** (default): The custom field is included when viewing and editing objects.
48-
* **Read-only**: The custom field is displayed when viewing an object, but it cannot be edited via the UI. (It will appear in the form as a read-only field.)
47+
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:
48+
49+
* **Always** (default): The custom field is included when viewing an object.
50+
* **If Set**: The custom field is included only if a value has been defined for the object.
4951
* **Hidden**: The custom field will never be displayed within the UI. This option is recommended for fields which are not intended for use by human users.
5052

53+
Additionally, the following options are available for controlling whether custom field values can be altered within the NetBox UI:
54+
55+
* **Yes** (default): The custom field's value may be modified when editing an object.
56+
* **No**: The custom field is displayed for reference when editing an object, but its value may not be modified.
57+
* **Hidden**: The custom field is not displayed when editing an object.
58+
5159
Note that this setting has no impact on the REST or GraphQL APIs: Custom field data will always be available via either API.
5260

5361
### Validation

docs/customization/custom-validation.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ The `CustomValidator` class supports several validation types:
2626
* `regex`: Application of a [regular expression](https://en.wikipedia.org/wiki/Regular_expression)
2727
* `required`: A value must be specified
2828
* `prohibited`: A value must _not_ be specified
29+
* `eq`: A value must be equal to the specified value
30+
* `neq`: A value must _not_ be equal to the specified value
2931

3032
The `min` and `max` types should be defined for numeric values, whereas `min_length`, `max_length`, and `regex` are suitable for character strings (text values). The `required` and `prohibited` validators may be used for any field, and should be passed a value of `True`.
3133

0 commit comments

Comments
 (0)