Skip to content

Commit 8707c44

Browse files
Merge pull request #17349 from netbox-community/feature
Move to v4.1
2 parents 0b120e6 + 16dfafa commit 8707c44

File tree

568 files changed

+61624
-44850
lines changed

Some content is hidden

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

568 files changed

+61624
-44850
lines changed

docs/configuration/graphql-api.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# GraphQL API Parameters
2+
3+
## GRAPHQL_ENABLED
4+
5+
!!! tip "Dynamic Configuration Parameter"
6+
7+
Default: True
8+
9+
Setting this to False will disable the GraphQL API.
10+
11+
---
12+
13+
## GRAPHQL_MAX_ALIASES
14+
15+
Default: 10
16+
17+
The maximum number of queries that a GraphQL API request may contain.

docs/configuration/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Some configuration parameters are primarily controlled via NetBox's admin interf
2525
* [`CUSTOM_VALIDATORS`](./data-validation.md#custom_validators)
2626
* [`DEFAULT_USER_PREFERENCES`](./default-values.md#default_user_preferences)
2727
* [`ENFORCE_GLOBAL_UNIQUE`](./miscellaneous.md#enforce_global_unique)
28-
* [`GRAPHQL_ENABLED`](./miscellaneous.md#graphql_enabled)
28+
* [`GRAPHQL_ENABLED`](./graphql-api.md#graphql_enabled)
2929
* [`JOB_RETENTION`](./miscellaneous.md#job_retention)
3030
* [`MAINTENANCE_MODE`](./miscellaneous.md#maintenance_mode)
3131
* [`MAPS_URL`](./miscellaneous.md#maps_url)

docs/configuration/miscellaneous.md

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -122,16 +122,6 @@ The maximum amount (in bytes) of uploaded data that will be held in memory befor
122122

123123
---
124124

125-
## GRAPHQL_ENABLED
126-
127-
!!! tip "Dynamic Configuration Parameter"
128-
129-
Default: True
130-
131-
Setting this to False will disable the GraphQL API.
132-
133-
---
134-
135125
## JOB_RETENTION
136126

137127
!!! tip "Dynamic Configuration Parameter"

docs/configuration/security.md

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,29 @@ A list of permitted URL schemes referenced when rendering links within NetBox. N
2020

2121
## AUTH_PASSWORD_VALIDATORS
2222

23-
This parameter acts as a pass-through for configuring Django's built-in password validators for local user accounts. If configured, these will be applied whenever a user's password is updated to ensure that it meets minimum criteria such as length or complexity. An example is provided below. For more detail on the available options, please see [the Django documentation](https://docs.djangoproject.com/en/stable/topics/auth/passwords/#password-validation).
23+
This parameter acts as a pass-through for configuring Django's built-in password validators for local user accounts. These rules are applied whenever a user's password is created or updated to ensure that it meets minimum criteria such as length or complexity. The default configuration is shown below.
2424

2525
```python
2626
AUTH_PASSWORD_VALIDATORS = [
2727
{
28-
'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
29-
'OPTIONS': {
30-
'min_length': 10,
31-
}
28+
"NAME": "django.contrib.auth.password_validation.MinimumLengthValidator",
29+
"OPTIONS": {
30+
"min_length": 12,
31+
},
32+
},
33+
{
34+
"NAME": "utilities.password_validation.AlphanumericPasswordValidator",
3235
},
3336
]
3437
```
3538

39+
The default configuration enforces the follow criteria:
40+
41+
* A password must be at least 12 characters in length.
42+
* A password must have at least one uppercase letter, one lowercase letter, and one numeric digit.
43+
44+
Although it is not recommended, the default validation rules can be disabled by setting `AUTH_PASSWORD_VALIDATORS = []` in the configuration file. For more detail on customizing password validation, please see [the Django documentation](https://docs.djangoproject.com/en/stable/topics/auth/passwords/#password-validation).
45+
3646
---
3747

3848
## CORS_ORIGIN_ALLOW_ALL

docs/configuration/system.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,19 @@ addresses (and [`DEBUG`](./development.md#debug) is true).
8787

8888
---
8989

90+
## ISOLATED_DEPLOYMENT
91+
92+
!!! info "This feature was introduced in NetBox v4.1."
93+
94+
Default: False
95+
96+
Set this configuration parameter to True for NetBox deployments which do not have Internet access. This will disable miscellaneous functionality which depends on access to the Internet.
97+
98+
!!! note
99+
If Internet access is available via a proxy, set [`HTTP_PROXIES`](#http_proxies) instead.
100+
101+
---
102+
90103
## JINJA2_FILTERS
91104

92105
Default: `{}`
@@ -143,7 +156,7 @@ LOGGING = {
143156

144157
## MEDIA_ROOT
145158

146-
Default: $INSTALL_ROOT/netbox/media/
159+
Default: `$INSTALL_ROOT/netbox/media/`
147160

148161
The file path to the location where media files (such as image attachments) are stored. By default, this is the `netbox/media/` directory within the base NetBox installation path.
149162

docs/customization/custom-fields.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ If a default value is specified for a selection field, it must exactly match one
7474

7575
An object or multi-object custom field can be used to refer to a particular NetBox object or objects as the "value" for a custom field. These custom fields must define an `object_type`, which determines the type of object to which custom field instances point.
7676

77+
By default, an object choice field will make all objects of that type available for selection in the drop-down. The list choices can be filtered to show only objects with certain values by providing a `query_params` dict in the Related Object Filter field, as a JSON value. More information about `query_params` can be found [here](./custom-scripts.md#objectvar).
78+
7779
## Custom Fields in Templates
7880

7981
Several features within NetBox, such as export templates and webhooks, utilize Jinja2 templating. For convenience, objects which support custom field assignment expose custom field data through the `cf` property. This is a bit cleaner than accessing custom field data through the actual field (`custom_field_data`).

docs/customization/custom-validation.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,6 @@ CUSTOM_VALIDATORS = {
8686

8787
#### Referencing Related Object Attributes
8888

89-
!!! info "This feature was introduced in NetBox v4.0."
90-
9189
The attributes of a related object can be referenced by specifying a dotted path. For example, to reference the name of a region to which a site is assigned, use `region.name`:
9290

9391
```python
@@ -104,8 +102,6 @@ CUSTOM_VALIDATORS = {
104102

105103
#### Validating Request Parameters
106104

107-
!!! info "This feature was introduced in NetBox v4.0."
108-
109105
In addition to validating object attributes, custom validators can also match against parameters of the current request (where available). For example, the following rule will permit only the user named "admin" to modify an object:
110106

111107
```json

docs/development/adding-models.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,6 @@ Add the relevant navigation menu items in `netbox/netbox/navigation/menu.py`.
7171
Create the following for each model:
7272

7373
* Detailed (full) model serializer in `api/serializers.py`
74-
* Nested serializer in `api/nested_serializers.py`
7574
* API view in `api/views.py`
7675
* Endpoint route in `api/urls.py`
7776

docs/development/extending-models.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ If you're adding a relational field (e.g. `ForeignKey`) and intend to include th
5050
5151
## 5. Update API serializer
5252
53-
Extend the model's API serializer in `<app>.api.serializers` to include the new field. In most cases, it will not be necessary to also extend the nested serializer, which produces a minimal representation of the model.
53+
Extend the model's API serializer in `<app>.api.serializers` to include the new field.
5454
5555
## 6. Add fields to forms
5656

docs/development/models.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Depending on its classification, each NetBox model may support various features
1818
| [Custom links](../customization/custom-links.md) | `CustomLinksMixin` | `custom_links` | These models support the assignment of custom links |
1919
| [Custom validation](../customization/custom-validation.md) | `CustomValidationMixin` | - | Supports the enforcement of custom validation rules |
2020
| [Export templates](../customization/export-templates.md) | `ExportTemplatesMixin` | `export_templates` | Users can create custom export templates for these models |
21-
| [Job results](../features/background-jobs.md) | `JobsMixin` | `jobs` | Users can create custom export templates for these models |
21+
| [Job results](../features/background-jobs.md) | `JobsMixin` | `jobs` | Background jobs can be scheduled for these models |
2222
| [Journaling](../features/journaling.md) | `JournalingMixin` | `journaling` | These models support persistent historical commentary |
2323
| [Synchronized data](../integrations/synchronized-data.md) | `SyncedDataMixin` | `synced_data` | Certain model data can be automatically synchronized from a remote data source |
2424
| [Tagging](../models/extras/tag.md) | `TagsMixin` | `tags` | The models can be tagged with user-defined tags |
@@ -34,7 +34,9 @@ These are considered the "core" application models which are used to model netwo
3434
* [circuits.Provider](../models/circuits/provider.md)
3535
* [circuits.ProviderAccount](../models/circuits/provideraccount.md)
3636
* [circuits.ProviderNetwork](../models/circuits/providernetwork.md)
37+
* [core.DataFile](../models/core/datafile.md)
3738
* [core.DataSource](../models/core/datasource.md)
39+
* [core.Job](../models/core/job.md)
3840
* [dcim.Cable](../models/dcim/cable.md)
3941
* [dcim.Device](../models/dcim/device.md)
4042
* [dcim.DeviceType](../models/dcim/devicetype.md)
@@ -44,12 +46,14 @@ These are considered the "core" application models which are used to model netwo
4446
* [dcim.PowerPanel](../models/dcim/powerpanel.md)
4547
* [dcim.Rack](../models/dcim/rack.md)
4648
* [dcim.RackReservation](../models/dcim/rackreservation.md)
49+
* [dcim.RackType](../models/dcim/racktype.md)
4750
* [dcim.Site](../models/dcim/site.md)
4851
* [dcim.VirtualChassis](../models/dcim/virtualchassis.md)
4952
* [dcim.VirtualDeviceContext](../models/dcim/virtualdevicecontext.md)
5053
* [ipam.Aggregate](../models/ipam/aggregate.md)
5154
* [ipam.ASN](../models/ipam/asn.md)
5255
* [ipam.FHRPGroup](../models/ipam/fhrpgroup.md)
56+
* [ipam.FHRPGroupAssignment](../models/ipam/fhrpgroupassignment.md)
5357
* [ipam.IPAddress](../models/ipam/ipaddress.md)
5458
* [ipam.IPRange](../models/ipam/iprange.md)
5559
* [ipam.Prefix](../models/ipam/prefix.md)
@@ -76,6 +80,7 @@ These are considered the "core" application models which are used to model netwo
7680

7781
Organization models are used to organize and classify primary models.
7882

83+
* [circuits.CircuitGroup](../models/circuits/circuitgroup.md)
7984
* [circuits.CircuitType](../models/circuits/circuittype.md)
8085
* [dcim.DeviceRole](../models/dcim/devicerole.md)
8186
* [dcim.Manufacturer](../models/dcim/manufacturer.md)
@@ -88,6 +93,7 @@ Organization models are used to organize and classify primary models.
8893
* [tenancy.ContactRole](../models/tenancy/contactrole.md)
8994
* [virtualization.ClusterGroup](../models/virtualization/clustergroup.md)
9095
* [virtualization.ClusterType](../models/virtualization/clustertype.md)
96+
* [vpn.TunnelGroup](../models/vpn/tunnelgroup.md)
9197

9298
### Nested Group Models
9399

@@ -131,3 +137,10 @@ These function as templates to effect the replication of device and virtual mach
131137
* [dcim.PowerOutletTemplate](../models/dcim/poweroutlettemplate.md)
132138
* [dcim.PowerPortTemplate](../models/dcim/powerporttemplate.md)
133139
* [dcim.RearPortTemplate](../models/dcim/rearporttemplate.md)
140+
141+
### Connection Models
142+
143+
Connection models are used to model the connections, or connection endpoints between models.
144+
145+
* [circuits.CircuitTermination](../models/circuits/circuittermination.md)
146+
* [vpn.TunnelTermination](../models/vpn/tunneltermination.md)

0 commit comments

Comments
 (0)