From e02590ac960f397fbcf43bf121b3022b0ade99c5 Mon Sep 17 00:00:00 2001
From: Jeremy Stretch
Date: Fri, 21 Aug 2020 09:56:29 -0400
Subject: [PATCH 1/8] Post-release version bump
---
netbox/netbox/settings.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/netbox/netbox/settings.py b/netbox/netbox/settings.py
index af9a9d2c8..fd50f6b5a 100644
--- a/netbox/netbox/settings.py
+++ b/netbox/netbox/settings.py
@@ -16,7 +16,7 @@ from django.core.validators import URLValidator
# Environment setup
#
-VERSION = '2.9.0'
+VERSION = '2.9.1-dev'
# Hostname
HOSTNAME = platform.node()
From 802af06c0f8d59160b46255749e17b7ead733298 Mon Sep 17 00:00:00 2001
From: Jeremy Stretch
Date: Fri, 21 Aug 2020 12:58:48 -0400
Subject: [PATCH 2/8] Closes #4991: Add Python and NetBox versions to error
page
---
docs/release-notes/version-2.9.md | 8 ++++++++
netbox/templates/500.html | 5 ++++-
netbox/utilities/views.py | 4 ++++
3 files changed, 16 insertions(+), 1 deletion(-)
diff --git a/docs/release-notes/version-2.9.md b/docs/release-notes/version-2.9.md
index cc38fdb5e..8bee68e8a 100644
--- a/docs/release-notes/version-2.9.md
+++ b/docs/release-notes/version-2.9.md
@@ -1,5 +1,13 @@
# NetBox v2.9
+## v2.9.1 (FUTURE)
+
+### Enhancements
+
+* [#4991](https://github.com/netbox-community/netbox/issues/4991) - Add Python and NetBox versions to error page
+
+---
+
## v2.9.0 (2020-08-21)
### New Features
diff --git a/netbox/templates/500.html b/netbox/templates/500.html
index bd59b7233..61115cbab 100644
--- a/netbox/templates/500.html
+++ b/netbox/templates/500.html
@@ -31,7 +31,10 @@
The complete exception is provided below:
{{ exception }}
-{{ error }}
+{{ error }}
+
+Python version: {{ python_version }}
+NetBox version: {{ netbox_version }}
If further assistance is required, please post to the NetBox mailing list.
diff --git a/netbox/utilities/views.py b/netbox/utilities/views.py
index c7db2f649..079068648 100644
--- a/netbox/utilities/views.py
+++ b/netbox/utilities/views.py
@@ -1,8 +1,10 @@
import logging
+import platform
import re
import sys
from copy import deepcopy
+from django.conf import settings
from django.contrib import messages
from django.contrib.auth.decorators import login_required
from django.contrib.contenttypes.models import ContentType
@@ -1421,6 +1423,8 @@ def server_error(request, template_name=ERROR_500_TEMPLATE_NAME):
type_, error, traceback = sys.exc_info()
return HttpResponseServerError(template.render({
+ 'python_version': platform.python_version(),
+ 'netbox_version': settings.VERSION,
'exception': str(type_),
'error': error,
}))
From ed65603632af3e542a79543cd1d4a5c5d666598b Mon Sep 17 00:00:00 2001
From: Jeremy Stretch
Date: Fri, 21 Aug 2020 13:17:41 -0400
Subject: [PATCH 3/8] Closes #4540: Add IP address status type for SLAAC
---
docs/models/ipam/ipaddress.md | 1 +
docs/release-notes/version-2.9.md | 1 +
netbox/ipam/choices.py | 2 ++
3 files changed, 4 insertions(+)
diff --git a/docs/models/ipam/ipaddress.md b/docs/models/ipam/ipaddress.md
index 04ac417db..1ea613997 100644
--- a/docs/models/ipam/ipaddress.md
+++ b/docs/models/ipam/ipaddress.md
@@ -10,6 +10,7 @@ Each IP address can also be assigned an operational status and a functional role
* Reserved
* Deprecated
* DHCP
+* SLAAC (IPv6 Stateless Address Autoconfiguration)
Roles are used to indicate some special attribute of an IP address; for example, use as a loopback or as the the virtual IP for a VRRP group. (Note that functional roles are conceptual in nature, and thus cannot be customized by the user.) Available roles include:
diff --git a/docs/release-notes/version-2.9.md b/docs/release-notes/version-2.9.md
index 8bee68e8a..74095a7fe 100644
--- a/docs/release-notes/version-2.9.md
+++ b/docs/release-notes/version-2.9.md
@@ -4,6 +4,7 @@
### Enhancements
+* [#4540](https://github.com/netbox-community/netbox/issues/4540) - Add IP address status type for SLAAC
* [#4991](https://github.com/netbox-community/netbox/issues/4991) - Add Python and NetBox versions to error page
---
diff --git a/netbox/ipam/choices.py b/netbox/ipam/choices.py
index 68fdfd9df..f3ff19ddc 100644
--- a/netbox/ipam/choices.py
+++ b/netbox/ipam/choices.py
@@ -41,12 +41,14 @@ class IPAddressStatusChoices(ChoiceSet):
STATUS_RESERVED = 'reserved'
STATUS_DEPRECATED = 'deprecated'
STATUS_DHCP = 'dhcp'
+ STATUS_SLAAC = 'slaac'
CHOICES = (
(STATUS_ACTIVE, 'Active'),
(STATUS_RESERVED, 'Reserved'),
(STATUS_DEPRECATED, 'Deprecated'),
(STATUS_DHCP, 'DHCP'),
+ (STATUS_SLAAC, 'SLAAC'),
)
From f37997ac5433ac0f43ddc1457d4c6c88034d6990 Mon Sep 17 00:00:00 2001
From: Jeremy Stretch
Date: Fri, 21 Aug 2020 13:35:03 -0400
Subject: [PATCH 4/8] Closes #4814: Allow nested LAG interfaces
---
docs/models/dcim/interface.md | 2 +-
docs/release-notes/version-2.9.md | 1 +
netbox/dcim/forms.py | 5 ++++-
netbox/dcim/models/device_components.py | 16 +++++-----------
4 files changed, 11 insertions(+), 13 deletions(-)
diff --git a/docs/models/dcim/interface.md b/docs/models/dcim/interface.md
index be43ac2a6..756e320af 100644
--- a/docs/models/dcim/interface.md
+++ b/docs/models/dcim/interface.md
@@ -4,7 +4,7 @@ Interfaces in NetBox represent network interfaces used to exchange data with con
Interfaces may be physical or virtual in nature, but only physical interfaces may be connected via cables. Cables can connect interfaces to pass-through ports, circuit terminations, or other interfaces.
-Physical interfaces may be arranged into a link aggregation group (LAG) and associated with a parent LAG (virtual) interface. Like all virtual interfaces, LAG interfaces cannot be connected physically.
+Physical interfaces may be arranged into a link aggregation group (LAG) and associated with a parent LAG (virtual) interface. LAG interfaces can be recursively nested to model bonding of trunk groups. Like all virtual interfaces, LAG interfaces cannot be connected physically.
IP addresses can be assigned to interfaces. VLANs can also be assigned to each interface as either tagged or untagged. (An interface may have only one untagged VLAN.)
diff --git a/docs/release-notes/version-2.9.md b/docs/release-notes/version-2.9.md
index 74095a7fe..d42e35b92 100644
--- a/docs/release-notes/version-2.9.md
+++ b/docs/release-notes/version-2.9.md
@@ -5,6 +5,7 @@
### Enhancements
* [#4540](https://github.com/netbox-community/netbox/issues/4540) - Add IP address status type for SLAAC
+* [#4814](https://github.com/netbox-community/netbox/issues/4814) - Allow nested LAG interfaces
* [#4991](https://github.com/netbox-community/netbox/issues/4991) - Add Python and NetBox versions to error page
---
diff --git a/netbox/dcim/forms.py b/netbox/dcim/forms.py
index 6dd5cb6bf..2b8bf4e9e 100644
--- a/netbox/dcim/forms.py
+++ b/netbox/dcim/forms.py
@@ -2686,7 +2686,10 @@ class InterfaceForm(InterfaceCommonForm, BootstrapMixin, forms.ModelForm):
device_query = Q(device=device)
if device.virtual_chassis:
device_query |= Q(device__virtual_chassis=device.virtual_chassis)
- self.fields['lag'].queryset = Interface.objects.filter(device_query, type=InterfaceTypeChoices.TYPE_LAG)
+ self.fields['lag'].queryset = Interface.objects.filter(
+ device_query,
+ type=InterfaceTypeChoices.TYPE_LAG
+ ).exclude(pk=self.instance.pk)
# Add current site to VLANs query params
self.fields['untagged_vlan'].widget.add_query_param('site_id', device.site.pk)
diff --git a/netbox/dcim/models/device_components.py b/netbox/dcim/models/device_components.py
index 92b0605e9..d7e077a16 100644
--- a/netbox/dcim/models/device_components.py
+++ b/netbox/dcim/models/device_components.py
@@ -702,18 +702,12 @@ class Interface(CableTermination, ComponentModel, BaseInterface):
})
# A virtual interface cannot have a parent LAG
- if self.type in NONCONNECTABLE_IFACE_TYPES and self.lag is not None:
- raise ValidationError({
- 'lag': "{} interfaces cannot have a parent LAG interface.".format(self.get_type_display())
- })
+ if self.type == InterfaceTypeChoices.TYPE_VIRTUAL and self.lag is not None:
+ raise ValidationError({'lag': "Virtual interfaces cannot have a parent LAG interface."})
- # Only a LAG can have LAG members
- if self.type != InterfaceTypeChoices.TYPE_LAG and self.member_interfaces.exists():
- raise ValidationError({
- 'type': "Cannot change interface type; it has LAG members ({}).".format(
- ", ".join([iface.name for iface in self.member_interfaces.all()])
- )
- })
+ # A LAG interface cannot be its own parent
+ if self.pk and self.lag_id == self.pk:
+ raise ValidationError({'lag': "A LAG interface cannot be its own parent."})
# Validate untagged VLAN
if self.untagged_vlan and self.untagged_vlan.site not in [self.parent.site, None]:
From 2116b928b683d61c42ba12aeba5d44b18bc24417 Mon Sep 17 00:00:00 2001
From: Jeremy Stretch
Date: Fri, 21 Aug 2020 16:44:13 -0400
Subject: [PATCH 5/8] Add link to v2.9 release notes
---
mkdocs.yml | 1 +
1 file changed, 1 insertion(+)
diff --git a/mkdocs.yml b/mkdocs.yml
index a94aa3cc4..87962acc0 100644
--- a/mkdocs.yml
+++ b/mkdocs.yml
@@ -76,6 +76,7 @@ nav:
- User Preferences: 'development/user-preferences.md'
- Release Checklist: 'development/release-checklist.md'
- Release Notes:
+ - Version 2.9: 'release-notes/version-2.9.md'
- Version 2.8: 'release-notes/version-2.8.md'
- Version 2.7: 'release-notes/version-2.7.md'
- Version 2.6: 'release-notes/version-2.6.md'
From 728088f5fa5c8dfcc5c8b3f70810e2d664ddda36 Mon Sep 17 00:00:00 2001
From: Jeremy Stretch
Date: Sat, 22 Aug 2020 20:39:46 -0400
Subject: [PATCH 6/8] Closes #5033: Support backward compatibility for
REMOTE_AUTH_BACKEND
---
docs/release-notes/version-2.9.md | 4 +++-
netbox/netbox/settings.py | 7 +++++++
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/docs/release-notes/version-2.9.md b/docs/release-notes/version-2.9.md
index d42e35b92..07b989588 100644
--- a/docs/release-notes/version-2.9.md
+++ b/docs/release-notes/version-2.9.md
@@ -7,6 +7,7 @@
* [#4540](https://github.com/netbox-community/netbox/issues/4540) - Add IP address status type for SLAAC
* [#4814](https://github.com/netbox-community/netbox/issues/4814) - Allow nested LAG interfaces
* [#4991](https://github.com/netbox-community/netbox/issues/4991) - Add Python and NetBox versions to error page
+* [#5033](https://github.com/netbox-community/netbox/issues/5033) - Support backward compatibility for `REMOTE_AUTH_BACKEND` configuration parameter
---
@@ -66,7 +67,8 @@ Two new REST API endpoints have been added to facilitate the retrieval and manip
### Configuration Changes
-* If in use, LDAP authentication must be enabled by setting `REMOTE_AUTH_BACKEND` to `'netbox.authentication.LDAPBackend'`. (LDAP configuration parameters in `ldap_config.py` remain unchanged.)
+* If using NetBox's built-in remote authentication backend, update `REMOTE_AUTH_BACKEND` to `'netbox.authentication.RemoteUserBackend'`, as the authentication class has moved.
+* If using LDAP authentication, set `REMOTE_AUTH_BACKEND` to `'netbox.authentication.LDAPBackend'`. (LDAP configuration parameters in `ldap_config.py` remain unchanged.)
* `REMOTE_AUTH_DEFAULT_PERMISSIONS` now takes a dictionary rather than a list. This is a mapping of permission names to a dictionary of constraining attributes, or `None`. For example, `['dcim.add_site', 'dcim.change_site']` would become `{'dcim.add_site': None, 'dcim.change_site': None}`.
### REST API Changes
diff --git a/netbox/netbox/settings.py b/netbox/netbox/settings.py
index fd50f6b5a..e4ab844d0 100644
--- a/netbox/netbox/settings.py
+++ b/netbox/netbox/settings.py
@@ -142,6 +142,13 @@ if type(REMOTE_AUTH_DEFAULT_PERMISSIONS) is not dict:
)
except TypeError:
raise ImproperlyConfigured("REMOTE_AUTH_DEFAULT_PERMISSIONS must be a dictionary.")
+# Backward compatibility for REMOTE_AUTH_BACKEND
+if REMOTE_AUTH_BACKEND == 'utilities.auth_backends.RemoteUserBackend':
+ warnings.warn(
+ "RemoteUserBackend has moved! Please update your configuration to:\n"
+ " REMOTE_AUTH_BACKEND='netbox.authentication.RemoteUserBackend'"
+ )
+ REMOTE_AUTH_BACKEND = 'netbox.authentication.RemoteUserBackend'
#
From aedba0e8be49c1706eb95c9a7424d5fd8c3e0412 Mon Sep 17 00:00:00 2001
From: Jeremy Stretch
Date: Sat, 22 Aug 2020 20:53:21 -0400
Subject: [PATCH 7/8] Closes #5030: Call out required minimum versions for
depdencies in upgrade documentation
---
docs/installation/upgrading.md | 11 +++++++++--
docs/release-notes/version-2.9.md | 2 ++
2 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/docs/installation/upgrading.md b/docs/installation/upgrading.md
index 807b9b1e6..34274342c 100644
--- a/docs/installation/upgrading.md
+++ b/docs/installation/upgrading.md
@@ -4,8 +4,15 @@
Prior to upgrading your NetBox instance, be sure to carefully review all [release notes](../../release-notes/) that have been published since your current version was released. Although the upgrade process typically does not involve additional work, certain releases may introduce breaking or backward-incompatible changes. These are called out in the release notes under the version in which the change went into effect.
-!!! note
- Beginning with version 2.8, NetBox requires Python 3.6 or later.
+## Update Dependencies to Required Versions
+
+NetBox v2.9.0 and later requires the following:
+
+| Dependency | Minimum Version |
+|------------|-----------------|
+| Python | 3.6 |
+| PostgreSQL | 9.6 |
+| Redis | 4.0 |
## Install the Latest Code
diff --git a/docs/release-notes/version-2.9.md b/docs/release-notes/version-2.9.md
index 07b989588..a02bcf3ea 100644
--- a/docs/release-notes/version-2.9.md
+++ b/docs/release-notes/version-2.9.md
@@ -13,6 +13,8 @@
## v2.9.0 (2020-08-21)
+**Note:** Redis 4.0 or later is required for this release.
+
### New Features
#### Object-Based Permissions ([#554](https://github.com/netbox-community/netbox/issues/554))
From 35a280eb31be691523567a77470564f28282960a Mon Sep 17 00:00:00 2001
From: Jeremy Stretch
Date: Sat, 22 Aug 2020 21:03:51 -0400
Subject: [PATCH 8/8] Release v2.9.1
---
docs/release-notes/version-2.9.md | 2 +-
netbox/netbox/settings.py | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/docs/release-notes/version-2.9.md b/docs/release-notes/version-2.9.md
index a02bcf3ea..549067b13 100644
--- a/docs/release-notes/version-2.9.md
+++ b/docs/release-notes/version-2.9.md
@@ -1,6 +1,6 @@
# NetBox v2.9
-## v2.9.1 (FUTURE)
+## v2.9.1 (2020-08-22)
### Enhancements
diff --git a/netbox/netbox/settings.py b/netbox/netbox/settings.py
index e4ab844d0..74cfcbd83 100644
--- a/netbox/netbox/settings.py
+++ b/netbox/netbox/settings.py
@@ -16,7 +16,7 @@ from django.core.validators import URLValidator
# Environment setup
#
-VERSION = '2.9.1-dev'
+VERSION = '2.9.1'
# Hostname
HOSTNAME = platform.node()