[PR #18710] [MERGED] Fixes 17357: Use virtual chassis name as fallback for device #15422

Closed
opened 2025-12-30 00:21:50 +01:00 by adam · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbox-community/netbox/pull/18710
Author: @alehaa
Created: 2/23/2025
Status: Merged
Merged: 2/25/2025
Merged by: @arthanson

Base: mainHead: 17357-vc-device-name


📝 Commits (4)

  • b02bf77 Index virtual chassis of device
  • 2b7c425 Enhance display name of devices
  • 4692b9f Add test case for VC members with name
  • 650ed0e Don't cache device label

📊 Changes

6 files changed (+46 additions, -15 deletions)

View changed files

📝 netbox/dcim/filtersets.py (+1 -0)
📝 netbox/dcim/models/devices.py (+15 -11)
📝 netbox/dcim/search.py (+1 -0)
📝 netbox/dcim/svg/racks.py (+2 -4)
📝 netbox/dcim/tables/devices.py (+1 -0)
📝 netbox/dcim/tests/test_models.py (+26 -0)

📄 Description

Fixes: #17357

If a name is not defined for a device, it is automatically generated from other device data (i.e. virtual chassis member) if possible. This name is available as label attribute to not interfere with existing functionality or break APIs. This label will be used in several places like tables, while the API still returns the real name.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netbox-community/netbox/pull/18710 **Author:** [@alehaa](https://github.com/alehaa) **Created:** 2/23/2025 **Status:** ✅ Merged **Merged:** 2/25/2025 **Merged by:** [@arthanson](https://github.com/arthanson) **Base:** `main` ← **Head:** `17357-vc-device-name` --- ### 📝 Commits (4) - [`b02bf77`](https://github.com/netbox-community/netbox/commit/b02bf77888e77c5722e80b590027a8acceb389ed) Index virtual chassis of device - [`2b7c425`](https://github.com/netbox-community/netbox/commit/2b7c425b57d23eb8af02cb6bf045b7d93774db96) Enhance display name of devices - [`4692b9f`](https://github.com/netbox-community/netbox/commit/4692b9f955f7662ba6065376e99e5d51d5a65676) Add test case for VC members with name - [`650ed0e`](https://github.com/netbox-community/netbox/commit/650ed0e6430674cdd402e00d3d7cea653684124a) Don't cache device label ### 📊 Changes **6 files changed** (+46 additions, -15 deletions) <details> <summary>View changed files</summary> 📝 `netbox/dcim/filtersets.py` (+1 -0) 📝 `netbox/dcim/models/devices.py` (+15 -11) 📝 `netbox/dcim/search.py` (+1 -0) 📝 `netbox/dcim/svg/racks.py` (+2 -4) 📝 `netbox/dcim/tables/devices.py` (+1 -0) 📝 `netbox/dcim/tests/test_models.py` (+26 -0) </details> ### 📄 Description <!-- Thank you for your interest in contributing to NetBox! Please note that our contribution policy requires that a feature request or bug report be approved and assigned prior to opening a pull request. This helps avoid waste time and effort on a proposed change that we might not be able to accept. IF YOUR PULL REQUEST DOES NOT REFERENCE AN ISSUE WHICH HAS BEEN ASSIGNED TO YOU, IT WILL BE CLOSED AUTOMATICALLY. Please specify your assigned issue number on the line below. --> ### Fixes: #17357 <!-- Please include a summary of the proposed changes below. --> If a name is not defined for a device, it is automatically generated from other device data (i.e. virtual chassis member) if possible. This name is available as `label` attribute to not interfere with existing functionality or break APIs. This label will be used in several places like tables, while the API still returns the real name. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
adam added the pull-request label 2025-12-30 00:21:50 +01:00
adam closed this issue 2025-12-30 00:21:50 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#15422