Inventory Item templates #6948

Closed
opened 2025-12-29 19:47:05 +01:00 by adam · 8 comments
Owner

Originally created by @PieterL75 on GitHub (Sep 7, 2022).

NetBox version

v3.3.2

Feature type

New functionality

Proposed functionality

I once requested "Inventory templates #8118"
This was implemented in the device-types, so that inventory items can be pre-populated and inherited to newly created devices.

I actually had something else in mind.
What we see, is that a lot of inventory items are the same over and over again. (CPU type, Disk type, ...)
I would like to be able to create a list of inventory items, and when selecting an inventory item (on an existing device, or on a template), be able to choose from the pre-created ones and no free-text anymore.

Use case

In devices, the inventory can be updated by manually entering the Manu/Partid/name,...
Lots of parts are used multiple times in different devices (like in servers :CPU types, Memory or in routers/switches, linecards, routing engines,...),
It will keep the inventory 'clean' of typo's, garbage, ...
The inventory items can be limited to the only those that are allowed/pre-created

Database changes

A new model is required
dcim.inventory_template

  • Name
  • Manufacturer (dcim.manufacturer)
  • PartID

The dcim.inventory_item needs to be updated

Remove

  • Manufacturer (dcim.manufacturer)
  • PartID

Add

  • Inventory_template (dcim.inventory_template) reference

External dependencies

No response

Originally created by @PieterL75 on GitHub (Sep 7, 2022). ### NetBox version v3.3.2 ### Feature type New functionality ### Proposed functionality I once requested "Inventory templates #8118" This was implemented in the device-types, so that inventory items can be pre-populated and inherited to newly created devices. I actually had something else in mind. What we see, is that a lot of inventory items are the same over and over again. (CPU type, Disk type, ...) I would like to be able to create a list of inventory items, and when selecting an inventory item (on an existing device, or on a template), be able to choose from the pre-created ones and no free-text anymore. ### Use case In devices, the inventory can be updated by manually entering the Manu/Partid/name,... Lots of parts are used multiple times in different devices (like in servers :CPU types, Memory or in routers/switches, linecards, routing engines,...), It will keep the inventory 'clean' of typo's, garbage, ... The inventory items can be limited to the only those that are allowed/pre-created ### Database changes A new model is required dcim.inventory_template - Name - Manufacturer (dcim.manufacturer) - PartID The dcim.inventory_item needs to be updated Remove - Manufacturer (dcim.manufacturer) - PartID Add - Inventory_template (dcim.inventory_template) reference ### External dependencies _No response_
adam added the type: featurepending closurestatus: under review labels 2025-12-29 19:47:05 +01:00
adam closed this issue 2025-12-29 19:47:05 +01:00
Author
Owner

@DanSheps commented on GitHub (Sep 7, 2022):

I think, and just throwing this out there, a better more sustainable way to handle this, would be to allow inventoryitems as components on a moduletype. This would allow you to have, say a "CPU" module, with potentially 10 different CPU types that you could slot in.

This would allow some pretty robust re-use of existing modules.

@DanSheps commented on GitHub (Sep 7, 2022): I think, and just throwing this out there, a better more sustainable way to handle this, would be to allow inventoryitems as components on a moduletype. This would allow you to have, say a "CPU" module, with potentially 10 different CPU types that you could slot in. This would allow some pretty robust re-use of existing modules.
Author
Owner

@PieterL75 commented on GitHub (Sep 7, 2022):

You'll need to detail the devicetype very deep then, as you'll need a lot of bays to add things to.
With an inventory item, it's just a reference, without a real 'position' in the device...

@PieterL75 commented on GitHub (Sep 7, 2022): You'll need to detail the devicetype very deep then, as you'll need a lot of bays to add things to. With an inventory item, it's just a reference, without a real 'position' in the device...
Author
Owner

@ThomasADavis commented on GitHub (Sep 8, 2022):

in netbox3.3, each inventory item can point at an object - it's part of the component field - couldn't it point to the modules? I use it to point to interfaces and gbics (but they will get converted to modules shortly..) Will also use it to point to power supplies.

Having inventory templates like module/device types could be useful.

I also use the parent/child relationship - ie, motherboard has the cpu, the dimms, interfaces, drives

@ThomasADavis commented on GitHub (Sep 8, 2022): in netbox3.3, each inventory item can point at an object - it's part of the component field - couldn't it point to the modules? I use it to point to interfaces and gbics (but they will get converted to modules shortly..) Will also use it to point to power supplies. Having inventory templates like module/device types could be useful. I also use the parent/child relationship - ie, motherboard has the cpu, the dimms, interfaces, drives
Author
Owner

@AndMrzv commented on GitHub (Oct 27, 2022):

Somewhat related, I add inventory items to a device type template but custom fields for "DCIM > inventory item" only work for their instances and do not apply to the ones in templates, forcing users to populate said custom fields manually for every device created. Would be useful if templates included custom fields for device components.

@AndMrzv commented on GitHub (Oct 27, 2022): Somewhat related, I add inventory items to a device type template but custom fields for "DCIM > inventory item" only work for their instances and do not apply to the ones in templates, forcing users to populate said custom fields manually for every device created. Would be useful if templates included custom fields for device components.
Author
Owner

@veshant commented on GitHub (Nov 2, 2022):

Would be good if there was a way to manage swappable HDDs, memory and other components that can be reassigned or unassigned from devices. Currently modules are deleted when removed from a device.

@veshant commented on GitHub (Nov 2, 2022): Would be good if there was a way to manage swappable HDDs, memory and other components that can be reassigned or unassigned from devices. Currently modules are deleted when removed from a device.
Author
Owner

@github-actions[bot] commented on GitHub (Jan 2, 2023):

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. NetBox is governed by a small group of core maintainers which means not all opened issues may receive direct feedback. Do not attempt to circumvent this process by "bumping" the issue; doing so will result in its immediate closure and you may be barred from participating in any future discussions. Please see our contributing guide.

@github-actions[bot] commented on GitHub (Jan 2, 2023): This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. NetBox is governed by a small group of core maintainers which means not all opened issues may receive direct feedback. **Do not** attempt to circumvent this process by "bumping" the issue; doing so will result in its immediate closure and you may be barred from participating in any future discussions. Please see our [contributing guide](https://github.com/netbox-community/netbox/blob/develop/CONTRIBUTING.md).
Author
Owner

@github-actions[bot] commented on GitHub (Apr 6, 2023):

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. NetBox is governed by a small group of core maintainers which means not all opened issues may receive direct feedback. Do not attempt to circumvent this process by "bumping" the issue; doing so will result in its immediate closure and you may be barred from participating in any future discussions. Please see our contributing guide.

@github-actions[bot] commented on GitHub (Apr 6, 2023): This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. NetBox is governed by a small group of core maintainers which means not all opened issues may receive direct feedback. **Do not** attempt to circumvent this process by "bumping" the issue; doing so will result in its immediate closure and you may be barred from participating in any future discussions. Please see our [contributing guide](https://github.com/netbox-community/netbox/blob/develop/CONTRIBUTING.md).
Author
Owner

@github-actions[bot] commented on GitHub (May 7, 2023):

This issue has been automatically closed due to lack of activity. In an effort to reduce noise, please do not comment any further. Note that the core maintainers may elect to reopen this issue at a later date if deemed necessary.

@github-actions[bot] commented on GitHub (May 7, 2023): This issue has been automatically closed due to lack of activity. In an effort to reduce noise, please do not comment any further. Note that the core maintainers may elect to reopen this issue at a later date if deemed necessary.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#6948