Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
115 commits
Select commit Hold shift + click to select a range
02db0bc
Closes #11766: Remove obsolete custom ChoiceField and MultipleChoiceF…
jeremystretch May 12, 2023
4208b79
Closes #12320: Remove obsolete fields napalm_driver and napalm_args f…
jeremystretch May 16, 2023
2e2ff09
Merge branch 'develop' into feature
jeremystretch Jun 2, 2023
4f76dcd
11305 Add GPS coordinates to device (#12782)
arthanson Jun 14, 2023
b4a3156
9077 audit alters_data=True
arthanson May 31, 2023
e635f0d
Merge branch 'develop' into feature
arthanson Jun 14, 2023
e7edccd
Merge branch 'develop' into feature
jeremystretch Jun 20, 2023
bace24b
12180 available objects api (#12935)
jeremystretch Jun 20, 2023
518fd8c
12794 change User ref to get_user_model (#12905)
arthanson Jun 22, 2023
eff4a37
12175 rack with starting unit > 1 (#12778)
arthanson Jun 22, 2023
9fa1411
Changelog for #9077, #11305, #12175, #12180, #12794
jeremystretch Jun 22, 2023
48b2ab3
Closes #12964: Raise minimum PostgreSQL version from 11 to 12
jeremystretch Jun 22, 2023
148278a
12591 config params admin (#12904)
arthanson Jun 22, 2023
69b818e
12237 update to Django 4.2 / psycopg3 (#12916)
arthanson Jun 23, 2023
1056e51
Closes #11541: Support for limiting tag assignments by object type (#…
jeremystretch Jun 23, 2023
6e222f8
Closes #8248: User bookmarks (#13035)
jeremystretch Jun 29, 2023
837be4d
Merge branch 'develop' into feature
jeremystretch Jul 11, 2023
96ea0ac
Closes #12988: Introduce custom field choice sets (#13195)
jeremystretch Jul 19, 2023
a4acb50
12589 move user and group admin from admin (#12877)
arthanson Jul 20, 2023
149a496
6347 Cache the number of each component type assigned to devices/VMs …
arthanson Jul 25, 2023
7600d7b
Closes #13228: Move token management views to primary UI
arthanson Jul 25, 2023
154b823
Oob ip (devices) (#13013)
ITJamie Jul 25, 2023
9b6e328
Clean up users & account URLs
jeremystretch Jul 25, 2023
daa8f71
Closes #10197: Add a cached counter field for virtual chassis members
jeremystretch Jul 25, 2023
5b5444f
Closes #13269: Cache component template counts on device types
jeremystretch Jul 25, 2023
1bcfcad
Update changelog
jeremystretch Jul 25, 2023
0f9fe96
Adds rf_role to interface template (#13199)
abhi1693 Jul 26, 2023
83c092f
13272 fix graphql tests
arthanson Jul 27, 2023
0c2e3ff
Merge pull request #13277 from netbox-community/13272-fix-graphql-test
jeremystretch Jul 27, 2023
d52c18c
Merge branch 'develop' into feature
jeremystretch Jul 28, 2023
9d3bb58
Update version
jeremystretch Jul 28, 2023
cf1b1a8
Closes #12194: Add pre-defined custom field choices (#13219)
jeremystretch Jul 28, 2023
7c17d2e
Closes #13102: Establish initial translation support in templates
arthanson Jul 28, 2023
2a0d76d
Merge branch 'develop' into feature
jeremystretch Jul 30, 2023
ca634be
Closes #13311: Always use get_permission_for_model() to resolve permi…
jeremystretch Jul 30, 2023
07f68ae
Closes #13038: Establish `DEFAULT_PERMISSIONS` config parameter (#13308)
jeremystretch Jul 30, 2023
36f95f7
Adds tenant on power feed (#13300)
abhi1693 Jul 31, 2023
ab0442b
Fix typo
jeremystretch Jul 31, 2023
9c6c3d3
Update changelog
jeremystretch Jul 31, 2023
80376ab
Closes #13309: Introduce the account app (#13310)
jeremystretch Jul 31, 2023
83bebc1
Closes #13132: Wrap verbose_name and other model text with gettext_la…
arthanson Jul 31, 2023
b7a9649
Closes #13149: Wrap form field labels with gettext_lazy()
arthanson Jul 31, 2023
34a9605
Remove obsolete AdminGroup and AdminUser models (#12589)
jeremystretch Jul 31, 2023
e284cd7
Closes #13150: Wrap table column headers with gettext()
arthanson Jul 31, 2023
e625a56
Closes #13279: Wrap choice labels with gettext()
arthanson Jul 31, 2023
43e6308
Closes #11732: Protect against errant overwriting of data via web UI …
jeremystretch Aug 1, 2023
c1ca8d5
Closes #12906: Make boto3 & dulwich libraries optional (#13324)
jeremystretch Aug 1, 2023
cbf4b43
Adds tags on contact assignment (#13328)
abhi1693 Aug 1, 2023
7b998cf
#11732: Exclude _init_time from import form fields list
jeremystretch Aug 1, 2023
1cc78be
Adds custom field on webhook model (#13336)
abhi1693 Aug 1, 2023
a89cec7
Update changelog
jeremystretch Aug 1, 2023
699b4df
Update feature introduction flags
jeremystretch Aug 1, 2023
e64289e
#12589: Remove obsolete admin resources
jeremystretch Aug 1, 2023
6208e0f
#12591: Add extras.ConfigRevision to EXEMPT_EXCLUDE_MODELS
jeremystretch Aug 1, 2023
ccb7568
#8684: Drop support for 'obj' context var when rendering custom links…
jeremystretch Aug 1, 2023
79030ec
#12589: Move username validation from form to NetBoxUser
jeremystretch Aug 1, 2023
0bb86f1
Replaces device_role with role on device model (#13342)
abhi1693 Aug 2, 2023
8f27115
Closes #11519: Add a SQL index for IPAddress host value
jeremystretch Aug 2, 2023
bf20611
#6391: Add device_role to DeviceWithConfigContextSerializer
jeremystretch Aug 2, 2023
1937c1f
#12175: Misc cleanup
jeremystretch Aug 2, 2023
aa747c3
#12988: Correct URL path for CustomFieldChoiceSet API endpoint
jeremystretch Aug 2, 2023
04c5e62
#8248: Permit users to manage their own bookmarks by default
jeremystretch Aug 2, 2023
a698a93
Closes #13350: Remove unused DeviceImportTable class
jeremystretch Aug 2, 2023
354dc43
Update changelog
jeremystretch Aug 2, 2023
82c9595
Release v3.6-beta1
jeremystretch Aug 2, 2023
04a2543
Fixes #13351: Fix missing text due to incorrectly applied translation…
jeremystretch Aug 2, 2023
d9f3637
Fixes #13361: Extra choices field on custom field choice set form sho…
jeremystretch Aug 3, 2023
24ffaf0
Fixes #13363: Fix API endpoint for custom field choice selector in forms
jeremystretch Aug 3, 2023
caedc8d
Closes #13352: Translation support for model verbose names (#13354)
jeremystretch Aug 3, 2023
31f4185
Closes #13367: Delete unused device component deletion templates
jeremystretch Aug 3, 2023
14988fc
Remove redundant overrides of EXEMPT_VIEW_PERMISSIONS
jeremystretch Aug 3, 2023
14e23c3
Introduce ImageAttachmentsMixin
jeremystretch Aug 4, 2023
2afce6c
Introduce ContactsMixin
jeremystretch Aug 4, 2023
f1c182b
Fixes #13376: Restrict add/remove tag fields by model on bulk edit forms
jeremystretch Aug 4, 2023
5361594
Adds standardized list API for scripts and reports (#13382)
abhi1693 Aug 4, 2023
36072f1
Define LOCALE_PATHS
jeremystretch Aug 7, 2023
f255fe5
Fixes #13410: Fix rendering of custom choice fields with large numner…
jeremystretch Aug 8, 2023
4bb0388
Fixes #13362: Limit displayed choice set list to 50 choices
jeremystretch Aug 8, 2023
cd5012b
Closes #13424: Move CloningMixin into NetBoxFeatureSet
jeremystretch Aug 9, 2023
646d52d
Misc docs cleanup for v3.6
jeremystretch Aug 9, 2023
4e8a3e0
Closes #13426: Register all model features in the registry
jeremystretch Aug 9, 2023
5dce556
#11541: Fix object_types queryset on TagSerializer
jeremystretch Aug 9, 2023
16bcb1d
#13426: Employ proper feature keys for image attachment & contact fil…
jeremystretch Aug 9, 2023
8b01c30
Exposes all models in device context data (#13389)
abhi1693 Aug 9, 2023
914588f
Merge branch 'develop' into feature
jeremystretch Aug 9, 2023
ff59845
Changelog for #12814, #13037, #13376, #13410
jeremystretch Aug 9, 2023
23b3f72
Apply missed string translations
jeremystretch Aug 10, 2023
4d2ef0a
Fixes #13433: User field on API token form should be required
jeremystretch Aug 10, 2023
89d8f7a
Add missing load tag for i18n
jeremystretch Aug 10, 2023
856cc0f
Fixes #13437: Display bookmark button only for relevant objects
jeremystretch Aug 10, 2023
a332adf
Fixes #13434: Randomly generate initial keys prior to the creation of…
jeremystretch Aug 10, 2023
1ff1b4d
Changelog for #13433, #13434, #13437
jeremystretch Aug 10, 2023
315c4bb
#13434: Fix tests
jeremystretch Aug 10, 2023
8593715
13319 add documentation for internationalization (#13330)
arthanson Aug 11, 2023
752e26c
Adds config template to vm model (#13450)
abhi1693 Aug 14, 2023
44f8a77
Merge branch 'develop' into feature
jeremystretch Aug 15, 2023
0457520
Changelog for #12461
jeremystretch Aug 15, 2023
b96e437
#8248: Add bookmarks widget to default dashboard
jeremystretch Aug 16, 2023
b4acbb5
Closes #13439: Update API token documentation
jeremystretch Aug 16, 2023
af06510
Closes #13412: Enable pagination of custom field choice set choices
jeremystretch Aug 16, 2023
5709bc3
Release v3.6-beta2
jeremystretch Aug 16, 2023
2290070
13510 update docs run permission image
arthanson Aug 18, 2023
7d7e812
Fixes #13513: Prevent exception when rendering bookmarks widget for a…
jeremystretch Aug 22, 2023
2a4e3dd
Merge branch 'develop' into feature
jeremystretch Aug 29, 2023
4ab0eb5
#11305: Add latitude & longitude to DeviceWithConfigContextSerializer
jeremystretch Aug 29, 2023
420090d
#12590: Exclude proxy model for Token from permission object types
jeremystretch Aug 29, 2023
83536fb
#12814: Add context data section to config rendering doc
jeremystretch Aug 29, 2023
065a40d
13599 fix cached counter for edit object (#13600)
arthanson Aug 29, 2023
aebf328
Fixes #13605: Specify batch size for cached counter migrations (#13610)
jeremystretch Aug 30, 2023
1854a6b
Fix #11478 - Add vc_interfaces flag to control selection of VC interf…
DanSheps Aug 30, 2023
dc85476
Changelog for #11478, #13513, #13599, #13605
jeremystretch Aug 30, 2023
210d7bb
Display last_updated time only if defined
jeremystretch Aug 30, 2023
eb9a804
#12591: Add a dedicated view for the active config revision
jeremystretch Aug 30, 2023
8525f99
Fix invalid links
jeremystretch Aug 30, 2023
b040fdc
Release v3.6.0
jeremystretch Aug 30, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.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.5.9
placeholder: v3.6.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.5.9
placeholder: v3.6.0
validations:
required: true
- type: dropdown
Expand Down
14 changes: 3 additions & 11 deletions base_requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,9 @@
# https://github.com/mozilla/bleach/blob/main/CHANGES
bleach

# Python client for Amazon AWS API
# https://github.com/boto/boto3/blob/develop/CHANGELOG.rst
boto3

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

# Django middleware which permits cross-domain API requests
# https://github.com/adamchainz/django-cors-headers/blob/main/CHANGELOG.rst
Expand Down Expand Up @@ -74,10 +70,6 @@ drf-spectacular
# https://github.com/tfranzel/drf-spectacular-sidecar
drf-spectacular-sidecar

# Git client for file sync
# https://github.com/jelmer/dulwich/releases
dulwich

# RSS feed parser
# https://github.com/kurtmckee/feedparser/blob/develop/CHANGELOG.rst
feedparser
Expand Down Expand Up @@ -121,8 +113,8 @@ netaddr
Pillow

# PostgreSQL database adapter for Python
# https://www.psycopg.org/docs/news.html
psycopg2-binary
# https://github.com/psycopg/psycopg/blob/master/docs/news.rst
psycopg[binary,pool]

# YAML rendering library
# https://github.com/yaml/pyyaml/blob/master/CHANGES
Expand Down
7 changes: 6 additions & 1 deletion docs/administration/permissions.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,13 @@ When defining a permission constraint, administrators may use the special token

The `$user` token can be used only as a constraint value, or as an item within a list of values. It cannot be modified or extended to reference specific user attributes.

### Default Permissions

#### Example Constraint Definitions
!!! 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

| Constraints | Description |
| ----------- | ----------- |
Expand Down
2 changes: 1 addition & 1 deletion docs/administration/replicating-netbox.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ pg_dump --username netbox --password --host localhost -s netbox > netbox_schema.
By default, NetBox stores uploaded files (such as image attachments) in its media directory. To fully replicate an instance of NetBox, you'll need to copy both the database and the media files.

!!! note
These operations are not necessary if your installation is utilizing a [remote storage backend](../../configuration/optional-settings/#storage_backend).
These operations are not necessary if your installation is utilizing a [remote storage backend](../configuration/system.md#storage_backend).

### Archive the Media Directory

Expand Down
2 changes: 1 addition & 1 deletion docs/configuration/plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

Default: Empty

A list of installed [NetBox plugins](../../plugins/) to enable. Plugins will not take effect unless they are listed here.
A list of installed [NetBox plugins](../plugins/index.md) to enable. Plugins will not take effect unless they are listed here.

!!! warning
Plugins extend NetBox by allowing external code to run with the same access and privileges as NetBox itself. Only install plugins from trusted sources. The NetBox maintainers make absolutely no guarantees about the integrity or security of your installation with plugins enabled.
Expand Down
2 changes: 1 addition & 1 deletion docs/configuration/required-parameters.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ ALLOWED_HOSTS = ['*']

## DATABASE

NetBox requires access to a PostgreSQL 11 or later database service to store data. This service can run locally on the NetBox server or on a remote system. The following parameters must be defined within the `DATABASE` dictionary:
NetBox requires access to a PostgreSQL 12 or later database service to store data. This service can run locally on the NetBox server or on a remote system. The following parameters must be defined within the `DATABASE` dictionary:

* `NAME` - Database name
* `USER` - PostgreSQL username
Expand Down
34 changes: 33 additions & 1 deletion docs/configuration/security.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

Default: True

If disabled, the values of API tokens will not be displayed after each token's initial creation. A user **must** record the value of a token immediately upon its creation, or it will be lost. Note that this affects _all_ users, regardless of assigned permissions.
If disabled, the values of API tokens will not be displayed after each token's initial creation. A user **must** record the value of a token prior to its creation, or it will be lost. Note that this affects _all_ users, regardless of assigned permissions.

---

Expand Down Expand Up @@ -90,6 +90,38 @@ CSRF_TRUSTED_ORIGINS = (

---

## DEFAULT_PERMISSIONS

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

Default:

```python
{
'users.view_token': ({'user': '$user'},),
'users.add_token': ({'user': '$user'},),
'users.change_token': ({'user': '$user'},),
'users.delete_token': ({'user': '$user'},),
}
```

This parameter defines object permissions that are applied automatically to _any_ authenticated user, regardless of what permissions have been defined in the database. By default, this parameter is defined to allow all users to manage their own API tokens, however it can be overriden for any purpose.

For example, to allow all users to create a device role beginning with the word "temp," you could configure the following:

```python
DEFAULT_PERMISSIONS = {
'dcim.add_devicerole': (
{'name__startswith': 'temp'},
)
}
```

!!! warning
Setting a custom value for this parameter will overwrite the default permission mapping shown above. If you want to retain the default mapping, be sure to reproduce it in your custom configuration.

---

## EXEMPT_VIEW_PERMISSIONS

Default: Empty list
Expand Down
2 changes: 1 addition & 1 deletion docs/customization/custom-fields.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ NetBox supports limited custom validation for custom field values. Following are

### Custom Selection Fields

Each custom selection field must have at least two choices. These are specified as a comma-separated list. Choices appear in forms in the order they are listed. Note that choice values are saved exactly as they appear, so it's best to avoid superfluous punctuation or symbols where possible.
Each custom selection field must designate a [choice set](../models/extras/customfieldchoiceset.md) containing at least two choices. These are specified as a comma-separated list.

If a default value is specified for a selection field, it must exactly match one of the provided choices. The value of a multiple selection field will always return a list, even if only one value is selected.

Expand Down
2 changes: 1 addition & 1 deletion docs/customization/custom-scripts.md
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,7 @@ class NewBranchScript(Script):
name=f'{site.slug}-switch{i}',
site=site,
status=DeviceStatusChoices.STATUS_PLANNED,
device_role=switch_role
role=switch_role
)
switch.full_clean()
switch.save()
Expand Down
4 changes: 4 additions & 0 deletions docs/development/application-registry.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ The registry can be inspected by importing `registry` from `extras.registry`.

## Stores

### `counter_fields`

A dictionary mapping of models to foreign keys with which cached counter fields are associated.

### `data_backends`

A dictionary mapping data backend types to their respective classes. These are used to interact with [remote data sources](../models/core/datasource.md).
Expand Down
123 changes: 123 additions & 0 deletions docs/development/internationalization.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
# Internationalization

Beginning with NetBox v4.0, NetBox will leverage [Django's automatic translation](https://docs.djangoproject.com/en/stable/topics/i18n/translation/) to support languages other than English. This page details the areas of the project which require special attention to ensure functioning translation support. Briefly, these include:

* The `verbose_name` and `verbose_name_plural` Meta attributes for each model
* The `verbose_name` and (if defined) `help_text` for each model field
* The `label` for each form field
* Headers for `fieldsets` on each form class
* The `verbose_name` for each table column
* All human-readable strings within templates must be wrapped with `{% trans %}` or `{% blocktrans %}`

The rest of this document elaborates on each of the items above.

## General Guidance

* Wrap human-readable strings with Django's `gettext()` or `gettext_lazy()` utility functions to enable automatic translation. Generally, `gettext_lazy()` is preferred (and sometimes required) to defer translation until the string is displayed.

* By convention, the preferred translation function is typically imported as an underscore (`_`) to minimize boilerplate code. Thus, you will often see translation as e.g. `_("Some text")`. It is still an option to import and use alternative translation functions (e.g. `pgettext()` and `ngettext()`) normally as needed.

* Avoid passing markup and other non-natural language where possible. Everything wrapped by a translation function gets exported to a messages file for translation by a human.

* Where the intended meaning of the translated string may not be obvious, use `pgettext()` or `pgettext_lazy()` to include assisting context for the translator. For example:

```python
# Context, string
pgettext("month name", "May")
```

* **Format strings do not support translation.** Avoid "f" strings for messages that must support translation. Instead, use `format()` to accomplish variable replacement:

```python
# Translation will not work
f"There are {count} objects"

# Do this instead
"There are {count} objects".format(count=count)
```

## Models

1. Import `gettext_lazy` as `_`.
2. Ensure both `verbose_name` and `verbose_name_plural` are defined under the model's `Meta` class and wrapped with the `gettext_lazy()` shortcut.
3. Ensure each model field specifies a `verbose_name` wrapped with `gettext_lazy()`.
4. Ensure any `help_text` attributes on model fields are also wrapped with `gettext_lazy()`.

```python
from django.utils.translation import gettext_lazy as _

class Circuit(PrimaryModel):
commit_rate = models.PositiveIntegerField(
...
verbose_name=_('commit rate (Kbps)'),
help_text=_("Committed rate")
)

class Meta:
verbose_name = _('circuit')
verbose_name_plural = _('circuits')
```

## Forms

1. Import `gettext_lazy` as `_`.
2. All form fields must specify a `label` wrapped with `gettext_lazy()`.
3. All headers under a form's `fieldsets` property must be wrapped with `gettext_lazy()`.

```python
from django.utils.translation import gettext_lazy as _

class CircuitBulkEditForm(NetBoxModelBulkEditForm):
description = forms.CharField(
label=_('Description'),
...
)

fieldsets = (
(_('Circuit'), ('provider', 'type', 'status', 'description')),
)
```

## Tables

1. Import `gettext_lazy` as `_`.
2. All table columns must specify a `verbose_name` wrapped with `gettext_lazy()`.

```python
from django.utils.translation import gettext_lazy as _

class CircuitTable(TenancyColumnsMixin, ContactsColumnMixin, NetBoxTable):
provider = tables.Column(
verbose_name=_('Provider'),
...
)
```

## Templates

1. Ensure translation support is enabled by including `{% load i18n %}` at the top of the template.
2. Use the [`{% trans %}`](https://docs.djangoproject.com/en/stable/topics/i18n/translation/#translate-template-tag) tag (short for "translate") to wrap short strings.
3. Longer strings may be enclosed between [`{% blocktrans %}`](https://docs.djangoproject.com/en/stable/topics/i18n/translation/#blocktranslate-template-tag) and `{% endblocktrans %}` tags to improve readability and to enable variable replacement.
4. Avoid passing HTML within translated strings where possible, as this can complicate the work needed of human translators to develop message maps.

```
{% load i18n %}

{# A short string #}
<h5 class="card-header">{% trans "Circuit List" %}</h5>

{# A longer string with a context variable #}
{% blocktrans with count=object.circuits.count %}
There are {count} circuits. Would you like to continue?
{% endblocktrans %}
```

!!! warning
The `{% blocktrans %}` tag supports only **limited variable replacement**, comparable to the `format()` method on Python strings. It does not permit access to object attributes or the use of other template tags or filters inside it. Ensure that any necessary context is passed as simple variables.

!!! info
The `{% trans %}` and `{% blocktrans %}` support the inclusion of contextual hints for translators using the `context` argument:

```nohighlight
{% trans "May" context "month name" %}
```
10 changes: 8 additions & 2 deletions docs/features/configuration-rendering.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# Configuration Rendering

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

One of the critical aspects of operating a network is ensuring that every network node is configured correctly. By leveraging configuration templates and [context data](./context-data.md), NetBox can render complete configuration files for each device on your network.

```mermaid
Expand Down Expand Up @@ -39,6 +37,14 @@ Configuration templates are written in the [Jinja2 templating language](https://

When rendered for a specific NetBox device, the template's `device` variable will be populated with the device instance, and `ntp_servers` will be pulled from the device's available context data. The resulting output will be a valid configuration segment that can be applied directly to a compatible network device.

### Context Data

The objet for which the configuration is being rendered is made available as template context as `device` or `virtualmachine` for devices and virtual machines, respectively. Additionally, NetBox model classes can be accessed by the app or plugin in which they reside. For example:

```
There are {{ dcim.Site.objects.count() }} sites.
```

## Rendering Templates

### Device Configurations
Expand Down
6 changes: 6 additions & 0 deletions docs/features/customization.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ The `tag` filter can be specified multiple times to match only objects which hav
GET /api/dcim/devices/?tag=monitored&tag=deprecated
```

## Bookmarks

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

Users can bookmark their most commonly visited objects for convenient access. Bookmarks are listed under a user's profile, and can be displayed with custom filtering and ordering on the user's personal dashboard.

## Custom Fields

While NetBox provides a rather extensive data model out of the box, the need may arise to store certain additional data associated with NetBox objects. For example, you might need to record the invoice ID alongside an installed device, or record an approving authority when creating a new IP prefix. NetBox administrators can create custom fields on built-in objects to meet these needs.
Expand Down
6 changes: 4 additions & 2 deletions docs/features/synchronized-data.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# Synchronized Data

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

Several models in NetBox support the automatic synchronization of local data from a designated remote source. For example, [configuration templates](./configuration-rendering.md) defined in NetBox can source their content from text files stored in a remote git repository. This accomplished using the core [data source](../models/core/datasource.md) and [data file](../models/core/datafile.md) models.

To enable remote data synchronization, the NetBox administrator first designates one or more remote data sources. NetBox currently supports the following source types:
Expand All @@ -12,6 +10,10 @@ To enable remote data synchronization, the NetBox administrator first designates

(Local disk paths are considered "remote" in this context as they exist outside NetBox's database. These paths could also be mapped to external network shares.)


!!! info
Data backends which connect to external sources typically require the installation of one or more supporting Python libraries. The Git backend requires the [`dulwich`](https://www.dulwich.io/) package, and the S3 backend requires the [`boto3`](https://boto3.amazonaws.com/v1/documentation/api/latest/index.html) package. These must be installed within NetBox's environment to enable these backends.

Each type of remote source has its own configuration parameters. For instance, a git source will ask the user to specify a branch and authentication credentials. Once the source has been created, a synchronization job is run to automatically replicate remote files in the local database.

The following NetBox models can be associated with replicated data files:
Expand Down
6 changes: 3 additions & 3 deletions docs/installation/1-postgresql.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

This section entails the installation and configuration of a local PostgreSQL database. If you already have a PostgreSQL database service in place, skip to [the next section](2-redis.md).

!!! warning "PostgreSQL 11 or later required"
NetBox requires PostgreSQL 11 or later. Please note that MySQL and other relational databases are **not** supported.
!!! warning "PostgreSQL 12 or later required"
NetBox requires PostgreSQL 12 or later. Please note that MySQL and other relational databases are **not** supported.

## Installation

Expand Down Expand Up @@ -35,7 +35,7 @@ This section entails the installation and configuration of a local PostgreSQL da
sudo systemctl enable postgresql
```

Before continuing, verify that you have installed PostgreSQL 11 or later:
Before continuing, verify that you have installed PostgreSQL 12 or later:

```no-highlight
psql -V
Expand Down
16 changes: 16 additions & 0 deletions docs/installation/3-netbox.md
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,22 @@ By default, NetBox will use the local filesystem to store uploaded files. To use
sudo sh -c "echo 'django-storages' >> /opt/netbox/local_requirements.txt"
```

### Remote Data Sources

NetBox supports integration with several remote data sources via configurable backends. Each of these requires the installation of one or more additional libraries.

* Amazon S3: [`boto3`](https://boto3.amazonaws.com/v1/documentation/api/latest/index.html)
* Git: [`dulwich`](https://www.dulwich.io/)

For example, to enable the Amazon S3 backend, add `boto3` to your local requirements file:

```no-highlight
sudo sh -c "echo 'boto3' >> /opt/netbox/local_requirements.txt"
```

!!! info
These packages were previously required in NetBox v3.5 but now are optional.

## Run the Upgrade Script

Once NetBox has been configured, we're ready to proceed with the actual installation. We'll run the packaged upgrade script (`upgrade.sh`) to perform the following actions:
Expand Down
Loading