Increase max length of platform name field #2717

Closed
opened 2025-12-29 18:21:22 +01:00 by adam · 2 comments
Owner

Originally created by @keliansb on GitHub (Jul 2, 2019).

Originally assigned to: @DanSheps on GitHub.

Environment

  • Python version: 3.6.8
  • NetBox version: 2.6.0

Proposed Functionality

Increase the platform name field to more than 65 characters. Optionally, increase the platform slug field accordingly.

Use Case

We would like to set the platform name of our Windows machines like we did with our Linux ones. Currently, we are using Ansible to gather facts about our hosts and then format a platform name by concatenating ansible_distribution, ansible_distribution_version and ansible_architecture variables.

Examples:

  • CentOS 7.5.1804 (x86_64)
  • Ubuntu 18.04 (x86_64)
  • Microsoft Windows Server 2012 R2 Standard 6.3.9600.0 (64-bit)
  • Microsoft Windows Server 2016 Standard 10.0.14393.0 (64-bit)

Database Changes

Increase max_length of platform name field and platform slug field to more than 65 chars.

External Dependencies

No dependency.

Originally created by @keliansb on GitHub (Jul 2, 2019). Originally assigned to: @DanSheps on GitHub. <!-- NOTE: This form is only for proposing specific new features or enhancements. If you have a general idea or question, please post to our mailing list instead of opening an issue: https://groups.google.com/forum/#!forum/netbox-discuss NOTE: Due to an excessive backlog of feature requests, we are not currently accepting any proposals which significantly extend NetBox's feature scope. Please describe the environment in which you are running NetBox. Be sure that you are running an unmodified instance of the latest stable release before submitting a bug report. --> ### Environment * Python version: <!-- Example: 3.5.4 --> 3.6.8 * NetBox version: <!-- Example: 2.3.6 --> 2.6.0 <!-- Describe in detail the new functionality you are proposing. Include any specific changes to work flows, data models, or the user interface. --> ### Proposed Functionality Increase the platform name field to more than 65 characters. Optionally, increase the platform slug field accordingly. <!-- Convey an example use case for your proposed feature. Write from the perspective of a NetBox user who would benefit from the proposed functionality and describe how. ---> ### Use Case We would like to set the platform name of our Windows machines like we did with our Linux ones. Currently, we are using Ansible to gather facts about our hosts and then format a platform name by concatenating `ansible_distribution`, `ansible_distribution_version` and `ansible_architecture` variables. Examples: - CentOS 7.5.1804 (x86_64) - Ubuntu 18.04 (x86_64) - Microsoft Windows Server 2012 R2 Standard 6.3.9600.0 (64-bit) - Microsoft Windows Server 2016 Standard 10.0.14393.0 (64-bit) <!-- Note any changes to the database schema necessary to support the new feature. For example, does the proposal require adding a new model or field? (Not all new features require database changes.) ---> ### Database Changes Increase max_length of platform name field and platform slug field to more than 65 chars. <!-- List any new dependencies on external libraries or services that this new feature would introduce. For example, does the proposal require the installation of a new Python package? (Not all new features introduce new dependencies.) --> ### External Dependencies No dependency.
adam added the status: acceptedtype: feature labels 2025-12-29 18:21:22 +01:00
adam closed this issue 2025-12-29 18:21:22 +01:00
Author
Owner

@DanSheps commented on GitHub (Jul 17, 2019):

Is there any reason why 65 characters was chosen? The longest microsoft one is only 61 characters. We currently have a length of 64 characters for a few model name fields in dcim already.

@DanSheps commented on GitHub (Jul 17, 2019): Is there any reason why 65 characters was chosen? The longest microsoft one is only 61 characters. We currently have a length of 64 characters for a few model name fields in dcim already.
Author
Owner

@keliansb commented on GitHub (Jul 17, 2019):

No I gave it as an example. Any higher value than 62 characters (the longest one is Windows Server 2012 R2) will be enough.

@keliansb commented on GitHub (Jul 17, 2019): No I gave it as an example. Any higher value than 62 characters (the longest one is Windows Server 2012 R2) will be enough.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#2717