Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to template device name #1347

Open
wants to merge 1 commit into
base: devel
Choose a base branch
from

Conversation

MinDBreaK
Copy link
Contributor

New Behavior

The property hostname_field can now be templated, allowing definition of the device name to be more flexible.

Contrast to Current Behavior

The property was not templated and was forced to be in custom_fields

Discussion: Benefits and Drawbacks

This will allow the use of any property defined on a device to be used as a name, like a serial number for example.
The change was made to be backward compatible, although this has not been tested now. I do plan to make tests if this change is approved.

If required, this change could be gated behind a flag.

Changes to the Documentation

The docs will also be updated to specify the new behaviour of this property

Proposed Release Note Entry

The hostname_field can now reference any value from the device with templated jinja

Double Check

  • I have read the comments and followed the CONTRIBUTING.md.
  • I have explained my PR according to the information in the comments or in a linked issue.
  • My PR targets the devel branch.

@MinDBreaK MinDBreaK marked this pull request as draft October 31, 2024 16:50
@MinDBreaK MinDBreaK force-pushed the support-any-fields-hostname branch 2 times, most recently from 32081b0 to 5d6389d Compare November 4, 2024 08:53
@MinDBreaK MinDBreaK force-pushed the support-any-fields-hostname branch from 5d6389d to 47f0f0c Compare November 5, 2024 09:44
@MinDBreaK MinDBreaK marked this pull request as ready for review November 20, 2024 13:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant