Skip to content

Commit 09d6b9c

Browse files
Merge pull request #17157 from netbox-community/develop
Release v4.0.9
2 parents c8b4fae + 4747cde commit 09d6b9c

File tree

46 files changed

+7245
-4632
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+7245
-4632
lines changed

.github/ISSUE_TEMPLATE/bug_report.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ body:
2626
attributes:
2727
label: NetBox Version
2828
description: What version of NetBox are you currently running?
29-
placeholder: v4.0.8
29+
placeholder: v4.0.9
3030
validations:
3131
required: true
3232
- type: dropdown

.github/ISSUE_TEMPLATE/feature_request.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ body:
1414
attributes:
1515
label: NetBox version
1616
description: What version of NetBox are you currently running?
17-
placeholder: v4.0.8
17+
placeholder: v4.0.9
1818
validations:
1919
required: true
2020
- type: dropdown

CONTRIBUTING.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ NetBox users are welcome to participate in either role, on stage or in the crowd
4040

4141
* First, ensure that you're running the [latest stable version](https://github.com/netbox-community/netbox/releases) of NetBox. If you're running an older version, it's likely that the bug has already been fixed.
4242

43-
* Next, search our [issues list](https://github.com/netbox-community/netbox/issues?q=is%3Aissue) to see if the bug you've found has already been reported. If you come across a bug report that seems to match, please click "add a reaction" in the bottom left corner of the issue and add a thumbs up (:thumbsup:). This will help draw more attention to it. Any comments you can add to provide additional information or context would also be much appreciated.
43+
* Next, search our [issues list](https://github.com/netbox-community/netbox/issues?q=is%3Aissue) to see if the bug you've found has already been reported. If you come across a bug report that seems to match, please click "add a reaction" in the bottom left corner of the issue and add a thumbs up ( :thumbsup: ). This will help draw more attention to it. Any comments you can add to provide additional information or context would also be much appreciated.
4444

4545
* If you can't find any existing issues (open or closed) that seem to match yours, you're welcome to [submit a new bug report](https://github.com/netbox-community/netbox/issues/new?label=type%3A+bug&template=bug_report.yaml). Be sure to complete the entire report template, including detailed steps that someone triaging your issue can follow to confirm the reported behavior. (If we're not able to replicate the bug based on the information provided, we'll ask for additional detail.)
4646

@@ -56,7 +56,9 @@ intake policy](https://github.com/netbox-community/netbox/wiki/Issue-Intake-Poli
5656

5757
## :bulb: Feature Requests
5858

59-
* First, check the GitHub [issues list](https://github.com/netbox-community/netbox/issues?q=is%3Aissue) to see if the feature you have in mind has already been proposed. If you happen to find an open feature request that matches your idea, click "add a reaction" in the top right corner of the issue and add a thumbs up (:thumbsup:). This ensures that the issue has a better chance of receiving attention. Also feel free to add a comment with any additional justification for the feature.
59+
* First, check the GitHub [issues list](https://github.com/netbox-community/netbox/issues?q=is%3Aissue) to see if the feature you have in mind has already been proposed. If you happen to find an open feature request that matches your idea, click "add a reaction" in the top right corner of the issue and add a thumbs up ( :thumbsup: ). This ensures that the issue has a better chance of receiving attention. Also feel free to add a comment with any additional justification for the feature.
60+
61+
* Please don't submit duplicate issues! Sometimes we reject feature requests, for various reasons. Even if you disagree with those reasons, please **do not** submit a duplicate feature request. It is very disrepectful of the maintainers' time, and you may be barred from opening future issues.
6062

6163
* If you have a rough idea that's not quite ready for formal submission yet, start a [GitHub discussion](https://github.com/netbox-community/netbox/discussions) instead. This is a great way to test the viability and narrow down the scope of a new feature prior to submitting a formal proposal, and can serve to generate interest in your idea from other community members.
6264

base_requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ django-cors-headers
1010
# https://github.com/jazzband/django-debug-toolbar/blob/main/docs/changes.rst
1111
# Pinned for DNS looukp bug; see https://github.com/netbox-community/netbox/issues/16454
1212
# and https://github.com/jazzband/django-debug-toolbar/issues/1927
13-
django-debug-toolbar==4.3.0
13+
django-debug-toolbar
1414

1515
# Library for writing reusable URL query filters
1616
# https://github.com/carltongibson/django-filter/blob/main/CHANGES.rst

contrib/generated_schema.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -377,6 +377,7 @@
377377
"ieee802.11ad",
378378
"ieee802.11ax",
379379
"ieee802.11ay",
380+
"ieee802.11be",
380381
"ieee802.15.1",
381382
"other-wireless",
382383
"gsm",

docs/release-notes/version-4.0.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,26 @@
11
# NetBox v4.0
22

3+
## v4.0.9 (2024-08-14)
4+
5+
### Enhancements
6+
7+
* [#16692](https://github.com/netbox-community/netbox/issues/16692) - Enable modifying VLAN assignment while bulk editing prefixes
8+
* [#17006](https://github.com/netbox-community/netbox/issues/17006) - Add IEEE 802.11be interface type
9+
10+
### Bug Fixes
11+
12+
* [#13459](https://github.com/netbox-community/netbox/issues/13459) - Correct OpenAPI schema type for `TreeNodeMultipleChoiceFilter`
13+
* [#16073](https://github.com/netbox-community/netbox/issues/16073) - Respect default values for custom fields during bulk import of objects
14+
* [#16176](https://github.com/netbox-community/netbox/issues/16176) - Restore ability to select multiple terminating devices when connecting a cable
15+
* [#16871](https://github.com/netbox-community/netbox/issues/16871) - Sanitize device ID query parameter when bulk editing components to prevent exception
16+
* [#17038](https://github.com/netbox-community/netbox/issues/17038) - Fix AttributeError exception when attempting to export system status data
17+
* [#17064](https://github.com/netbox-community/netbox/issues/17064) - Fix misaligned text within rendered Markdown code blocks
18+
* [#17124](https://github.com/netbox-community/netbox/issues/17124) - `BaseTable` should follow reverse one-to-one relationships when prefetching related objects
19+
* [#17131](https://github.com/netbox-community/netbox/issues/17131) - Fix exception when creating object-type custom field without selecting related object type
20+
* [#17144](https://github.com/netbox-community/netbox/issues/17144) - Avoid showing duplicated pop-up messages
21+
22+
---
23+
324
## v4.0.8 (2024-07-26)
425

526
### Enhancements

netbox/account/views.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ def post(self, request):
109109
# Authenticate user
110110
auth_login(request, form.get_user())
111111
logger.info(f"User {request.user} successfully authenticated")
112-
messages.success(request, f"Logged in as {request.user}.")
112+
messages.success(request, _("Logged in as {user}.").format(user=request.user))
113113

114114
# Ensure the user has a UserConfig defined. (This should normally be handled by
115115
# create_userconfig() on user creation.)
@@ -159,7 +159,7 @@ def get(self, request):
159159
username = request.user
160160
auth_logout(request)
161161
logger.info(f"User {username} has logged out")
162-
messages.info(request, "You have logged out.")
162+
messages.info(request, _("You have logged out."))
163163

164164
# Delete session key & language cookies (if set) upon logout
165165
response = HttpResponseRedirect(resolve_url(settings.LOGOUT_REDIRECT_URL))
@@ -234,7 +234,7 @@ class ChangePasswordView(LoginRequiredMixin, View):
234234
def get(self, request):
235235
# LDAP users cannot change their password here
236236
if getattr(request.user, 'ldap_username', None):
237-
messages.warning(request, "LDAP-authenticated user credentials cannot be changed within NetBox.")
237+
messages.warning(request, _("LDAP-authenticated user credentials cannot be changed within NetBox."))
238238
return redirect('account:profile')
239239

240240
form = PasswordChangeForm(user=request.user)
@@ -249,7 +249,7 @@ def post(self, request):
249249
if form.is_valid():
250250
form.save()
251251
update_session_auth_hash(request, form.user)
252-
messages.success(request, "Your password has been changed successfully.")
252+
messages.success(request, _("Your password has been changed successfully."))
253253
return redirect('account:profile')
254254

255255
return render(request, self.template_name, {

netbox/circuits/views.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from django.contrib import messages
22
from django.db import transaction
33
from django.shortcuts import get_object_or_404, redirect, render
4+
from django.utils.translation import gettext_lazy as _
45

56
from dcim.views import PathTraceView
67
from netbox.views import generic
@@ -326,7 +327,9 @@ def get(self, request, pk):
326327

327328
# Circuit must have at least one termination to swap
328329
if not circuit.termination_a and not circuit.termination_z:
329-
messages.error(request, "No terminations have been defined for circuit {}.".format(circuit))
330+
messages.error(request, _(
331+
"No terminations have been defined for circuit {circuit}."
332+
).format(circuit=circuit))
330333
return redirect('circuits:circuit', pk=circuit.pk)
331334

332335
return render(request, 'circuits/circuit_terminations_swap.html', {
@@ -374,7 +377,7 @@ def post(self, request, pk):
374377
circuit.termination_z = None
375378
circuit.save()
376379

377-
messages.success(request, f"Swapped terminations for circuit {circuit}.")
380+
messages.success(request, _("Swapped terminations for circuit {circuit}.").format(circuit=circuit))
378381
return redirect('circuits:circuit', pk=circuit.pk)
379382

380383
return render(request, 'circuits/circuit_terminations_swap.html', {

netbox/core/views.py

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,10 @@ def post(self, request, pk):
7676
datasource = get_object_or_404(self.queryset, pk=pk)
7777
job = datasource.enqueue_sync_job(request)
7878

79-
messages.success(request, f"Queued job #{job.pk} to sync {datasource}")
79+
messages.success(
80+
request,
81+
_("Queued job #{id} to sync {datasource}").format(id=job.pk, datasource=datasource)
82+
)
8083
return redirect(datasource.get_absolute_url())
8184

8285

@@ -235,7 +238,7 @@ def post(self, request, pk):
235238

236239
candidate_config = get_object_or_404(ConfigRevision, pk=pk)
237240
candidate_config.activate()
238-
messages.success(request, f"Restored configuration revision #{pk}")
241+
messages.success(request, _("Restored configuration revision #{id}").format(id=pk))
239242

240243
return redirect(candidate_config.get_absolute_url())
241244

@@ -379,9 +382,9 @@ def post(self, request, job_id):
379382
# Remove job id from queue and delete the actual job
380383
queue.connection.lrem(queue.key, 0, job.id)
381384
job.delete()
382-
messages.success(request, f'Deleted job {job_id}')
385+
messages.success(request, _('Job {id} has been deleted.').format(id=job_id))
383386
else:
384-
messages.error(request, f'Error deleting job: {form.errors[0]}')
387+
messages.error(request, _('Error deleting job {id}: {error}').format(id=job_id, error=form.errors[0]))
385388

386389
return redirect(reverse('core:background_queue_list'))
387390

@@ -394,13 +397,13 @@ def get(self, request, job_id):
394397
try:
395398
job = RQ_Job.fetch(job_id, connection=get_redis_connection(config['connection_config']),)
396399
except NoSuchJobError:
397-
raise Http404(_("Job {job_id} not found").format(job_id=job_id))
400+
raise Http404(_("Job {id} not found.").format(id=job_id))
398401

399402
queue_index = QUEUES_MAP[job.origin]
400403
queue = get_queue_by_index(queue_index)
401404

402405
requeue_job(job_id, connection=queue.connection, serializer=queue.serializer)
403-
messages.success(request, f'You have successfully requeued: {job_id}')
406+
messages.success(request, _('Job {id} has been re-enqueued.').format(id=job_id))
404407
return redirect(reverse('core:background_task', args=[job_id]))
405408

406409

@@ -412,7 +415,7 @@ def get(self, request, job_id):
412415
try:
413416
job = RQ_Job.fetch(job_id, connection=get_redis_connection(config['connection_config']),)
414417
except NoSuchJobError:
415-
raise Http404(_("Job {job_id} not found").format(job_id=job_id))
418+
raise Http404(_("Job {id} not found.").format(id=job_id))
416419

417420
queue_index = QUEUES_MAP[job.origin]
418421
queue = get_queue_by_index(queue_index)
@@ -435,7 +438,7 @@ def get(self, request, job_id):
435438
registry = ScheduledJobRegistry(queue.name, queue.connection)
436439
registry.remove(job)
437440

438-
messages.success(request, f'You have successfully enqueued: {job_id}')
441+
messages.success(request, _('Job {id} has been enqueued.').format(id=job_id))
439442
return redirect(reverse('core:background_task', args=[job_id]))
440443

441444

@@ -452,11 +455,11 @@ def get(self, request, job_id):
452455
queue_index = QUEUES_MAP[job.origin]
453456
queue = get_queue_by_index(queue_index)
454457

455-
stopped, _ = stop_jobs(queue, job_id)
456-
if len(stopped) == 1:
457-
messages.success(request, f'You have successfully stopped {job_id}')
458+
stopped_jobs = stop_jobs(queue, job_id)[0]
459+
if len(stopped_jobs) == 1:
460+
messages.success(request, _('Job {id} has been stopped.').format(id=job_id))
458461
else:
459-
messages.error(request, f'Failed to stop {job_id}')
462+
messages.error(request, _('Failed to stop job {id}').format(id=job_id))
460463

461464
return redirect(reverse('core:background_task', args=[job_id]))
462465

@@ -559,13 +562,14 @@ def get(self, request):
559562

560563
# Raw data export
561564
if 'export' in request.GET:
565+
params = [param.name for param in PARAMS]
562566
data = {
563567
**stats,
564568
'plugins': {
565569
plugin.name: plugin.version for plugin in plugins
566570
},
567571
'config': {
568-
k: config.data[k] for k in sorted(config.data)
572+
k: getattr(config, k) for k in sorted(params)
569573
},
570574
}
571575
response = HttpResponse(json.dumps(data, indent=4), content_type='text/json')

netbox/dcim/choices.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -886,6 +886,7 @@ class InterfaceTypeChoices(ChoiceSet):
886886
TYPE_80211AD = 'ieee802.11ad'
887887
TYPE_80211AX = 'ieee802.11ax'
888888
TYPE_80211AY = 'ieee802.11ay'
889+
TYPE_80211BE = 'ieee802.11be'
889890
TYPE_802151 = 'ieee802.15.1'
890891
TYPE_OTHER_WIRELESS = 'other-wireless'
891892

@@ -1057,6 +1058,7 @@ class InterfaceTypeChoices(ChoiceSet):
10571058
(TYPE_80211AD, 'IEEE 802.11ad'),
10581059
(TYPE_80211AX, 'IEEE 802.11ax'),
10591060
(TYPE_80211AY, 'IEEE 802.11ay'),
1061+
(TYPE_80211BE, 'IEEE 802.11be'),
10601062
(TYPE_802151, 'IEEE 802.15.1 (Bluetooth)'),
10611063
(TYPE_OTHER_WIRELESS, 'Other (Wireless)'),
10621064
)

0 commit comments

Comments
 (0)