From c6930e3ea85155086eef7e045bd0fa8c87632984 Mon Sep 17 00:00:00 2001 From: Arthur Date: Tue, 15 Nov 2022 08:10:13 -0800 Subject: [PATCH 01/10] 10919 add location to cable termination panels --- netbox/templates/dcim/inc/cable_termination.html | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/netbox/templates/dcim/inc/cable_termination.html b/netbox/templates/dcim/inc/cable_termination.html index ced9bda50..0ee4c1ccf 100644 --- a/netbox/templates/dcim/inc/cable_termination.html +++ b/netbox/templates/dcim/inc/cable_termination.html @@ -7,6 +7,10 @@ Site {{ terminations.0.device.site|linkify }} + + Location + {{ terminations.0.device.location|linkify|placeholder }} + Rack {{ terminations.0.device.rack|linkify|placeholder }} From 928d880f0e830aa317ece2670ab16f2c77046e06 Mon Sep 17 00:00:00 2001 From: Arthur Hanson Date: Wed, 16 Nov 2022 06:27:49 -0800 Subject: [PATCH 02/10] 10902 add location to power feed form (#10913) * 10902 add location to power feed form * Bind location field to selected site Co-authored-by: jeremystretch --- netbox/dcim/forms/models.py | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/netbox/dcim/forms/models.py b/netbox/dcim/forms/models.py index 8f1626361..da50b8f2a 100644 --- a/netbox/dcim/forms/models.py +++ b/netbox/dcim/forms/models.py @@ -877,10 +877,21 @@ class PowerFeedForm(NetBoxModelForm): 'site_id': '$site' } ) + location = DynamicModelChoiceField( + queryset=Location.objects.all(), + required=False, + query_params={ + 'site_id': '$site' + }, + initial_params={ + 'racks': '$rack' + } + ) rack = DynamicModelChoiceField( queryset=Rack.objects.all(), required=False, query_params={ + 'location_id': '$location', 'site_id': '$site' } ) @@ -888,14 +899,14 @@ class PowerFeedForm(NetBoxModelForm): fieldsets = ( ('Power Panel', ('region', 'site', 'power_panel')), - ('Power Feed', ('rack', 'name', 'status', 'type', 'mark_connected', 'tags')), + ('Power Feed', ('location', 'rack', 'name', 'status', 'type', 'mark_connected', 'tags')), ('Characteristics', ('supply', 'voltage', 'amperage', 'phase', 'max_utilization')), ) class Meta: model = PowerFeed fields = [ - 'region', 'site_group', 'site', 'power_panel', 'rack', 'name', 'status', 'type', 'mark_connected', 'supply', + 'region', 'site_group', 'site', 'power_panel', 'location', 'rack', 'name', 'status', 'type', 'mark_connected', 'supply', 'phase', 'voltage', 'amperage', 'max_utilization', 'comments', 'tags', ] widgets = { From 316c3808f7fcfca282600dbd85a5f63f9a28c92e Mon Sep 17 00:00:00 2001 From: jeremystretch Date: Wed, 16 Nov 2022 09:43:11 -0500 Subject: [PATCH 03/10] Changelog for #9439, #10902, #10914, #10915, #10919 --- docs/release-notes/version-3.3.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/docs/release-notes/version-3.3.md b/docs/release-notes/version-3.3.md index df84c8de4..c7a2db6d7 100644 --- a/docs/release-notes/version-3.3.md +++ b/docs/release-notes/version-3.3.md @@ -2,8 +2,16 @@ ## v3.3.8 (FUTURE) +### Enhancements + +* [#10902](https://github.com/netbox-community/netbox/issues/10902) - Add location selector to power feed form +* [#10914](https://github.com/netbox-community/netbox/issues/10914) - Include "add module type" button on manufacturer view +* [#10915](https://github.com/netbox-community/netbox/issues/10915) - Add count of L2VPNs to tenant view +* [#10919](https://github.com/netbox-community/netbox/issues/10919) - Include device location under cable view + ### Bug Fixes +* [#9439](https://github.com/netbox-community/netbox/issues/9439) - Ensure thread safety of change logging functions * [#10709](https://github.com/netbox-community/netbox/issues/10709) - Correct UI display for `azuread-v2-tenant-oauth2` SSO backend * [#10829](https://github.com/netbox-community/netbox/issues/10829) - Fix bulk edit/delete buttons ad top of object lists * [#10837](https://github.com/netbox-community/netbox/issues/10837) - Correct cookie paths when `BASE_PATH` is set From a2007a4728faafeee5c296afabc116707db42344 Mon Sep 17 00:00:00 2001 From: Derick Vigne Date: Wed, 16 Nov 2022 09:57:49 -0500 Subject: [PATCH 04/10] Closes #10904: Added Colors to SVG for Front and Rear Ports (#10905) * Added Colors to SVG for Front and Reaer Ports Fix for feature request 10904 thanks to @TheZackCodec * Simplify termination color resolution Co-authored-by: jeremystretch --- netbox/dcim/svg/cables.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/netbox/dcim/svg/cables.py b/netbox/dcim/svg/cables.py index 9a847acc9..33adef798 100644 --- a/netbox/dcim/svg/cables.py +++ b/netbox/dcim/svg/cables.py @@ -166,7 +166,7 @@ class CableTraceSVG: """ if hasattr(instance, 'parent_object'): # Termination - return 'f0f0f0' + return getattr(instance, 'color', 'f0f0f0') or 'f0f0f0' if hasattr(instance, 'device_role'): # Device return instance.device_role.color From 3a62fd49e6f0b7d6ef5080321a54df9479e4de76 Mon Sep 17 00:00:00 2001 From: Patrick Hurrelmann Date: Wed, 16 Nov 2022 16:26:46 +0100 Subject: [PATCH 05/10] Fixes: #10356 backplane connections (#10554) * Fixes: #10356 Add interface type and cable for backplane connections * Allow Backplone for front and readports , too. * Correct tyo in port definition * pep8 fix (blank lines) * Remove port type and changed name/description of backplane cable * Omit backplane cable type Co-authored-by: Patrick Hurrelmann Co-authored-by: jeremystretch --- netbox/dcim/choices.py | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/netbox/dcim/choices.py b/netbox/dcim/choices.py index 7d35a40f9..14ddc9930 100644 --- a/netbox/dcim/choices.py +++ b/netbox/dcim/choices.py @@ -783,6 +783,17 @@ class InterfaceTypeChoices(ChoiceSet): TYPE_400GE_QSFP_DD = '400gbase-x-qsfpdd' TYPE_400GE_OSFP = '400gbase-x-osfp' + # Ethernet Backplane + TYPE_1GE_KX = '1000base-kx' + TYPE_10GE_KR = '10gbase-kr' + TYPE_10GE_KX4 = '10gbase-kx4' + TYPE_25GE_KR = '25gbase-kr' + TYPE_40GE_KR4 = '40gbase-kr4' + TYPE_50GE_KR = '50gbase-kr' + TYPE_100GE_KP4 = '100gbase-kp4' + TYPE_100GE_KR2 = '100gbase-kr2' + TYPE_100GE_KR4 = '100gbase-kr4' + # Wireless TYPE_80211A = 'ieee802.11a' TYPE_80211G = 'ieee802.11g' @@ -911,6 +922,20 @@ class InterfaceTypeChoices(ChoiceSet): (TYPE_400GE_OSFP, 'OSFP (400GE)'), ) ), + ( + 'Ethernet (backplane)', + ( + (TYPE_1GE_KX, '1000BASE-KX (1GE)'), + (TYPE_10GE_KR, '10GBASE-KR (10GE)'), + (TYPE_10GE_KX4, '10GBASE-KX4 (10GE)'), + (TYPE_25GE_KR, '25GBASE-KR (25GE)'), + (TYPE_40GE_KR4, '40GBASE-KR4 (40GE)'), + (TYPE_50GE_KR, '50GBASE-KR (50GE)'), + (TYPE_100GE_KP4, '100GBASE-KP4 (100GE)'), + (TYPE_100GE_KR2, '100GBASE-KR2 (100GE)'), + (TYPE_100GE_KR4, '100GBASE-KR4 (100GE)'), + ) + ), ( 'Wireless', ( From 44c248e6c280fa2421f8b17adc1424131398b144 Mon Sep 17 00:00:00 2001 From: jeremystretch Date: Wed, 16 Nov 2022 10:36:30 -0500 Subject: [PATCH 06/10] Closes #10934: Update release package URL --- docs/installation/3-netbox.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/installation/3-netbox.md b/docs/installation/3-netbox.md index f42e28deb..72c054e5b 100644 --- a/docs/installation/3-netbox.md +++ b/docs/installation/3-netbox.md @@ -36,7 +36,7 @@ This documentation provides two options for installing NetBox: from a downloadab Download the [latest stable release](https://github.com/netbox-community/netbox/releases) from GitHub as a tarball or ZIP archive and extract it to your desired path. In this example, we'll use `/opt/netbox` as the NetBox root. ```no-highlight -sudo wget https://github.com/netbox-community/netbox/archive/vX.Y.Z.tar.gz +sudo wget https://github.com/netbox-community/netbox/archive/refs/tags/vX.Y.Z.tar.gz sudo tar -xzf vX.Y.Z.tar.gz -C /opt sudo ln -s /opt/netbox-X.Y.Z/ /opt/netbox ``` From 540bba4544d9f31c126571cc1a45a6783b3b6a89 Mon Sep 17 00:00:00 2001 From: jeremystretch Date: Wed, 16 Nov 2022 10:37:06 -0500 Subject: [PATCH 07/10] Closes #10920: Include request cookies when queuing a custom script --- netbox/utilities/utils.py | 1 + 1 file changed, 1 insertion(+) diff --git a/netbox/utilities/utils.py b/netbox/utilities/utils.py index 69ab615fc..ba3388c75 100644 --- a/netbox/utilities/utils.py +++ b/netbox/utilities/utils.py @@ -410,6 +410,7 @@ def copy_safe_request(request): } return NetBoxFakeRequest({ 'META': meta, + 'COOKIES': request.COOKIES, 'POST': request.POST, 'GET': request.GET, 'FILES': request.FILES, From ceec1055e0ea5d09d2606c9742f8ac240aa49d33 Mon Sep 17 00:00:00 2001 From: jeremystretch Date: Wed, 16 Nov 2022 10:40:18 -0500 Subject: [PATCH 08/10] Changelog for #10356, #10904, #10920 --- docs/release-notes/version-3.3.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/release-notes/version-3.3.md b/docs/release-notes/version-3.3.md index c7a2db6d7..3872b4c34 100644 --- a/docs/release-notes/version-3.3.md +++ b/docs/release-notes/version-3.3.md @@ -4,10 +4,13 @@ ### Enhancements +* [#10356](https://github.com/netbox-community/netbox/issues/10356) - Add backplane Ethernet interface types * [#10902](https://github.com/netbox-community/netbox/issues/10902) - Add location selector to power feed form +* [#10904](https://github.com/netbox-community/netbox/issues/10904) - Use front/rear port colors in cable trace SVG * [#10914](https://github.com/netbox-community/netbox/issues/10914) - Include "add module type" button on manufacturer view * [#10915](https://github.com/netbox-community/netbox/issues/10915) - Add count of L2VPNs to tenant view * [#10919](https://github.com/netbox-community/netbox/issues/10919) - Include device location under cable view +* [#10920](https://github.com/netbox-community/netbox/issues/10920) - Include request cookies when queuing a custom script ### Bug Fixes From 62a80c46a87cb924d49931fc5dc1628bd7f1089a Mon Sep 17 00:00:00 2001 From: jeremystretch Date: Wed, 16 Nov 2022 10:45:29 -0500 Subject: [PATCH 09/10] Release v3.3.8 --- .github/ISSUE_TEMPLATE/bug_report.yaml | 2 +- .github/ISSUE_TEMPLATE/feature_request.yaml | 2 +- docs/release-notes/version-3.3.md | 2 +- netbox/netbox/settings.py | 2 +- requirements.txt | 6 +++--- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml index 4de82d4e3..3beec4cf7 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yaml +++ b/.github/ISSUE_TEMPLATE/bug_report.yaml @@ -14,7 +14,7 @@ body: attributes: label: NetBox version description: What version of NetBox are you currently running? - placeholder: v3.3.7 + placeholder: v3.3.8 validations: required: true - type: dropdown diff --git a/.github/ISSUE_TEMPLATE/feature_request.yaml b/.github/ISSUE_TEMPLATE/feature_request.yaml index 5f0a17aa7..6688de9fe 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.yaml +++ b/.github/ISSUE_TEMPLATE/feature_request.yaml @@ -14,7 +14,7 @@ body: attributes: label: NetBox version description: What version of NetBox are you currently running? - placeholder: v3.3.7 + placeholder: v3.3.8 validations: required: true - type: dropdown diff --git a/docs/release-notes/version-3.3.md b/docs/release-notes/version-3.3.md index 3872b4c34..4894690de 100644 --- a/docs/release-notes/version-3.3.md +++ b/docs/release-notes/version-3.3.md @@ -1,6 +1,6 @@ # NetBox v3.3 -## v3.3.8 (FUTURE) +## v3.3.8 (2022-11-16) ### Enhancements diff --git a/netbox/netbox/settings.py b/netbox/netbox/settings.py index 4ff440c46..46663f08c 100644 --- a/netbox/netbox/settings.py +++ b/netbox/netbox/settings.py @@ -29,7 +29,7 @@ django.utils.encoding.force_text = force_str # Environment setup # -VERSION = '3.3.8-dev' +VERSION = '3.3.8' # Hostname HOSTNAME = platform.node() diff --git a/requirements.txt b/requirements.txt index 73abfa259..8e89b47c5 100644 --- a/requirements.txt +++ b/requirements.txt @@ -9,7 +9,7 @@ django-pglocks==1.0.4 django-prometheus==2.2.0 django-redis==5.2.0 django-rich==1.4.0 -django-rq==2.5.1 +django-rq==2.6.0 django-tables2==2.4.1 django-taggit==3.0.0 django-timezone-field==5.0 @@ -19,13 +19,13 @@ graphene-django==2.15.0 gunicorn==20.1.0 Jinja2==3.1.2 Markdown==3.3.7 -mkdocs-material==8.5.7 +mkdocs-material==8.5.10 mkdocstrings[python-legacy]==0.19.0 netaddr==0.8.0 Pillow==9.3.0 psycopg2-binary==2.9.5 PyYAML==6.0 -sentry-sdk==1.10.1 +sentry-sdk==1.11.0 social-auth-app-django==5.0.0 social-auth-core[openidconnect]==4.3.0 svgwrite==1.4.3 From e40e2550a618fbf2bf7d7227bc38889d08c45046 Mon Sep 17 00:00:00 2001 From: jeremystretch Date: Wed, 16 Nov 2022 11:34:45 -0500 Subject: [PATCH 10/10] PRVB --- docs/release-notes/version-3.3.md | 4 ++++ netbox/netbox/settings.py | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/docs/release-notes/version-3.3.md b/docs/release-notes/version-3.3.md index 4894690de..a46424df0 100644 --- a/docs/release-notes/version-3.3.md +++ b/docs/release-notes/version-3.3.md @@ -1,5 +1,9 @@ # NetBox v3.3 +## v3.3.9 (FUTURE) + +--- + ## v3.3.8 (2022-11-16) ### Enhancements diff --git a/netbox/netbox/settings.py b/netbox/netbox/settings.py index 46663f08c..ff0551fff 100644 --- a/netbox/netbox/settings.py +++ b/netbox/netbox/settings.py @@ -29,7 +29,7 @@ django.utils.encoding.force_text = force_str # Environment setup # -VERSION = '3.3.8' +VERSION = '3.3.9-dev' # Hostname HOSTNAME = platform.node()