Skip to content

Commit

Permalink
Merge pull request #17350 from netbox-community/develop
Browse files Browse the repository at this point in the history
Release v4.1.0
  • Loading branch information
jeremystretch authored Sep 3, 2024
2 parents 0b120e6 + 9cfb3bf commit 7bc0d34
Show file tree
Hide file tree
Showing 570 changed files with 61,541 additions and 44,978 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: v4.0.11
placeholder: v4.1.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: v4.0.11
placeholder: v4.1.0
validations:
required: true
- type: dropdown
Expand Down
17 changes: 17 additions & 0 deletions docs/configuration/graphql-api.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# GraphQL API Parameters

## GRAPHQL_ENABLED

!!! tip "Dynamic Configuration Parameter"

Default: True

Setting this to False will disable the GraphQL API.

---

## GRAPHQL_MAX_ALIASES

Default: 10

The maximum number of queries that a GraphQL API request may contain.
2 changes: 1 addition & 1 deletion docs/configuration/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ Some configuration parameters are primarily controlled via NetBox's admin interf
* [`CUSTOM_VALIDATORS`](./data-validation.md#custom_validators)
* [`DEFAULT_USER_PREFERENCES`](./default-values.md#default_user_preferences)
* [`ENFORCE_GLOBAL_UNIQUE`](./miscellaneous.md#enforce_global_unique)
* [`GRAPHQL_ENABLED`](./miscellaneous.md#graphql_enabled)
* [`GRAPHQL_ENABLED`](./graphql-api.md#graphql_enabled)
* [`JOB_RETENTION`](./miscellaneous.md#job_retention)
* [`MAINTENANCE_MODE`](./miscellaneous.md#maintenance_mode)
* [`MAPS_URL`](./miscellaneous.md#maps_url)
Expand Down
10 changes: 0 additions & 10 deletions docs/configuration/miscellaneous.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,16 +122,6 @@ The maximum amount (in bytes) of uploaded data that will be held in memory befor

---

## GRAPHQL_ENABLED

!!! tip "Dynamic Configuration Parameter"

Default: True

Setting this to False will disable the GraphQL API.

---

## JOB_RETENTION

!!! tip "Dynamic Configuration Parameter"
Expand Down
20 changes: 15 additions & 5 deletions docs/configuration/security.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,29 @@ A list of permitted URL schemes referenced when rendering links within NetBox. N

## AUTH_PASSWORD_VALIDATORS

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).
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.

```python
AUTH_PASSWORD_VALIDATORS = [
{
'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
'OPTIONS': {
'min_length': 10,
}
"NAME": "django.contrib.auth.password_validation.MinimumLengthValidator",
"OPTIONS": {
"min_length": 12,
},
},
{
"NAME": "utilities.password_validation.AlphanumericPasswordValidator",
},
]
```

The default configuration enforces the follow criteria:

* A password must be at least 12 characters in length.
* A password must have at least one uppercase letter, one lowercase letter, and one numeric digit.

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).

---

## CORS_ORIGIN_ALLOW_ALL
Expand Down
15 changes: 14 additions & 1 deletion docs/configuration/system.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,19 @@ addresses (and [`DEBUG`](./development.md#debug) is true).

---

## ISOLATED_DEPLOYMENT

!!! info "This feature was introduced in NetBox v4.1."

Default: False

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.

!!! note
If Internet access is available via a proxy, set [`HTTP_PROXIES`](#http_proxies) instead.

---

## JINJA2_FILTERS

Default: `{}`
Expand Down Expand Up @@ -143,7 +156,7 @@ LOGGING = {

## MEDIA_ROOT

Default: $INSTALL_ROOT/netbox/media/
Default: `$INSTALL_ROOT/netbox/media/`

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.

Expand Down
2 changes: 2 additions & 0 deletions docs/customization/custom-fields.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,8 @@ If a default value is specified for a selection field, it must exactly match one

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.

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).

## Custom Fields in Templates

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`).
Expand Down
4 changes: 0 additions & 4 deletions docs/customization/custom-validation.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,6 @@ CUSTOM_VALIDATORS = {

#### Referencing Related Object Attributes

!!! info "This feature was introduced in NetBox v4.0."

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`:

```python
Expand All @@ -104,8 +102,6 @@ CUSTOM_VALIDATORS = {

#### Validating Request Parameters

!!! info "This feature was introduced in NetBox v4.0."

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:

```json
Expand Down
1 change: 0 additions & 1 deletion docs/development/adding-models.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ Add the relevant navigation menu items in `netbox/netbox/navigation/menu.py`.
Create the following for each model:

* Detailed (full) model serializer in `api/serializers.py`
* Nested serializer in `api/nested_serializers.py`
* API view in `api/views.py`
* Endpoint route in `api/urls.py`

Expand Down
2 changes: 1 addition & 1 deletion docs/development/extending-models.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ If you're adding a relational field (e.g. `ForeignKey`) and intend to include th
## 5. Update API serializer
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.
Extend the model's API serializer in `<app>.api.serializers` to include the new field.
## 6. Add fields to forms
Expand Down
15 changes: 14 additions & 1 deletion docs/development/models.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Depending on its classification, each NetBox model may support various features
| [Custom links](../customization/custom-links.md) | `CustomLinksMixin` | `custom_links` | These models support the assignment of custom links |
| [Custom validation](../customization/custom-validation.md) | `CustomValidationMixin` | - | Supports the enforcement of custom validation rules |
| [Export templates](../customization/export-templates.md) | `ExportTemplatesMixin` | `export_templates` | Users can create custom export templates for these models |
| [Job results](../features/background-jobs.md) | `JobsMixin` | `jobs` | Users can create custom export templates for these models |
| [Job results](../features/background-jobs.md) | `JobsMixin` | `jobs` | Background jobs can be scheduled for these models |
| [Journaling](../features/journaling.md) | `JournalingMixin` | `journaling` | These models support persistent historical commentary |
| [Synchronized data](../integrations/synchronized-data.md) | `SyncedDataMixin` | `synced_data` | Certain model data can be automatically synchronized from a remote data source |
| [Tagging](../models/extras/tag.md) | `TagsMixin` | `tags` | The models can be tagged with user-defined tags |
Expand All @@ -34,7 +34,9 @@ These are considered the "core" application models which are used to model netwo
* [circuits.Provider](../models/circuits/provider.md)
* [circuits.ProviderAccount](../models/circuits/provideraccount.md)
* [circuits.ProviderNetwork](../models/circuits/providernetwork.md)
* [core.DataFile](../models/core/datafile.md)
* [core.DataSource](../models/core/datasource.md)
* [core.Job](../models/core/job.md)
* [dcim.Cable](../models/dcim/cable.md)
* [dcim.Device](../models/dcim/device.md)
* [dcim.DeviceType](../models/dcim/devicetype.md)
Expand All @@ -44,12 +46,14 @@ These are considered the "core" application models which are used to model netwo
* [dcim.PowerPanel](../models/dcim/powerpanel.md)
* [dcim.Rack](../models/dcim/rack.md)
* [dcim.RackReservation](../models/dcim/rackreservation.md)
* [dcim.RackType](../models/dcim/racktype.md)
* [dcim.Site](../models/dcim/site.md)
* [dcim.VirtualChassis](../models/dcim/virtualchassis.md)
* [dcim.VirtualDeviceContext](../models/dcim/virtualdevicecontext.md)
* [ipam.Aggregate](../models/ipam/aggregate.md)
* [ipam.ASN](../models/ipam/asn.md)
* [ipam.FHRPGroup](../models/ipam/fhrpgroup.md)
* [ipam.FHRPGroupAssignment](../models/ipam/fhrpgroupassignment.md)
* [ipam.IPAddress](../models/ipam/ipaddress.md)
* [ipam.IPRange](../models/ipam/iprange.md)
* [ipam.Prefix](../models/ipam/prefix.md)
Expand All @@ -76,6 +80,7 @@ These are considered the "core" application models which are used to model netwo

Organization models are used to organize and classify primary models.

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

### Nested Group Models

Expand Down Expand Up @@ -131,3 +137,10 @@ These function as templates to effect the replication of device and virtual mach
* [dcim.PowerOutletTemplate](../models/dcim/poweroutlettemplate.md)
* [dcim.PowerPortTemplate](../models/dcim/powerporttemplate.md)
* [dcim.RearPortTemplate](../models/dcim/rearporttemplate.md)

### Connection Models

Connection models are used to model the connections, or connection endpoints between models.

* [circuits.CircuitTermination](../models/circuits/circuittermination.md)
* [vpn.TunnelTermination](../models/vpn/tunneltermination.md)
18 changes: 4 additions & 14 deletions docs/development/release-checklist.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

This documentation describes the process of packaging and publishing a new NetBox release. There are three types of release:

* Major release (e.g. v2.11 to v3.0)
* Minor release (e.g. v3.2 to v3.3)
* Patch release (e.g. v3.3.0 to v3.3.1)
* Major release (e.g. v3.7.8 to v4.0.0)
* Minor release (e.g. v4.0.10 to v4.1.0)
* Patch release (e.g. v4.1.0 to v4.1.1)

While major releases generally introduce some very substantial change to the application, they are typically treated the same as minor version increments for the purpose of release packaging.

Expand Down Expand Up @@ -90,7 +90,7 @@ Updated language translations should be pulled from [Transifex](https://app.tran

### Update Version and Changelog

* Update the `VERSION` constant in `settings.py` to the new release version.
* Update the version and published date in `release.yaml` with the current version & date. Add a designation (e.g.g `beta1`) if applicable.
* Update the example version numbers in the feature request and bug report templates under `.github/ISSUE_TEMPLATES/`.
* Replace the "FUTURE" placeholder in the release notes with the current date.

Expand All @@ -117,16 +117,6 @@ Create a [new release](https://github.com/netbox-community/netbox/releases/new)

Once created, the release will become available for users to install.

### Update the Development Version

On the `develop` branch, update `VERSION` in `settings.py` to point to the next release. For example, if you just released v3.3.1, set:

```
VERSION = 'v3.3.2-dev'
```

Commit this change with the comment "PRVB" (for _post-release version bump_) and push the commit upstream.

### Update the Public Documentation

After a release has been published, the public NetBox documentation needs to be updated. This is accomplished by running two actions on the [netboxlabs-docs](https://github.com/netboxlabs/netboxlabs-docs) repository.
Expand Down
7 changes: 4 additions & 3 deletions docs/features/event-rules.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# Event Rules

NetBox includes the ability to execute certain functions in response to internal object changes. These include:
NetBox includes the ability to automatically perform certain functions in response to internal events. These include:

* [Scripts](../customization/custom-scripts.md) execution
* [Webhooks](../integrations/webhooks.md) execution
* Executing a [custom script](../customization/custom-scripts.md)
* Sending a [webhook](../integrations/webhooks.md)
* Generating [user notifications](../features/notifications.md)

For example, suppose you want to automatically configure a monitoring system to start monitoring a device when its operational status is changed to active, and remove it from monitoring for any other status. You can create a webhook in NetBox for the device model and craft its content and destination URL to effect the desired change on the receiving system. You can then associate an event rule with this webhook and the webhook will be sent automatically by NetBox whenever the configured constraints are met.

Expand Down
4 changes: 4 additions & 0 deletions docs/features/facilities.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,10 @@ A site typically represents a building within a region and/or site group. Each s

A location can be any logical subdivision within a building, such as a floor or room. Like regions and site groups, locations can be nested into a self-recursive hierarchy for maximum flexibility. And like sites, each location has an operational status assigned to it.

## Rack Types

A rack type represents a unique specification of a rack which exists in the real world. Each rack type can be setup with weight, height, and unit ordering. New racks of this type can then be created in NetBox, and any associated specifications will be automatically replicated from the device type.

## Racks

Finally, NetBox models each equipment rack as a discrete object within a site and location. These are physical objects into which devices are installed. Each rack can be assigned an operational status, type, facility ID, and other attributes related to inventory tracking. Each rack also must define a height (in rack units) and width, and may optionally specify its physical dimensions.
Expand Down
10 changes: 10 additions & 0 deletions docs/features/notifications.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Notifications

!!! info "This feature was introduced in NetBox v4.1."

NetBox includes a system for generating user notifications, which can be marked as read or deleted by individual users. There are two built-in mechanisms for generating a notification:

* A user can subscribe to an object. When that object is modified, a notification is created to inform the user of the change.
* An [event rule](./event-rules.md) can be defined to automatically generate a notification for one or more users in response to specific system events.

Additionally, NetBox plugins can generate notifications for their own purposes.
2 changes: 1 addition & 1 deletion docs/integrations/graphql-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,4 +112,4 @@ Authorization: Token $TOKEN

## Disabling the GraphQL API

If not needed, the GraphQL API can be disabled by setting the [`GRAPHQL_ENABLED`](../configuration/miscellaneous.md#graphql_enabled) configuration parameter to False and restarting NetBox.
If not needed, the GraphQL API can be disabled by setting the [`GRAPHQL_ENABLED`](../configuration/graphql-api.md#graphql_enabled) configuration parameter to False and restarting NetBox.
6 changes: 3 additions & 3 deletions docs/integrations/rest-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ See the [filtering documentation](../reference/filtering.md) for more details on

## Serialization

The REST API employs two types of serializers to represent model data: base serializers and nested serializers. The base serializer is used to present the complete view of a model. This includes all database table fields which comprise the model, and may include additional metadata. A base serializer includes relationships to parent objects, but **does not** include child objects. For example, the `VLANSerializer` includes a nested representation its parent VLANGroup (if any), but does not include any assigned Prefixes.
The REST API generally represents objects in one of two ways: complete or brief. The base serializer is used to present the complete view of an object. This includes all database table fields which comprise the model, and may include additional metadata. A base serializer includes relationships to parent objects, but **does not** include child objects. For example, the `VLANSerializer` includes a nested representation its parent VLANGroup (if any), but does not include any assigned Prefixes. Serializers employ a minimal "brief" representation of related objects, which includes only the attributes prudent for identifying the object.

```json
{
Expand Down Expand Up @@ -139,7 +139,7 @@ The REST API employs two types of serializers to represent model data: base seri

### Related Objects

Related objects (e.g. `ForeignKey` fields) are represented using nested serializers. A nested serializer provides a minimal representation of an object, including only its direct URL and enough information to display the object to a user. When performing write API actions (`POST`, `PUT`, and `PATCH`), related objects may be specified by either numeric ID (primary key), or by a set of attributes sufficiently unique to return the desired object.
Related objects (e.g. `ForeignKey` fields) are included using nested brief representations. This is a minimal representation of an object, including only its direct URL and enough information to display the object to a user. When performing write API actions (`POST`, `PUT`, and `PATCH`), related objects may be specified by either numeric ID (primary key), or by a set of attributes sufficiently unique to return the desired object.

For example, when creating a new device, its rack can be specified by NetBox ID (PK):

Expand All @@ -151,7 +151,7 @@ For example, when creating a new device, its rack can be specified by NetBox ID
}
```

Or by a set of nested attributes which uniquely identify the rack:
Or by a set of attributes which uniquely identify the rack:

```json
{
Expand Down
Binary file modified docs/media/screenshots/cable-trace.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/media/screenshots/home-dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/media/screenshots/home-light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/media/screenshots/prefixes-list.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/media/screenshots/rack.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 15 additions & 0 deletions docs/models/circuits/circuitgroup.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Circuit Groups

!!! info "This feature was introduced in NetBox v4.1."

[Circuits](./circuit.md) can be arranged into administrative groups for organization. The assignment of a circuit to a group is optional.

## Fields

### Name

A unique human-friendly name.

### Slug

A unique URL-friendly identifier. (This value can be used for filtering.)
Loading

0 comments on commit 7bc0d34

Please sign in to comment.