From a665b79f85c02eddb54709dee3398e1ea5d5d188 Mon Sep 17 00:00:00 2001 From: Your Name Date: Fri, 4 Jun 2021 16:46:02 +0200 Subject: [PATCH 01/18] #6455 - initial --- netbox/ipam/models/ip.py | 14 ++------------ netbox/ipam/views.py | 2 +- 2 files changed, 3 insertions(+), 13 deletions(-) diff --git a/netbox/ipam/models/ip.py b/netbox/ipam/models/ip.py index c6c8cf74c18..1f3766e3ac5 100644 --- a/netbox/ipam/models/ip.py +++ b/netbox/ipam/models/ip.py @@ -340,16 +340,6 @@ def clean(self): 'prefix': "Cannot create prefix with /0 mask." }) - # Disallow host masks - if self.prefix.version == 4 and self.prefix.prefixlen == 32: - raise ValidationError({ - 'prefix': "Cannot create host addresses (/32) as prefixes. Create an IPv4 address instead." - }) - elif self.prefix.version == 6 and self.prefix.prefixlen == 128: - raise ValidationError({ - 'prefix': "Cannot create host addresses (/128) as prefixes. Create an IPv6 address instead." - }) - # Enforce unique IP space (if applicable) if (self.vrf is None and settings.ENFORCE_GLOBAL_UNIQUE) or (self.vrf and self.vrf.enforce_unique): duplicate_prefixes = self.get_duplicates() @@ -471,8 +461,8 @@ def get_available_ips(self): child_ips = netaddr.IPSet([ip.address.ip for ip in self.get_child_ips()]) available_ips = prefix - child_ips - # IPv6, pool, or IPv4 /31 sets are fully usable - if self.family == 6 or self.is_pool or self.prefix.prefixlen == 31: + # IPv6, pool, or IPv4 /31-/32 sets are fully usable + if self.family == 6 or self.is_pool or (self.family == 4 and self.prefix.prefixlen >= 31): return available_ips # For "normal" IPv4 prefixes, omit first and last addresses diff --git a/netbox/ipam/views.py b/netbox/ipam/views.py index 8de6e9b1cfc..919b09b794a 100644 --- a/netbox/ipam/views.py +++ b/netbox/ipam/views.py @@ -522,7 +522,7 @@ def get_extra_context(self, request, instance): # Parent prefixes table parent_prefixes = Prefix.objects.restrict(request.user, 'view').filter( vrf=instance.vrf, - prefix__net_contains=str(instance.address.ip) + prefix__net_contains_or_equals=str(instance.address.ip) ).prefetch_related( 'site', 'role' ) From 7444110c79f0dbbe3a19047962040ebe09eb51cb Mon Sep 17 00:00:00 2001 From: jeremystretch Date: Fri, 4 Jun 2021 11:15:12 -0400 Subject: [PATCH 02/18] PRVB --- 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 d0fce66283b..11c0f750f13 100644 --- a/netbox/netbox/settings.py +++ b/netbox/netbox/settings.py @@ -16,7 +16,7 @@ # Environment setup # -VERSION = '2.11.6' +VERSION = '2.11.7-dev' # Hostname HOSTNAME = platform.node() From a224e5d4702a8551565bfd8a7d8a3504cb180daa Mon Sep 17 00:00:00 2001 From: drmsoffall Date: Sat, 5 Jun 2021 18:46:52 +0000 Subject: [PATCH 03/18] Closes #6493: show ObjectChange diff for non-atomic changes --- netbox/extras/views.py | 18 +++++++++++++----- netbox/templates/extras/objectchange.html | 2 ++ 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/netbox/extras/views.py b/netbox/extras/views.py index 3f86c98d27c..5316cfbec32 100644 --- a/netbox/extras/views.py +++ b/netbox/extras/views.py @@ -202,15 +202,22 @@ def get_extra_context(self, request, instance): next_change = objectchanges.filter(time__gt=instance.time).order_by('time').first() prev_change = objectchanges.filter(time__lt=instance.time).order_by('-time').first() - if instance.prechange_data and instance.postchange_data: + if not instance.prechange_data and instance.action in ['update', 'delete'] and prev_change: + non_atomic_change = True + prechange_data = prev_change.postchange_data + else: + non_atomic_change = False + prechange_data = instance.prechange_data + + if prechange_data and instance.postchange_data: diff_added = shallow_compare_dict( - instance.prechange_data or dict(), + prechange_data or dict(), instance.postchange_data or dict(), exclude=['last_updated'], ) diff_removed = { - x: instance.prechange_data.get(x) for x in diff_added - } if instance.prechange_data else {} + x: prechange_data.get(x) for x in diff_added + } if prechange_data else {} else: diff_added = None diff_removed = None @@ -221,7 +228,8 @@ def get_extra_context(self, request, instance): 'next_change': next_change, 'prev_change': prev_change, 'related_changes_table': related_changes_table, - 'related_changes_count': related_changes.count() + 'related_changes_count': related_changes.count(), + 'non_atomic_change': non_atomic_change } diff --git a/netbox/templates/extras/objectchange.html b/netbox/templates/extras/objectchange.html index 9dcd8c2ac21..c49cea79ba5 100644 --- a/netbox/templates/extras/objectchange.html +++ b/netbox/templates/extras/objectchange.html @@ -128,6 +128,8 @@ {{ k }}: {{ v|render_json }} {% endspaceless %} {% endfor %} + {% elif non_atomic_change %} + Warning: Comparing non-atomic change to previous change record ({{ prev_change.pk }}) {% else %} None {% endif %} From cb4392628fe55fa3be6781d688f241107b66645c Mon Sep 17 00:00:00 2001 From: jeremystretch Date: Tue, 8 Jun 2021 14:06:17 -0400 Subject: [PATCH 04/18] Fixes #6553: ProviderNetwork search should match on name --- docs/release-notes/version-2.11.md | 8 ++++++++ netbox/circuits/filtersets.py | 1 + 2 files changed, 9 insertions(+) diff --git a/docs/release-notes/version-2.11.md b/docs/release-notes/version-2.11.md index 69df4d61498..253db730257 100644 --- a/docs/release-notes/version-2.11.md +++ b/docs/release-notes/version-2.11.md @@ -1,5 +1,13 @@ # NetBox v2.11 +## v2.11.7 (FUTURE) + +### Bug Fixes + +* [#6553](https://github.com/netbox-community/netbox/issues/6553) - ProviderNetwork search should match on name + +--- + ## v2.11.6 (2021-06-04) ### Bug Fixes diff --git a/netbox/circuits/filtersets.py b/netbox/circuits/filtersets.py index 066178685dc..15bc5a8b3c1 100644 --- a/netbox/circuits/filtersets.py +++ b/netbox/circuits/filtersets.py @@ -104,6 +104,7 @@ def search(self, queryset, name, value): if not value.strip(): return queryset return queryset.filter( + Q(name__icontains=value) | Q(description__icontains=value) | Q(comments__icontains=value) ).distinct() From 6ec296f2a78056518afcc01f1d52fa59edfd867a Mon Sep 17 00:00:00 2001 From: jeremystretch Date: Tue, 8 Jun 2021 14:15:06 -0400 Subject: [PATCH 05/18] Fixes #6563: Fix filtering by location for cable connection forms --- docs/release-notes/version-2.11.md | 1 + netbox/dcim/forms.py | 1 + 2 files changed, 2 insertions(+) diff --git a/docs/release-notes/version-2.11.md b/docs/release-notes/version-2.11.md index 253db730257..3929a3f8d73 100644 --- a/docs/release-notes/version-2.11.md +++ b/docs/release-notes/version-2.11.md @@ -5,6 +5,7 @@ ### Bug Fixes * [#6553](https://github.com/netbox-community/netbox/issues/6553) - ProviderNetwork search should match on name +* [#6563](https://github.com/netbox-community/netbox/issues/6563) - Fix filtering by location for cable connection forms --- diff --git a/netbox/dcim/forms.py b/netbox/dcim/forms.py index c9c7c86a610..0649168e239 100644 --- a/netbox/dcim/forms.py +++ b/netbox/dcim/forms.py @@ -3948,6 +3948,7 @@ class ConnectCableToDeviceForm(BootstrapMixin, CustomFieldModelForm): required=False, query_params={ 'site_id': '$termination_b_site', + 'location_id': '$termination_b_location', 'rack_id': '$termination_b_rack', } ) From b3cde51590169b162006aac6eae5052b8076dda5 Mon Sep 17 00:00:00 2001 From: jeremystretch Date: Tue, 8 Jun 2021 14:18:24 -0400 Subject: [PATCH 06/18] Fixes #6562: Disable ordering of secrets by assigned object --- docs/release-notes/version-2.11.md | 1 + netbox/secrets/tables.py | 1 + 2 files changed, 2 insertions(+) diff --git a/docs/release-notes/version-2.11.md b/docs/release-notes/version-2.11.md index 3929a3f8d73..532b3a019ed 100644 --- a/docs/release-notes/version-2.11.md +++ b/docs/release-notes/version-2.11.md @@ -5,6 +5,7 @@ ### Bug Fixes * [#6553](https://github.com/netbox-community/netbox/issues/6553) - ProviderNetwork search should match on name +* [#6562](https://github.com/netbox-community/netbox/issues/6562) - Disable ordering of secrets by assigned object * [#6563](https://github.com/netbox-community/netbox/issues/6563) - Fix filtering by location for cable connection forms --- diff --git a/netbox/secrets/tables.py b/netbox/secrets/tables.py index 7e164920a02..a8324a65dde 100644 --- a/netbox/secrets/tables.py +++ b/netbox/secrets/tables.py @@ -37,6 +37,7 @@ class SecretTable(BaseTable): ) assigned_object = tables.Column( linkify=True, + orderable=False, verbose_name='Assigned object' ) role = tables.Column( From 79c06442db7b36e46d2d188984b48f4c8964f5a3 Mon Sep 17 00:00:00 2001 From: jeremystretch Date: Tue, 8 Jun 2021 15:39:39 -0400 Subject: [PATCH 07/18] Changelog for #6455, 6493 --- docs/release-notes/version-2.11.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/release-notes/version-2.11.md b/docs/release-notes/version-2.11.md index 532b3a019ed..56417fce9e8 100644 --- a/docs/release-notes/version-2.11.md +++ b/docs/release-notes/version-2.11.md @@ -2,6 +2,11 @@ ## v2.11.7 (FUTURE) +### Enhancements + +* [#6455](https://github.com/netbox-community/netbox/issues/6455) - Permit /32 IPv4 and /128 IPv6 prefixes +* [#6493](https://github.com/netbox-community/netbox/issues/6493) - Show change log diff for non-atomic (pre-2.11) changes + ### Bug Fixes * [#6553](https://github.com/netbox-community/netbox/issues/6553) - ProviderNetwork search should match on name From 809d9e4697bb8a94192ba73dbc2421b7ea9fda1b Mon Sep 17 00:00:00 2001 From: jeremystretch Date: Thu, 10 Jun 2021 14:27:42 -0400 Subject: [PATCH 08/18] Fixes #6584: Fix ordering of nested inventory items --- docs/release-notes/version-2.11.md | 1 + netbox/dcim/tables/devices.py | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/release-notes/version-2.11.md b/docs/release-notes/version-2.11.md index 56417fce9e8..f010e5d1b80 100644 --- a/docs/release-notes/version-2.11.md +++ b/docs/release-notes/version-2.11.md @@ -12,6 +12,7 @@ * [#6553](https://github.com/netbox-community/netbox/issues/6553) - ProviderNetwork search should match on name * [#6562](https://github.com/netbox-community/netbox/issues/6562) - Disable ordering of secrets by assigned object * [#6563](https://github.com/netbox-community/netbox/issues/6563) - Fix filtering by location for cable connection forms +* [#6584](https://github.com/netbox-community/netbox/issues/6584) - Fix ordering of nested inventory items --- diff --git a/netbox/dcim/tables/devices.py b/netbox/dcim/tables/devices.py index 5f275f1ebf5..258e712d53e 100644 --- a/netbox/dcim/tables/devices.py +++ b/netbox/dcim/tables/devices.py @@ -694,7 +694,7 @@ class InventoryItemTable(DeviceComponentTable): ) cable = None # Override DeviceComponentTable - class Meta(DeviceComponentTable.Meta): + class Meta(BaseTable.Meta): model = InventoryItem fields = ( 'pk', 'device', 'name', 'label', 'manufacturer', 'part_id', 'serial', 'asset_tag', 'description', @@ -715,7 +715,7 @@ class DeviceInventoryItemTable(InventoryItemTable): buttons=('edit', 'delete') ) - class Meta(DeviceComponentTable.Meta): + class Meta(BaseTable.Meta): model = InventoryItem fields = ( 'pk', 'name', 'label', 'manufacturer', 'part_id', 'serial', 'asset_tag', 'description', 'discovered', From 7e481960f9035ccc168a5063c9510b127f8846dc Mon Sep 17 00:00:00 2001 From: jeremystretch Date: Mon, 14 Jun 2021 09:19:05 -0400 Subject: [PATCH 09/18] Optimize MPTTColumn rendering --- netbox/utilities/tables.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/netbox/utilities/tables.py b/netbox/utilities/tables.py index 14dc3ab6d37..b0797fa50f1 100644 --- a/netbox/utilities/tables.py +++ b/netbox/utilities/tables.py @@ -340,8 +340,11 @@ class MPTTColumn(tables.TemplateColumn): """ Display a nested hierarchy for MPTT-enabled models. """ - template_code = """{% for i in record.get_ancestors %}{% endfor %}""" \ - """{{ record.name }}""" + template_code = """ + {% load helpers %} + {% for i in record.level|as_range %}{% endfor %} + {{ record.name }} + """ def __init__(self, *args, **kwargs): super().__init__( From 54ccc705d05ee2e145205973d15b06ef37d57592 Mon Sep 17 00:00:00 2001 From: jeremystretch Date: Mon, 14 Jun 2021 14:08:55 -0400 Subject: [PATCH 10/18] Adopt IRM terminology --- README.md | 11 ++++------- docs/index.md | 2 +- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 2ab04db02cb..ccce0eec6ac 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,10 @@ NetBox logo -NetBox is an IP address management (IPAM) and data center infrastructure -management (DCIM) tool. Initially conceived by the network engineering team at +![Master branch build status](https://github.com/netbox-community/netbox/workflows/CI/badge.svg?branch=master) + +NetBox is an infrastructure resource modeling (IRM) tool designed to empower +network automation. Initially conceived by the network engineering team at [DigitalOcean](https://www.digitalocean.com/), NetBox was developed specifically to address the needs of network and infrastructure engineers. It is intended to function as a domain-specific source of truth for network operations. @@ -14,11 +16,6 @@ complete list of requirements, see `requirements.txt`. The code is available [on The complete documentation for NetBox can be found at [Read the Docs](https://netbox.readthedocs.io/en/stable/). A public demo instance is available at https://demo.netbox.dev. -| | status | -|-------------|------------| -| **master** | ![Build status](https://github.com/netbox-community/netbox/workflows/CI/badge.svg?branch=master) | -| **develop** | ![Build status](https://github.com/netbox-community/netbox/workflows/CI/badge.svg?branch=develop) | -

Thank you to our sponsors!

diff --git a/docs/index.md b/docs/index.md index 9dedfedfff3..5cdf871d993 100644 --- a/docs/index.md +++ b/docs/index.md @@ -2,7 +2,7 @@ # What is NetBox? -NetBox is an open source web application designed to help manage and document computer networks. Initially conceived by the network engineering team at [DigitalOcean](https://www.digitalocean.com/), NetBox was developed specifically to address the needs of network and infrastructure engineers. It encompasses the following aspects of network management: +NetBox is an infrastructure resource modeling (IRM) application designed to empower network automation. Initially conceived by the network engineering team at [DigitalOcean](https://www.digitalocean.com/), NetBox was developed specifically to address the needs of network and infrastructure engineers. NetBox is made available as open source under the Apache 2 license. It encompasses the following aspects of network management: * **IP address management (IPAM)** - IP networks and addresses, VRFs, and VLANs * **Equipment racks** - Organized by group and site From f56a470cc7460fd4c5888efd4ebd9a81fc0e9f55 Mon Sep 17 00:00:00 2001 From: jeremystretch Date: Mon, 14 Jun 2021 16:38:19 -0400 Subject: [PATCH 11/18] Fixes #6602: Fix deletion of devices with cables attached --- docs/release-notes/version-2.11.md | 1 + netbox/dcim/signals.py | 10 ++++------ 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/docs/release-notes/version-2.11.md b/docs/release-notes/version-2.11.md index f010e5d1b80..379c717c7f8 100644 --- a/docs/release-notes/version-2.11.md +++ b/docs/release-notes/version-2.11.md @@ -13,6 +13,7 @@ * [#6562](https://github.com/netbox-community/netbox/issues/6562) - Disable ordering of secrets by assigned object * [#6563](https://github.com/netbox-community/netbox/issues/6563) - Fix filtering by location for cable connection forms * [#6584](https://github.com/netbox-community/netbox/issues/6584) - Fix ordering of nested inventory items +* [#6602](https://github.com/netbox-community/netbox/issues/6602) - Fix deletion of devices with cables attached --- diff --git a/netbox/dcim/signals.py b/netbox/dcim/signals.py index 8675ee7ce1d..33a868f2c1d 100644 --- a/netbox/dcim/signals.py +++ b/netbox/dcim/signals.py @@ -146,14 +146,12 @@ def nullify_connected_endpoints(instance, **kwargs): # Disassociate the Cable from its termination points if instance.termination_a is not None: logger.debug(f"Nullifying termination A for cable {instance}") - instance.termination_a.cable = None - instance.termination_a._cable_peer = None - instance.termination_a.save() + model = instance.termination_a._meta.model + model.objects.filter(pk=instance.termination_a.pk).update(_cable_peer_type=None, _cable_peer_id=None) if instance.termination_b is not None: logger.debug(f"Nullifying termination B for cable {instance}") - instance.termination_b.cable = None - instance.termination_b._cable_peer = None - instance.termination_b.save() + model = instance.termination_b._meta.model + model.objects.filter(pk=instance.termination_b.pk).update(_cable_peer_type=None, _cable_peer_id=None) # Delete and retrace any dependent cable paths for cablepath in CablePath.objects.filter(path__contains=instance): From 9f2c4919eb9b0df42f23ea0f674d0fdb8a89e90b Mon Sep 17 00:00:00 2001 From: jeremystretch Date: Mon, 14 Jun 2021 16:41:10 -0400 Subject: [PATCH 12/18] Update NetDev Slack links --- CONTRIBUTING.md | 2 +- README.md | 2 +- docs/development/index.md | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 009e6586cee..5707f4ad272 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -25,7 +25,7 @@ discussions. ### Slack -For real-time chat, you can join the **#netbox** Slack channel on [NetDev Community](https://slack.netbox.dev/). +For real-time chat, you can join the **#netbox** Slack channel on [NetDev Community](https://netdev.chat/). Unfortunately, the Slack channel does not provide long-term retention of chat history, so try to avoid it for any discussions would benefit from being preserved for future reference. diff --git a/README.md b/README.md index ccce0eec6ac..8761bac1ea2 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ The complete documentation for NetBox can be found at [Read the Docs](https://ne ### Discussion * [GitHub Discussions](https://github.com/netbox-community/netbox/discussions) - Discussion forum hosted by GitHub; ideal for Q&A and other structured discussions -* [Slack](https://slack.netbox.dev/) - Real-time chat hosted by the NetDev Community; best for unstructured discussion or just hanging out +* [Slack](https://netdev.chat/) - Real-time chat hosted by the NetDev Community; best for unstructured discussion or just hanging out * [Google Group](https://groups.google.com/g/netbox-discuss) - Legacy mailing list; slowly being replaced by GitHub discussions ### Installation diff --git a/docs/development/index.md b/docs/development/index.md index e9758e74b7c..b856e315b06 100644 --- a/docs/development/index.md +++ b/docs/development/index.md @@ -8,7 +8,7 @@ There are several official forums for communication among the developers and com * [GitHub issues](https://github.com/netbox-community/netbox/issues) - All feature requests, bug reports, and other substantial changes to the code base **must** be documented in an issue. * [GitHub Discussions](https://github.com/netbox-community/netbox/discussions) - The preferred forum for general discussion and support issues. Ideal for shaping a feature request prior to submitting an issue. -* [#netbox on NetDev Community Slack](https://slack.netbox.dev/) - Good for quick chats. Avoid any discussion that might need to be referenced later on, as the chat history is not retained long. +* [#netbox on NetDev Community Slack](https://netdev.chat/) - Good for quick chats. Avoid any discussion that might need to be referenced later on, as the chat history is not retained long. * [Google Group](https://groups.google.com/g/netbox-discuss) - Legacy mailing list; slowly being phased out in favor of GitHub discussions. ## Governance From c8a8bfd84da20f72a52bc739c1ae31b4e973a9d4 Mon Sep 17 00:00:00 2001 From: bluikko <14869000+bluikko@users.noreply.github.com> Date: Tue, 15 Jun 2021 15:05:37 +0700 Subject: [PATCH 13/18] custom fields documentation missing word "more" The "one or object types" looks like it is missing the word "more". --- docs/additional-features/custom-fields.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/additional-features/custom-fields.md b/docs/additional-features/custom-fields.md index 618d0705204..649f6925618 100644 --- a/docs/additional-features/custom-fields.md +++ b/docs/additional-features/custom-fields.md @@ -24,7 +24,7 @@ Marking a field as required will force the user to provide a value for the field The filter logic controls how values are matched when filtering objects by the custom field. Loose filtering (the default) matches on a partial value, whereas exact matching requires a complete match of the given string to a field's value. For example, exact filtering with the string "red" will only match the exact value "red", whereas loose filtering will match on the values "red", "red-orange", or "bored". Setting the filter logic to "disabled" disables filtering by the field entirely. -A custom field must be assigned to one or object types, or models, in NetBox. Once created, custom fields will automatically appear as part of these models in the web UI and REST API. Note that not all models support custom fields. +A custom field must be assigned to one or more object types, or models, in NetBox. Once created, custom fields will automatically appear as part of these models in the web UI and REST API. Note that not all models support custom fields. ### Custom Field Validation From e68be6f041c6f32cb1e87844e6094ebd1fe34579 Mon Sep 17 00:00:00 2001 From: jeremystretch Date: Tue, 15 Jun 2021 15:22:20 -0400 Subject: [PATCH 14/18] Add Equinix Metal as a sponsor --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 8761bac1ea2..cb199144764 100644 --- a/README.md +++ b/README.md @@ -21,8 +21,10 @@ The complete documentation for NetBox can be found at [Read the Docs](https://ne [![DigitalOcean](https://raw.githubusercontent.com/wiki/netbox-community/netbox/images/sponsors/digitalocean.png)](https://try.digitalocean.com/developer-cloud)            - [![NS1](https://raw.githubusercontent.com/wiki/netbox-community/netbox/images/sponsors/ns1.png)](https://ns1.com/) + [![Equinix Metal](https://raw.githubusercontent.com/wiki/netbox-community/netbox/images/sponsors/equinix.png)](https://metal.equinix.com/)            + [![NS1](https://raw.githubusercontent.com/wiki/netbox-community/netbox/images/sponsors/ns1.png)](https://ns1.com/) +
[![Stellar Technologies](https://raw.githubusercontent.com/wiki/netbox-community/netbox/images/sponsors/stellar.png)](https://stellar.tech/)
From 857c70ece97c97e4c43ea30502edd3c3006a6d67 Mon Sep 17 00:00:00 2001 From: jeremystretch Date: Wed, 16 Jun 2021 13:43:38 -0400 Subject: [PATCH 15/18] Closes #6564: Add N connector type for pass-through ports --- docs/release-notes/version-2.11.md | 1 + netbox/dcim/choices.py | 2 ++ 2 files changed, 3 insertions(+) diff --git a/docs/release-notes/version-2.11.md b/docs/release-notes/version-2.11.md index 379c717c7f8..c3840285660 100644 --- a/docs/release-notes/version-2.11.md +++ b/docs/release-notes/version-2.11.md @@ -6,6 +6,7 @@ * [#6455](https://github.com/netbox-community/netbox/issues/6455) - Permit /32 IPv4 and /128 IPv6 prefixes * [#6493](https://github.com/netbox-community/netbox/issues/6493) - Show change log diff for non-atomic (pre-2.11) changes +* [#6564](https://github.com/netbox-community/netbox/issues/6564) - Add N connector type for pass-through ports ### Bug Fixes diff --git a/netbox/dcim/choices.py b/netbox/dcim/choices.py index 1d3e698a5ff..63f44ea3737 100644 --- a/netbox/dcim/choices.py +++ b/netbox/dcim/choices.py @@ -924,6 +924,7 @@ class PortTypeChoices(ChoiceSet): TYPE_110_PUNCH = '110-punch' TYPE_BNC = 'bnc' TYPE_F = 'f' + TYPE_N = 'n' TYPE_MRJ21 = 'mrj21' TYPE_ST = 'st' TYPE_SC = 'sc' @@ -954,6 +955,7 @@ class PortTypeChoices(ChoiceSet): (TYPE_110_PUNCH, '110 Punch'), (TYPE_BNC, 'BNC'), (TYPE_F, 'F Connector'), + (TYPE_N, 'N Connector'), (TYPE_MRJ21, 'MRJ21'), ), ), From 6a6b0236a9a15e3d7c9edb02d5e7d8c40ef5b912 Mon Sep 17 00:00:00 2001 From: jeremystretch Date: Wed, 16 Jun 2021 13:50:35 -0400 Subject: [PATCH 16/18] Closes #6589: Standardize breadcrumb navigation for power panels and feeds --- docs/release-notes/version-2.11.md | 1 + netbox/templates/dcim/powerfeed.html | 6 +++--- netbox/templates/dcim/powerpanel.html | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/docs/release-notes/version-2.11.md b/docs/release-notes/version-2.11.md index c3840285660..180c29af8b4 100644 --- a/docs/release-notes/version-2.11.md +++ b/docs/release-notes/version-2.11.md @@ -7,6 +7,7 @@ * [#6455](https://github.com/netbox-community/netbox/issues/6455) - Permit /32 IPv4 and /128 IPv6 prefixes * [#6493](https://github.com/netbox-community/netbox/issues/6493) - Show change log diff for non-atomic (pre-2.11) changes * [#6564](https://github.com/netbox-community/netbox/issues/6564) - Add N connector type for pass-through ports +* [#6589](https://github.com/netbox-community/netbox/issues/6589) - Standardize breadcrumb navigation for power panels and feeds ### Bug Fixes diff --git a/netbox/templates/dcim/powerfeed.html b/netbox/templates/dcim/powerfeed.html index 283eed4c1a6..d2a6ec1a304 100644 --- a/netbox/templates/dcim/powerfeed.html +++ b/netbox/templates/dcim/powerfeed.html @@ -7,10 +7,10 @@ {% block breadcrumbs %}
  • Power Feeds
  • -
  • {{ object.power_panel.site }}
  • -
  • {{ object.power_panel }}
  • +
  • {{ object.power_panel.site }}
  • +
  • {{ object.power_panel }}
  • {% if object.rack %} -
  • {{ object.rack }}
  • +
  • {{ object.rack }}
  • {% endif %}
  • {{ object }}
  • {% endblock %} diff --git a/netbox/templates/dcim/powerpanel.html b/netbox/templates/dcim/powerpanel.html index 0ddfa38851d..9deb1200598 100644 --- a/netbox/templates/dcim/powerpanel.html +++ b/netbox/templates/dcim/powerpanel.html @@ -5,7 +5,7 @@ {% block breadcrumbs %}
  • Power Panels
  • -
  • {{ object.site }}
  • +
  • {{ object.site }}
  • {% if object.location %}
  • {{ object.location }}
  • {% endif %} From 685e0ce00df8e2351b2469d885fd8054f6e2a5f7 Mon Sep 17 00:00:00 2001 From: jeremystretch Date: Wed, 16 Jun 2021 14:01:30 -0400 Subject: [PATCH 17/18] Closes #6588: Add support for webp files as front/rear device type images --- docs/release-notes/version-2.11.md | 1 + netbox/dcim/constants.py | 3 +++ netbox/dcim/forms.py | 5 ++--- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/docs/release-notes/version-2.11.md b/docs/release-notes/version-2.11.md index 180c29af8b4..3e15eb3233e 100644 --- a/docs/release-notes/version-2.11.md +++ b/docs/release-notes/version-2.11.md @@ -7,6 +7,7 @@ * [#6455](https://github.com/netbox-community/netbox/issues/6455) - Permit /32 IPv4 and /128 IPv6 prefixes * [#6493](https://github.com/netbox-community/netbox/issues/6493) - Show change log diff for non-atomic (pre-2.11) changes * [#6564](https://github.com/netbox-community/netbox/issues/6564) - Add N connector type for pass-through ports +* [#6588](https://github.com/netbox-community/netbox/issues/6588) - Add support for webp files as front/rear device type images * [#6589](https://github.com/netbox-community/netbox/issues/6589) - Standardize breadcrumb navigation for power panels and feeds ### Bug Fixes diff --git a/netbox/dcim/constants.py b/netbox/dcim/constants.py index 0fc69be3bbb..42ed7c7d004 100644 --- a/netbox/dcim/constants.py +++ b/netbox/dcim/constants.py @@ -2,6 +2,9 @@ from .choices import InterfaceTypeChoices +# Exclude SVG images (unsupported by PIL) +DEVICETYPE_IMAGE_FORMATS = 'image/bmp,image/gif,image/jpeg,image/png,image/tiff,image/webp' + # # Racks diff --git a/netbox/dcim/forms.py b/netbox/dcim/forms.py index 0649168e239..eec828f137d 100644 --- a/netbox/dcim/forms.py +++ b/netbox/dcim/forms.py @@ -1172,12 +1172,11 @@ class Meta: ) widgets = { 'subdevice_role': StaticSelect2(), - # Exclude SVG images (unsupported by PIL) 'front_image': forms.ClearableFileInput(attrs={ - 'accept': 'image/bmp,image/gif,image/jpeg,image/png,image/tiff' + 'accept': DEVICETYPE_IMAGE_FORMATS }), 'rear_image': forms.ClearableFileInput(attrs={ - 'accept': 'image/bmp,image/gif,image/jpeg,image/png,image/tiff' + 'accept': DEVICETYPE_IMAGE_FORMATS }) } From 2bf20fa501bd23c8ef3eb50ce51d185e08383219 Mon Sep 17 00:00:00 2001 From: jeremystretch Date: Wed, 16 Jun 2021 15:59:46 -0400 Subject: [PATCH 18/18] Release NetBox v2.11.7 --- .github/ISSUE_TEMPLATE/bug_report.yaml | 2 +- .github/ISSUE_TEMPLATE/feature_request.yaml | 2 +- docs/release-notes/version-2.11.md | 2 +- netbox/netbox/settings.py | 2 +- requirements.txt | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml index 419af2c7ac2..66f675d7c4d 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yaml +++ b/.github/ISSUE_TEMPLATE/bug_report.yaml @@ -17,7 +17,7 @@ body: What version of NetBox are you currently running? (If you don't have access to the most recent NetBox release, consider testing on our [demo instance](https://demo.netbox.dev/) before opening a bug report to see if your issue has already been addressed.) - placeholder: v2.11.6 + placeholder: v2.11.7 validations: required: true - type: dropdown diff --git a/.github/ISSUE_TEMPLATE/feature_request.yaml b/.github/ISSUE_TEMPLATE/feature_request.yaml index 80cad1a5230..eaa9a12007e 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: v2.11.6 + placeholder: v2.11.7 validations: required: true - type: dropdown diff --git a/docs/release-notes/version-2.11.md b/docs/release-notes/version-2.11.md index 3e15eb3233e..aabc726f09d 100644 --- a/docs/release-notes/version-2.11.md +++ b/docs/release-notes/version-2.11.md @@ -1,6 +1,6 @@ # NetBox v2.11 -## v2.11.7 (FUTURE) +## v2.11.7 (2021-06-16) ### Enhancements diff --git a/netbox/netbox/settings.py b/netbox/netbox/settings.py index 11c0f750f13..301c8650df1 100644 --- a/netbox/netbox/settings.py +++ b/netbox/netbox/settings.py @@ -16,7 +16,7 @@ # Environment setup # -VERSION = '2.11.7-dev' +VERSION = '2.11.7' # Hostname HOSTNAME = platform.node() diff --git a/requirements.txt b/requirements.txt index ae2b11d1787..467a485429b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -17,7 +17,7 @@ Jinja2==3.0.1 Markdown==3.3.4 netaddr==0.8.0 Pillow==8.2.0 -psycopg2-binary==2.8.6 +psycopg2-binary==2.9 pycryptodome==3.10.1 PyYAML==5.4.1 svgwrite==1.4.1