diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index 3e1d0167d..1f8fdebd4 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -3,7 +3,10 @@ blank_issues_enabled: false contact_links: - name: 📖 Contributing Policy url: https://github.com/netbox-community/netbox/blob/develop/CONTRIBUTING.md - about: Please read through our contributing policy before opening an issue or pull request - - name: 💬 Discussion Group - url: https://groups.google.com/g/netbox-discuss - about: Join our discussion group for assistance with installation issues and other problems + about: "Please read through our contributing policy before opening an issue or pull request" + - name: ❓ Discussion + url: https://github.com/netbox-community/netbox/discussions + about: "If you're just looking for help, try starting a discussion instead" + - name: 💬 Community Slack + url: https://netdev.chat/ + about: "Join #netbox on the NetDev Community Slack for assistance with installation issues and other problems" diff --git a/docs/installation/index.md b/docs/installation/index.md index 2ae5e5299..1c2fcf567 100644 --- a/docs/installation/index.md +++ b/docs/installation/index.md @@ -24,7 +24,7 @@ The video below demonstrates the installation of NetBox v2.10.3 on Ubuntu 20.04 | Redis | 4.0 | !!! note - Python 3.7 or later will be required in NetBox v2.12. Users are strongly encouraged to install NetBox using Python 3.7 or later for new deployments. + Python 3.7 or later will be required in NetBox v3.0. Users are strongly encouraged to install NetBox using Python 3.7 or later for new deployments. Below is a simplified overview of the NetBox application stack for reference: diff --git a/docs/release-notes/version-2.11.md b/docs/release-notes/version-2.11.md index 4a0fcef8f..43ea4d5f6 100644 --- a/docs/release-notes/version-2.11.md +++ b/docs/release-notes/version-2.11.md @@ -1,5 +1,26 @@ # NetBox v2.11 +## v2.11.5 (FUTURE) + +### Enhancements + +* [#6087](https://github.com/netbox-community/netbox/issues/6087) - Improved prefix hierarchy rendering +* [#6487](https://github.com/netbox-community/netbox/issues/6487) - Add location filter to cable connection form +* [#6501](https://github.com/netbox-community/netbox/issues/6501) - Expose prefix depth and children on REST API serializer + +### Bug Fixes + +* [#6064](https://github.com/netbox-community/netbox/issues/6064) - Fix object permission assignments for user and group models +* [#6217](https://github.com/netbox-community/netbox/issues/6217) - Disallow passing of string values for integer custom fields +* [#6284](https://github.com/netbox-community/netbox/issues/6284) - Avoid sending redundant webhooks when adding/removing tags +* [#6492](https://github.com/netbox-community/netbox/issues/6492) - Correct tag population in post-change data resulting from REST API changes +* [#6496](https://github.com/netbox-community/netbox/issues/6496) - Fix upgrade script when Python installed in nonstandard path +* [#6502](https://github.com/netbox-community/netbox/issues/6502) - Correct permissions evaluation for running a report via the REST API +* [#6517](https://github.com/netbox-community/netbox/issues/6517) - Fix assignment of user when creating rack reservations via REST API +* [#6525](https://github.com/netbox-community/netbox/issues/6525) - Paginate related IPs table under IP address view + +--- + ## v2.11.4 (2021-05-25) ### Enhancements @@ -93,7 +114,7 @@ ## v2.11.0 (2021-04-16) -**Note:** NetBox v2.11 is the last major release that will support Python 3.6. Beginning with NetBox v2.12, Python 3.7 or later will be required. +**Note:** NetBox v2.11 is the last major release that will support Python 3.6. Beginning with NetBox v3.0, Python 3.7 or later will be required. ### Breaking Changes @@ -151,7 +172,7 @@ Devices can now be assigned to locations (formerly known as rack groups) within When exporting a list of objects in NetBox, users now have the option of selecting the "current view". This will render CSV output matching the current configuration of the table being viewed. For example, if you modify the sites list to display only the site name, tenant, and status, the rendered CSV will include only these columns, and they will appear in the order chosen. -The legacy static export behavior has been retained to ensure backward compatibility for dependent integrations. However, users are strongly encouraged to adapt custom export templates where needed as this functionality will be removed in v2.12. +The legacy static export behavior has been retained to ensure backward compatibility for dependent integrations. However, users are strongly encouraged to adapt custom export templates where needed as this functionality will be removed in v3.0. #### Variable Scope Support for VLAN Groups ([#5284](https://github.com/netbox-community/netbox/issues/5284)) diff --git a/netbox/dcim/api/views.py b/netbox/dcim/api/views.py index 9d402227f..47ab26828 100644 --- a/netbox/dcim/api/views.py +++ b/netbox/dcim/api/views.py @@ -246,10 +246,6 @@ class RackReservationViewSet(ModelViewSet): serializer_class = serializers.RackReservationSerializer filterset_class = filtersets.RackReservationFilterSet - # Assign user from request - def perform_create(self, serializer): - serializer.save(user=self.request.user) - # # Manufacturers diff --git a/netbox/dcim/forms.py b/netbox/dcim/forms.py index b37a88b9a..d6c119eca 100644 --- a/netbox/dcim/forms.py +++ b/netbox/dcim/forms.py @@ -3968,13 +3968,23 @@ class ConnectCableToDeviceForm(BootstrapMixin, CustomFieldModelForm): 'group_id': '$termination_b_site_group', } ) + termination_b_location = DynamicModelChoiceField( + queryset=Location.objects.all(), + label='Location', + required=False, + null_option='None', + query_params={ + 'site_id': '$termination_b_site' + } + ) termination_b_rack = DynamicModelChoiceField( queryset=Rack.objects.all(), label='Rack', required=False, null_option='None', query_params={ - 'site_id': '$termination_b_site' + 'site_id': '$termination_b_site', + 'location_id': '$termination_b_location', } ) termination_b_device = DynamicModelChoiceField( diff --git a/netbox/dcim/tests/test_api.py b/netbox/dcim/tests/test_api.py index 92ffd1207..2c64ad294 100644 --- a/netbox/dcim/tests/test_api.py +++ b/netbox/dcim/tests/test_api.py @@ -349,40 +349,36 @@ class RackReservationTest(APIViewTestCases.APIViewTestCase): user = User.objects.create(username='user1', is_active=True) site = Site.objects.create(name='Test Site 1', slug='test-site-1') - cls.racks = ( + racks = ( Rack(site=site, name='Rack 1'), Rack(site=site, name='Rack 2'), ) - Rack.objects.bulk_create(cls.racks) + Rack.objects.bulk_create(racks) rack_reservations = ( - RackReservation(rack=cls.racks[0], units=[1, 2, 3], user=user, description='Reservation #1'), - RackReservation(rack=cls.racks[0], units=[4, 5, 6], user=user, description='Reservation #2'), - RackReservation(rack=cls.racks[0], units=[7, 8, 9], user=user, description='Reservation #3'), + RackReservation(rack=racks[0], units=[1, 2, 3], user=user, description='Reservation #1'), + RackReservation(rack=racks[0], units=[4, 5, 6], user=user, description='Reservation #2'), + RackReservation(rack=racks[0], units=[7, 8, 9], user=user, description='Reservation #3'), ) RackReservation.objects.bulk_create(rack_reservations) - def setUp(self): - super().setUp() - - # We have to set creation data under setUp() because we need access to the test user. - self.create_data = [ + cls.create_data = [ { - 'rack': self.racks[1].pk, + 'rack': racks[1].pk, 'units': [10, 11, 12], - 'user': self.user.pk, + 'user': user.pk, 'description': 'Reservation #4', }, { - 'rack': self.racks[1].pk, + 'rack': racks[1].pk, 'units': [13, 14, 15], - 'user': self.user.pk, + 'user': user.pk, 'description': 'Reservation #5', }, { - 'rack': self.racks[1].pk, + 'rack': racks[1].pk, 'units': [16, 17, 18], - 'user': self.user.pk, + 'user': user.pk, 'description': 'Reservation #6', }, ] diff --git a/netbox/extras/api/views.py b/netbox/extras/api/views.py index 7e6c97782..fbeba8328 100644 --- a/netbox/extras/api/views.py +++ b/netbox/extras/api/views.py @@ -239,7 +239,7 @@ class ReportViewSet(ViewSet): Run a Report identified as ".