diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f5f1587d8..cf8e58a17 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -103,14 +103,18 @@ any work that's already in progress. be assigned to you so that others are aware it's being worked on. A maintainer will then mark the issue as "accepted." -* Any pull request which does _not_ relate to an accepted issue will be closed. +* Any pull request which does _not_ relate to an **accepted** issue will be closed. -* All major new functionality must include relevant tests where applicable. +* All new functionality must include relevant tests where applicable. * When submitting a pull request, please be sure to work off of the `develop` branch, rather than `master`. The `develop` branch is used for ongoing development, while `master` is used for tagging stable releases. +* In most cases, it is not necessary to add a changelog entry: A maintainer will +take care of this when the PR is merged. (This helps avoid merge conflicts +resulting from multiple PRs being submitted simultaneously.) + * All code submissions should meet the following criteria (CI will enforce these checks): diff --git a/docs/release-notes/version-2.9.md b/docs/release-notes/version-2.9.md index 6c7839818..ebed19f20 100644 --- a/docs/release-notes/version-2.9.md +++ b/docs/release-notes/version-2.9.md @@ -1,5 +1,19 @@ # NetBox v2.9 +## v2.9.10 (FUTURE) + +### Enhancements + +* [#5337](https://github.com/netbox-community/netbox/issues/5337) - Add "splice" type for pass-through ports + +### Bug Fixes + +* [#5235](https://github.com/netbox-community/netbox/issues/5235) - Fix exception when editing IP address with a NAT IP assigned to a non-racked device +* [#5345](https://github.com/netbox-community/netbox/issues/5345) - Fix non-deterministic ordering of prefixes and IP addresses +* [#5350](https://github.com/netbox-community/netbox/issues/5350) - Filter available racks by selected group when creating a rack reservation + +--- + ## v2.9.9 (2020-11-09) ### Enhancements @@ -17,7 +31,6 @@ * [#5328](https://github.com/netbox-community/netbox/issues/5328) - Fix CreatedUpdatedFilterTest when running in non-UTC timezone * [#5331](https://github.com/netbox-community/netbox/issues/5331) - Fix filtering of sites by null region - --- ## v2.9.8 (2020-10-30) diff --git a/netbox/dcim/choices.py b/netbox/dcim/choices.py index d6aee8637..a6e0b1a0c 100644 --- a/netbox/dcim/choices.py +++ b/netbox/dcim/choices.py @@ -856,6 +856,7 @@ class PortTypeChoices(ChoiceSet): TYPE_MPO = 'mpo' TYPE_LSH = 'lsh' TYPE_LSH_APC = 'lsh-apc' + TYPE_SPLICE = 'splice' CHOICES = ( ( @@ -883,6 +884,7 @@ class PortTypeChoices(ChoiceSet): (TYPE_SC, 'SC'), (TYPE_SC_APC, 'SC/APC'), (TYPE_ST, 'ST'), + (TYPE_SPLICE, 'Splice'), ) ) ) diff --git a/netbox/dcim/forms.py b/netbox/dcim/forms.py index a80c88c9c..f54371ce4 100644 --- a/netbox/dcim/forms.py +++ b/netbox/dcim/forms.py @@ -741,7 +741,7 @@ class RackReservationForm(BootstrapMixin, TenancyForm, CustomFieldModelForm): display_field='display_name', query_params={ 'site_id': '$site', - 'group_id': '$rack', + 'group_id': '$rack_group', } ) units = NumericArrayField( diff --git a/netbox/ipam/api/views.py b/netbox/ipam/api/views.py index 0d50b6ea7..9e80e216b 100644 --- a/netbox/ipam/api/views.py +++ b/netbox/ipam/api/views.py @@ -90,7 +90,9 @@ class RoleViewSet(ModelViewSet): # class PrefixViewSet(CustomFieldModelViewSet): - queryset = Prefix.objects.prefetch_related('site', 'vrf__tenant', 'tenant', 'vlan', 'role', 'tags') + queryset = Prefix.objects.prefetch_related( + 'site', 'vrf__tenant', 'tenant', 'vlan', 'role', 'tags' + ).order_by(*Prefix._meta.ordering) serializer_class = serializers.PrefixSerializer filterset_class = filters.PrefixFilterSet @@ -260,7 +262,7 @@ class PrefixViewSet(CustomFieldModelViewSet): class IPAddressViewSet(CustomFieldModelViewSet): queryset = IPAddress.objects.prefetch_related( 'vrf__tenant', 'tenant', 'nat_inside', 'nat_outside', 'tags', 'assigned_object' - ) + ).order_by(*IPAddress._meta.ordering) serializer_class = serializers.IPAddressSerializer filterset_class = filters.IPAddressFilterSet diff --git a/netbox/ipam/forms.py b/netbox/ipam/forms.py index 1434002ea..0dcb02a0c 100644 --- a/netbox/ipam/forms.py +++ b/netbox/ipam/forms.py @@ -752,7 +752,8 @@ class IPAddressForm(BootstrapMixin, TenancyForm, ReturnURLForm, CustomFieldModel nat_inside_parent = instance.nat_inside.assigned_object if type(nat_inside_parent) is Interface: initial['nat_site'] = nat_inside_parent.device.site.pk - initial['nat_rack'] = nat_inside_parent.device.rack.pk + if nat_inside_parent.device.rack: + initial['nat_rack'] = nat_inside_parent.device.rack.pk initial['nat_device'] = nat_inside_parent.device.pk elif type(nat_inside_parent) is VMInterface: initial['nat_cluster'] = nat_inside_parent.virtual_machine.cluster.pk