ArnesSI / netbox-inventory

Manage your hardware inventory in NetBox
MIT License
215 stars 21 forks source link

Utilize Device Types from DCIM #110

Closed shepherdjay closed 1 year ago

shepherdjay commented 1 year ago

Is there a way to utilize the device types already imported into DCIM? I'm using the device importer tool in Netbox and would really like my device types between the asset inventory and the DCIM to remain in sync.

shepherdjay commented 1 year ago

I do see that manufacturers reference the DCIM foreign key of manufacturer. There may be a very good reason to not utilize this foreign key by plugin maintainer. Given this perhaps it makes sense to allow dcim item type to be used OR inventory item type... using a django constraint?

shepherdjay commented 1 year ago

I see when I create an asset I CAN select DCIM type instead of inventory item type... I might be missing the boat and not understanding the use case where you would create an "Inventory Item" type vs just the device types...

matejv commented 1 year ago

Netbox has three different kinds of hardware: devices, modules and inventory items. For devices and modules it has device types and module types that represent a sort of template that gets used when you create a device or module. For inventory items it has no such "templates", so netbox-invenrory plugin provides one.

On of the aims of netbox-inventory is to provide a single view of all your hardware so it combines all three netbox hardware kinds under Asset model. Therefore each asset hand be one of the three:

When you create an Asset you choose one ond only one of those three. Then you can create a device, module or inventory item in netbox and netbox-inventory keeps track of which device, module, inventory item is connected to what asset.

shepherdjay commented 1 year ago

Thanks for the clarification - I don't think I realized netbox provided an inventory item without the corresponding item type like the other models.