InventoryItem name attribute size #2862

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

Originally created by @Solvik on GitHub (Sep 6, 2019).

Proposed Changes

I'd like to extend the size of InventoryItem name attribute, see here.

Justification

I'm reporting the local hardware of servers using InventoryItem. Such as RAID Cards, Memory DIMM, Motherboard and such.
I'm reporting the name of DIMM memory like DIMM DDR4 Synchronous Registered (Buffered) 2400 MHz (0.4 ns) (16.0GB)

Since the size is currently limited to 50 chars, I'd like to raise this size to a more appropriate one, say 128 chars ?

If validated (feature and size), I can propose a PR.

Originally created by @Solvik on GitHub (Sep 6, 2019). <!-- NOTE: This type of issue should be opened only by those reasonably familiar with NetBox's code base and interested in contributing to its development. Describe the proposed change(s) in detail. --> ### Proposed Changes I'd like to extend the size of `InventoryItem` `name` attribute, [see here](https://github.com/netbox-community/netbox/blob/develop/netbox/dcim/models.py#L2600). <!-- Provide justification for the proposed change(s). --> ### Justification I'm reporting the local hardware of servers using InventoryItem. Such as RAID Cards, Memory DIMM, Motherboard and such. I'm reporting the name of DIMM memory like `DIMM DDR4 Synchronous Registered (Buffered) 2400 MHz (0.4 ns) (16.0GB)` Since the size is currently limited to 50 chars, I'd like to raise this size to a more appropriate one, say 128 chars ? If validated (feature and size), I can propose a PR.
adam closed this issue 2025-12-29 18:22:53 +01:00
Author
Owner

@DanSheps commented on GitHub (Sep 6, 2019):

This issue has been closed as it does not conform to one of the provided templates as required by the contributing guide. If you'd like to request that your issue be re-opened, please first update the content so that it matches the appropriate template (this may require rewriting your issue entirely).

@DanSheps commented on GitHub (Sep 6, 2019): This issue has been closed as it does not conform to one of the [provided templates](https://github.com/digitalocean/netbox/issues/new/choose) as required by the [contributing guide](https://github.com/digitalocean/netbox/blob/master/CONTRIBUTING.md). If you'd like to request that your issue be re-opened, please first update the content so that it matches the appropriate template (this may require rewriting your issue entirely).
Author
Owner

@jeremystretch commented on GitHub (Sep 6, 2019):

DIMM DDR4 Synchronous Registered (Buffered) 2400 MHz (0.4 ns) (16.0GB)

FYI item names must be unique to the device/parent item in which they are installed. The above is a description that's likely to be identical for each installed module; its name would be something like DIMM1.

@jeremystretch commented on GitHub (Sep 6, 2019): > `DIMM DDR4 Synchronous Registered (Buffered) 2400 MHz (0.4 ns) (16.0GB)` FYI item names must be unique to the device/parent item in which they are installed. The above is a description that's likely to be identical for each installed module; its name would be something like `DIMM1`.
Author
Owner

@Solvik commented on GitHub (Sep 6, 2019):

Name is not unique in the model
And there's no description field

For the uniqueness I'm using the serial field or the asset field
And everything is limited to 50 chars, at some point I need to push useful data and not leave details out of an application as useful as netbox is.

@Solvik commented on GitHub (Sep 6, 2019): Name is not unique in the model And there's no description field For the uniqueness I'm using the serial field or the asset field And everything is limited to 50 chars, at some point I need to push useful data and not leave details out of an application as useful as netbox is.
Author
Owner

@jeremystretch commented on GitHub (Sep 6, 2019):

Name is not unique in the model

It is part of a unique set:

class InventoryItem(ComponentModel):
    ...
    class Meta:
        unique_together = ['device', 'parent', 'name']
@jeremystretch commented on GitHub (Sep 6, 2019): > Name is not unique in the model It is part of a unique set: ``` class InventoryItem(ComponentModel): ... class Meta: unique_together = ['device', 'parent', 'name'] ```
Author
Owner

@Solvik commented on GitHub (Sep 7, 2019):

That's because parent is None in my case

Capture d’écran 2019-09-07 à 10 12 01
@Solvik commented on GitHub (Sep 7, 2019): That's because `parent` is None in my case <img width="946" alt="Capture d’écran 2019-09-07 à 10 12 01" src="https://user-images.githubusercontent.com/201761/64472005-76aeb880-d158-11e9-86e7-cd6ec197c50d.png">
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#2862