Labels for Custom Field Selection Choices #13241
Labels
status: accepted
This issue has been accepted for implementation
type: feature
Introduction of new functionality to the application
Milestone
NetBox version
v3.2.2
Feature type
Change to existing functionality
Proposed functionality
Apologies in advance if this issue/feature was discussed previously or addressed in a subsequent Netbox version.
For selection-type custom fields, it would help if we can have the option of adding labels to selection choices. The labels would be human-friendly and appear in the web interface, similar to custom field labels. Meanwhile, the actual value of the selection choice is more database friendly (integer, underscores etc.).
For example, in a Netbox web interface, on a custom field of a device named "SNMP Auth Protocol" of type selection. Users are able to add labels to the selection choices. The labels would be MD5, SHA1, SHA256. The values would be 0, 1, 2 respectively.
If a user chooses selection MD5, the custom field maps MD5 (label) to value of 0.
Use case
This would be useful for accommodating different software API requirements when syncing with Netbox.
For example, our team currently uses Zabbix to monitor devices, where Netbox is source of truth inventory. We sync a lot of values from device custom fields into Zabbix using pynetbox and Zabbix API.
Currently, if I read a custom field value of "MD5" and try passing it into Zabbix API, it will throw an error. That is because MD5 in Zabbix API is represented by a value of "0" instead of "MD5". In this case, a label of "MD5" that maps to a value of "0" would be a useful feature for selection choices. It would prevent us from creating a dictionary to map values in our sync script.
Database changes
No response
External dependencies
No response
The text was updated successfully, but these errors were encountered: