Skip to content

Commit 99ab054

Browse files
Merge pull request #13705 from netbox-community/develop
Release v3.6.1
2 parents dfcfbe2 + 90ab4b3 commit 99ab054

File tree

35 files changed

+429
-180
lines changed

35 files changed

+429
-180
lines changed

.github/ISSUE_TEMPLATE/bug_report.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.0
17+
placeholder: v3.6.1
1818
validations:
1919
required: true
2020
- 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.0
17+
placeholder: v3.6.1
1818
validations:
1919
required: true
2020
- type: dropdown

docs/models/dcim/platform.md

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,3 @@ If designated, this platform will be available for use only to devices assigned
2323
### Configuration Template
2424

2525
The default [configuration template](../extras/configtemplate.md) for devices assigned to this platform.
26-
27-
### NAPALM Driver
28-
29-
!!! warning "Deprecated Field"
30-
NAPALM integration was removed from NetBox core in v3.5 and is now available as a [plugin](https://github.com/netbox-community/netbox-napalm). This field will be removed in NetBox v3.6.
31-
32-
The [NAPALM driver](https://napalm.readthedocs.io/en/latest/support/index.html) associated with this platform.
33-
34-
### NAPALM Arguments
35-
36-
!!! warning "Deprecated Field"
37-
NAPALM integration was removed from NetBox core in v3.5 and is now available as a [plugin](https://github.com/netbox-community/netbox-napalm). This field will be removed in NetBox v3.6.
38-
39-
Any additional arguments to send when invoking the NAPALM driver assigned to this platform.

docs/plugins/development/navigation.md

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,15 @@ item1 = PluginMenuItem(
6464

6565
A `PluginMenuItem` has the following attributes:
6666

67-
| Attribute | Required | Description |
68-
|---------------|----------|------------------------------------------------------|
69-
| `link` | Yes | Name of the URL path to which this menu item links |
70-
| `link_text` | Yes | The text presented to the user |
71-
| `permissions` | - | A list of permissions required to display this link |
72-
| `buttons` | - | An iterable of PluginMenuButton instances to include |
67+
| Attribute | Required | Description |
68+
|---------------|----------|----------------------------------------------------------------------------------------------------------|
69+
| `link` | Yes | Name of the URL path to which this menu item links |
70+
| `link_text` | Yes | The text presented to the user |
71+
| `permissions` | - | A list of permissions required to display this link |
72+
| `staff_only` | - | Display only for users who have `is_staff` set to true (any specified permissions will also be required) |
73+
| `buttons` | - | An iterable of PluginMenuButton instances to include |
74+
75+
!!! info "The `staff_only` attribute was introduced in NetBox v3.6.1."
7376

7477
## Menu Buttons
7578

docs/release-notes/version-3.6.md

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,38 @@
11
# NetBox v3.6
22

3+
## v3.6.1 (2023-09-06)
4+
5+
### Enhancements
6+
7+
* [#12870](https://github.com/netbox-community/netbox/issues/12870) - Support setting token expiration time using the provisioning API endpoint
8+
* [#13444](https://github.com/netbox-community/netbox/issues/13444) - Add bulk rename functionality to the global device component lists
9+
* [#13638](https://github.com/netbox-community/netbox/issues/13638) - Add optional `staff_only` attribute to MenuItem
10+
11+
### Bug Fixes
12+
13+
* [#12553](https://github.com/netbox-community/netbox/issues/12552) - Ensure `family` attribute is always returned when creating aggregates and prefixes via REST API
14+
* [#13619](https://github.com/netbox-community/netbox/issues/13619) - Fix exception when viewing IP address assigned to a virtual machine
15+
* [#13596](https://github.com/netbox-community/netbox/issues/13596) - Always display "render config" tab for devices and virtual machines
16+
* [#13620](https://github.com/netbox-community/netbox/issues/13620) - Show admin menu items only for staff users
17+
* [#13622](https://github.com/netbox-community/netbox/issues/13622) - Fix exception when viewing current config and no revisions have been created
18+
* [#13626](https://github.com/netbox-community/netbox/issues/13626) - Correct filtering of recent activity list under user view
19+
* [#13628](https://github.com/netbox-community/netbox/issues/13628) - Remove stale references to obsolete NAPALM integration
20+
* [#13630](https://github.com/netbox-community/netbox/issues/13630) - Fix display of active status under user view
21+
* [#13632](https://github.com/netbox-community/netbox/issues/13632) - Avoid raising exception when checking if FHRP group IP address is primary
22+
* [#13642](https://github.com/netbox-community/netbox/issues/13642) - Suppress warning about unreflected model changes when applying migrations
23+
* [#13657](https://github.com/netbox-community/netbox/issues/13657) - Fix decoding of data file content
24+
* [#13674](https://github.com/netbox-community/netbox/issues/13674) - Fix retrieving individual report via REST API
25+
* [#13682](https://github.com/netbox-community/netbox/issues/13682) - Fix error message returned when validation of custom field default value fails
26+
* [#13684](https://github.com/netbox-community/netbox/issues/13684) - Enable modying the configuration when maintenance mode is enabled
27+
28+
---
29+
330
## v3.6.0 (2023-08-30)
431

532
### Breaking Changes
633

734
* PostgreSQL 11 is no longer supported (dropped in Django 4.2). NetBox v3.6 requires PostgreSQL 12 or later.
35+
* The `boto3` and `dulwich` packages are no longer installed automatically. If needed for S3/git remote data backend support, add them to `local_requirements.txt` to ensure their installation.
836
* The `device_role` field on the Device model has been renamed to `role`. The `device_role` field has been temporarily retained on the REST API serializer for devices for backward compatibility, but is read-only.
937
* The `choices` array field has been removed from the CustomField model. Any defined choices are automatically migrated to CustomFieldChoiceSets, accessible via the new `choice_set` field on the CustomField model.
1038
* The `napalm_driver` and `napalm_args` fields (which were deprecated in v3.5) have been removed from the Platform model.
@@ -85,8 +113,9 @@ Tags may now be restricted to use with designated object types. Tags that have n
85113
* [#11766](https://github.com/netbox-community/netbox/issues/11766) - Remove obsolete custom `ChoiceField` and `MultipleChoiceField` classes
86114
* [#12180](https://github.com/netbox-community/netbox/issues/12180) - All API endpoints for available objects (e.g. IP addresses) now inherit from a common parent view
87115
* [#12237](https://github.com/netbox-community/netbox/issues/12237) - Upgrade Django to v4.2
88-
* [#12794](https://github.com/netbox-community/netbox/issues/12794) - Avoid direct imports of Django's stock user model
89116
* [#12320](https://github.com/netbox-community/netbox/issues/12320) - Remove obsolete fields `napalm_driver` and `napalm_args` from Platform
117+
* [#12794](https://github.com/netbox-community/netbox/issues/12794) - Avoid direct imports of Django's stock user model
118+
* [#12906](https://github.com/netbox-community/netbox/issues/12906) - The `boto3` (AWS) and `dulwich` (git) packages for remote data sources are now optional requirements
90119
* [#12964](https://github.com/netbox-community/netbox/issues/12964) - Drop support for PostgreSQL 11
91120
* [#13309](https://github.com/netbox-community/netbox/issues/13309) - User account-specific resources have been moved to a new `account` app for better organization
92121

netbox/core/apps.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,15 @@
11
from django.apps import AppConfig
2+
from django.db import models
3+
from django.db.migrations.operations import AlterModelOptions
4+
5+
from utilities.migration import custom_deconstruct
6+
7+
# Ignore verbose_name & verbose_name_plural Meta options when calculating model migrations
8+
AlterModelOptions.ALTER_OPTION_KEYS.remove('verbose_name')
9+
AlterModelOptions.ALTER_OPTION_KEYS.remove('verbose_name_plural')
10+
11+
# Use our custom destructor to ignore certain attributes when calculating field migrations
12+
models.Field.deconstruct = custom_deconstruct
213

314

415
class CoreConfig(AppConfig):

netbox/core/management/commands/makemigrations.py

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,6 @@
1-
# noinspection PyUnresolvedReferences
21
from django.conf import settings
32
from django.core.management.base import CommandError
43
from django.core.management.commands.makemigrations import Command as _Command
5-
from django.db import models
6-
from django.db.migrations.operations import AlterModelOptions
7-
8-
from utilities.migration import custom_deconstruct
9-
10-
# Monkey patch AlterModelOptions to ignore verbose name attributes
11-
AlterModelOptions.ALTER_OPTION_KEYS.remove('verbose_name')
12-
AlterModelOptions.ALTER_OPTION_KEYS.remove('verbose_name_plural')
13-
14-
# Set our custom deconstructor for fields
15-
models.Field.deconstruct = custom_deconstruct
164

175

186
class Command(_Command):

netbox/core/management/commands/migrate.py

Lines changed: 0 additions & 7 deletions
This file was deleted.

netbox/core/models/data.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ def data_as_string(self):
316316
if not self.data:
317317
return None
318318
try:
319-
return bytes(self.data, 'utf-8')
319+
return self.data.decode('utf-8')
320320
except UnicodeDecodeError:
321321
return None
322322

netbox/core/views.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
from django.shortcuts import get_object_or_404, redirect
33

44
from extras.models import ConfigRevision
5+
from netbox.config import get_config
56
from netbox.views import generic
67
from netbox.views.generic.base import BaseObjectView
78
from utilities.utils import count_related
@@ -152,4 +153,9 @@ class ConfigView(generic.ObjectView):
152153
queryset = ConfigRevision.objects.all()
153154

154155
def get_object(self, **kwargs):
155-
return self.queryset.first()
156+
if config := self.queryset.first():
157+
return config
158+
# Instantiate a dummy default config if none has been created yet
159+
return ConfigRevision(
160+
data=get_config().defaults
161+
)

0 commit comments

Comments
 (0)