Skip to content

Conversation

@alehaa
Copy link
Contributor

@alehaa alehaa commented Feb 23, 2025

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.

In some use cases, a device does not have an individual name when it is
a member of a virtual chassis. By adding the virtual chassis to the
search index and making its name searchable, forms can use the virtual
chassis name instead in these situations.
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.
@jeremystretch jeremystretch requested review from a team and arthanson and removed request for a team February 24, 2025 16:46
Generating the device label doesn't require much computing power. Thus,
caching does more harm than good, as it may return stale labels after
name changes. Now a fresh label is always generated.
@alehaa alehaa requested a review from arthanson February 25, 2025 07:52
@arthanson arthanson merged commit bf836c9 into netbox-community:main Feb 25, 2025
3 checks passed
@alehaa alehaa deleted the 17357-vc-device-name branch February 25, 2025 16:28
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 28, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use VirtualChassis name as fallback for devices

2 participants