Standardize model name field lengths #3993

Closed
opened 2025-12-29 18:32:30 +01:00 by adam · 4 comments
Owner

Originally created by @ledgley on GitHub (Aug 18, 2020).

Originally assigned to: @jeremystretch on GitHub.

Environment

  • Python version:
  • NetBox version: 2.8.9

Proposed Functionality

Increase max_length of the 'name' field under the IPAM.Service model from 30 to 255

    name = models.CharField(
        max_length=255
    )

Use Case

We use this model to track services hosted on load balancers, as a one stop view to find a particular farm across a large estate of ADC's. We use the name field as the farm name, which is typically a URL, which is commonly longer than 30 characters. Propose to increase to 255, as the maximum length of a domain name is 253 chars.

Database Changes


External Dependencies

None

Originally created by @ledgley on GitHub (Aug 18, 2020). Originally assigned to: @jeremystretch on GitHub. ### Environment * Python version: <!-- Example: 3.6.9 --> * NetBox version: 2.8.9 ### Proposed Functionality Increase `max_length` of the 'name' field under the IPAM.Service model from 30 to 255 ``` name = models.CharField( max_length=255 ) ``` ### Use Case We use this model to track services hosted on load balancers, as a one stop view to find a particular farm across a large estate of ADC's. We use the name field as the farm name, which is typically a URL, which is commonly longer than 30 characters. Propose to increase to 255, as the maximum length of a domain name is 253 chars. ### Database Changes --- ### External Dependencies None
adam added the status: acceptedtype: housekeeping labels 2025-12-29 18:32:30 +01:00
adam closed this issue 2025-12-29 18:32:30 +01:00
Author
Owner

@DanSheps commented on GitHub (Aug 18, 2020):

#4416 didn't appear to increase this. I think URL might not be the best in there however we can take a look at this.

@DanSheps commented on GitHub (Aug 18, 2020): #4416 didn't appear to increase this. I think URL might not be the best in there however we can take a look at this.
Author
Owner

@jeremystretch commented on GitHub (Aug 18, 2020):

We use the name field as the farm name, which is typically a URL

I don't know what you mean by "farm name," but this field is not intended to represent a URL. The service name should be a human-friendly string.

@jeremystretch commented on GitHub (Aug 18, 2020): > We use the name field as the farm name, which is typically a URL I don't know what you mean by "farm name," but this field is not intended to represent a URL. The service name should be a human-friendly string.
Author
Owner

@ledgley commented on GitHub (Aug 19, 2020):

I don't know what you mean by "farm name,"

By farm name I mean the name of the 'server farm', which is typically referenced by it's URL, ie. intranet.company.com

@ledgley commented on GitHub (Aug 19, 2020): > I don't know what you mean by "farm name," By farm name I mean the name of the 'server farm', which is typically referenced by it's URL, ie. intranet.company.com
Author
Owner

@jeremystretch commented on GitHub (Sep 29, 2020):

This issue was originally opened to extend the length of the name field for the Service model, but there are probably others to revisit as well.

Tagging this v2.10 so I remember to conduct an audit.

@jeremystretch commented on GitHub (Sep 29, 2020): This issue was originally opened to extend the length of the `name` field for the Service model, but there are probably others to revisit as well. Tagging this v2.10 so I remember to conduct an audit.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#3993